From 93ae7e0a1ca84fd2df902b7c8d94cdedb671bed6 Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Mon, 13 Feb 2023 16:05:01 +0100 Subject: dashboard: move all cron endpoints to cron/ This lets us keep only one access rule and reliefs from the need to keep handlers and app.yaml in sync for cron jobs that'll be added in the future. --- dashboard/app/asset_storage_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'dashboard/app/asset_storage_test.go') diff --git a/dashboard/app/asset_storage_test.go b/dashboard/app/asset_storage_test.go index ad972cf8b..1bcf5574e 100644 --- a/dashboard/app/asset_storage_test.go +++ b/dashboard/app/asset_storage_test.go @@ -117,7 +117,7 @@ https://goo.gl/tpsmEJ#status for how to communicate with syzbot.`, // Invalidate the bug. c.client.updateBug(extBugID, dashapi.BugStatusInvalid, "") - _, err = c.GET("/deprecate_assets") + _, err = c.GET("/cron/deprecate_assets") c.expectOK(err) // Query the needed assets once more, so far there should be no change. @@ -128,7 +128,7 @@ https://goo.gl/tpsmEJ#status for how to communicate with syzbot.`, // Skip one month and deprecate assets. c.advanceTime(time.Hour * 24 * 31) - _, err = c.GET("/deprecate_assets") + _, err = c.GET("/cron/deprecate_assets") c.expectOK(err) // Only the html asset should have persisted. @@ -194,7 +194,7 @@ func TestCoverReportDeprecation(t *testing.T) { defer c.Close() ensureNeeded := func(needed []string) { - _, err := c.GET("/deprecate_assets") + _, err := c.GET("/cron/deprecate_assets") c.expectOK(err) neededResp, err := c.client.NeededAssetsList() c.expectOK(err) @@ -270,7 +270,7 @@ func TestFreshBuildAssets(t *testing.T) { defer c.Close() ensureNeeded := func(needed []string) { - _, err := c.GET("/deprecate_assets") + _, err := c.GET("/cron/deprecate_assets") c.expectOK(err) neededResp, err := c.client.NeededAssetsList() c.expectOK(err) @@ -395,7 +395,7 @@ https://goo.gl/tpsmEJ#status for how to communicate with syzbot.`, // Invalidate the bug. c.client.updateBug(extBugID, dashapi.BugStatusInvalid, "") - _, err = c.GET("/deprecate_assets") + _, err = c.GET("/cron/deprecate_assets") c.expectOK(err) // Query the needed assets once more, so far there should be no change. @@ -406,7 +406,7 @@ https://goo.gl/tpsmEJ#status for how to communicate with syzbot.`, // Skip one month and deprecate assets. c.advanceTime(time.Hour * 24 * 31) - _, err = c.GET("/deprecate_assets") + _, err = c.GET("/cron/deprecate_assets") c.expectOK(err) // Nothing should have been persisted. -- cgit mrf-deployment