Skip to content

Lightweight server monitoring with historical data, docker stats, and alerts.

test(hub): re-enable /update route test (#2651)

Sven van Ginkel2ba1fc0061d0
diff --git a/internal/hub/api_test.go b/internal/hub/api_test.go
index f3e869a88..5ef4237d9 100644
--- a/internal/hub/api_test.go
+++ b/internal/hub/api_test.go
@@ -796,17 +796,17 @@ func TestApiRoutesAuthentication(t *testing.T) {
"systems": []string{system.Id},
}),
},
- // this works but diff behavior on prod vs dev.
- // dev returns 502; prod returns 200 with static html page 404
- // TODO: align dev and prod behavior and re-enable this test
- // {
- // Name: "GET /update - shouldn't exist without CHECK_UPDATES env var",
- // Method: http.MethodGet,
- // URL: "/api/beszel/update",
- // NotExpectedContent: []string{"v:", "\"v\":"},
- // ExpectedStatus: 502,
- // TestAppFactory: testAppFactory,
- // },
+ {
+ Name: "GET /update - shouldn't exist without CHECK_UPDATES env var",
+ Method: http.MethodGet,
+ URL: "/api/beszel/update",
+ Headers: map[string]string{
+ "Authorization": userToken,
+ },
+ NotExpectedContent: []string{"v:", "\"v\":"},
+ ExpectedStatus: 404,
+ TestAppFactory: testAppFactory,
+ },
}
for _, scenario := range scenarios {