aboutsummaryrefslogtreecommitdiffstats
path: root/dashboard/app/access_test.go
Commit message (Collapse)AuthorAgeFilesLines
* all: remove unused nolint directivesDmitry Vyukov2026-01-021-1/+1
|
* dashboard/app: improve test names in TestUserAccessLevelDmitry Vyukov2025-12-221-15/+15
| | | | | | The test uses test names with spaces, testing package replaces spaces with _. As the result, it's impossible to search for failed tests, and they all look very similar. Replace space with _, so that it's possible to search for failed tests.
* dashboard: add missing access check for fsck logsAleksandr Nogikh2025-04-231-1/+17
| | | | | | | To make them accessible for non-admins, we need explicit checks in access.go. Extend TestAccess to cover fsck logs.
* all: remove loop variables scopingTaras Madan2025-02-171-1/+0
|
* dashboard/app: introduce authorized PublicAccessTaras Madan2024-10-241-13/+24
|
* dashboard/app: unit test accessLevelTaras Madan2024-10-181-0/+144
|
* dashboard: fix TestAccessAleksandr Nogikh2024-07-111-14/+19
| | | | | | | | | | | The test has recently become broken, but we didn't notice it in our presubmit testing. Fix the problem (ReproLog being set to 0). Run TestAccess also in -short mode, but limit it to ensuring that non-public URLs are not accessible publicly. The short test now takes 60 seconds compared to 104 seconds without -short.
* dashboard: make repro logs publicAndrey Konovalov2024-07-101-0/+12
| | | | | PR #4837 added displaying successfull repro logs to syzbot but didn't make the logs publicly-accessible. Fix that.
* all: fix up context import after go fixDmitry Vyukov2024-04-261-1/+1
|
* all: go fix everythingDmitry Vyukov2024-04-261-1/+1
|
* tools/syz-linter: check t.Logf/Errorf/Fatalf messagesDmitry Vyukov2024-04-171-1/+1
| | | | | Fix checking of Logf, it has string in 0-th arg. Add checking of t.Errorf/Fatalf.
* dashboard/app/aceess_test.go: disable goconst for TestAccessTaras Madan2023-10-301-1/+1
| | | | It contributes to #4285 unblocking.
* dashboard: access config through contextAleksandr Nogikh2023-10-121-7/+9
| | | | | | | | | | | | | | | | | | | | | We used to have a single global `config` variable and access it throughout the whole dashboard application. However, this approach has been more and more complicated test writing -- sometimes we want the config to be only slightly different, so that it's not worth it adding new namespaces, sometimes we have to test how dashboard handles config changes over time. This has already led to a number of hacky contextWithXXX methods that mocked various parts of the global variable. The rest of the code had to sometimes still use `config` directly and sometimes invoke getXXX(c) methods. This is very inconsistent and prone to errors. With more and more situations where we need to patch the config appearing (see #4118), let's refactor the application to always access config via the getConfig(c) method. This allows us to uniformly patch the config and be sure that the non-patched copy is not accessible from anywhere else.
* all: use errors.As instead of .(type)Taras Madan2023-07-241-2/+3
|
* dashboard/app/util_test.go: *HTTPError not HTTPErrorTaras Madan2023-07-201-1/+1
|
* dashboard/app: open graph pagesDmitry Vyukov2022-05-051-0/+48
| | | | Show graph pages to users who have access to the bugs themselves.
* dashboard/app: update to go116 (#2959)Taras Madan2022-01-051-1/+1
| | | | | | 1. Updated the "include"s. 2. No logs read API in the AppEngine anymore. Replaced by the GCP logging API. 3. Use "GO111MODULE=off gcloud beta app deploy ./dashboard/app/app.yaml --no-promote" to test new deployment. 4. Updated the documentation.
* dashboard/app: fix up machine info handlingDmitry Vyukov2020-09-141-11/+24
| | | | | | | | | Assorted local fixes fixes, like dedup machine info in the database, fix up HTML table markup, enforce and check access to the machine info entities, etc. Follow up to #2085 Fixes #466
* .golangci.yml: enable funlen checkerDmitry Vyukov2020-06-051-0/+1
| | | | Checks for too long functions (based on lines and statements).
* dashboard/app: fix testing for go1.11 runtimeDmitry Vyukov2020-01-291-3/+1
| | | | | | | | | | 0. Remove aetest build tag. We don't need it anymore, go test should work. 1. IsDevAppServer does not return true in tests anymore, so don't use it 2. Use a different mechanism to register test/prod config. We don't have aetest tag anymore, so we need something even more dynamic. 3. Fix new golangci-lint warnings: all test files are checked now. Update #1461
* dashboard: update to go111 runtimeAndrew Donnellan2020-01-291-1/+1
| | | | | | | | | The old go 1.9 App Engine runtime is now deprecated. Update to the go 1.11 runtime, which still allows us to use the old App Engine library (removed in the 1.12 runtime). Closes: #1461 ("dashboard: port app to go111/go112 runtime") Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
* dashboard/app: add invalid bugs pageDmitry Vyukov2019-05-271-4/+17
| | | | | | | | Currently it's not possible to list all invalid bugs. Add a page that does this. It's not referenced from anywhere as it's unclear who/when needs it on periodic basis. But if the list is needed for something one-off, we have it.
* dashboard/app: fix login redirectsDmitry Vyukov2019-04-101-0/+12
| | | | | | | Login redirects broke because we failed to generate common header. This wasn't noticed because we use client redirects and there is no easy way to test them. Fix redirects and use server redirect and test this behavior.
* dashboard/app: split dashboard per-namespaceDmitry Vyukov2019-04-081-3/+27
| | | | | | | We now have too many namespaces and bugs. Main page takes infinity to load. Also almost nobody is interested in more than 1 namespace. So split main page per-namespaces.
* dashboard/app: modernize testsDmitry Vyukov2019-03-171-9/+3
| | | | | | Use expectOK for checking errors more. Use pollEmailBug helper more. Add expectNE and use it.
* dashboard/app: purge old reprosDmitry Vyukov2018-11-231-1/+1
| | | | | | We have some bugs with insane amount of repros. So many that new crashes don't show up on dashboard at all. Purge old repros too. There is no need to keep more than 40.
* dashboard/app: allow some cross-reporting dupsDmitry Vyukov2018-09-111-0/+3
| | | | | | | | | | Allow a special case of cross-reporting duping: rom last but one reporting to the last one (which is stable, final destination) provided that these two reportings have the same access level and type. The rest of the combinations can lead to surprising states and information hiding, so we still don't allow them. Fixes #569
* dashboard/app: refactor testsDmitry Vyukov2018-06-111-33/+29
| | | | | | | Use standard dashboard client provided by dashapi package in tests. Switch everything to use the client instead of API method. Fixes #606
* dashboard/app: cleanup and tidy email reportsDmitry Vyukov2018-05-031-0/+25
| | | | | | | | | Align all info into nice table. Shorten links a bit. Remove some non-strictly-necessary info. Rework some texts. Fixes #565
* dashboard/app: extend tests for access controlDmitry Vyukov2018-02-221-34/+61
| | | | | Add a patched bug to the mix. Check contents of crash logs/reports, kernel configs, etc.
* dashboard/app: finer-grained access controlDmitry Vyukov2018-02-141-0/+257
This is the bulk of work for opening dashboard. Implement finer-grained access control (admin/user/public). Show only info designated to the current user access level. Rework UIs for more clarity re bug statuses. Show fixed bug.