diff --git a/api/http/handler/system/version_test.go b/api/http/handler/system/version_test.go index 6df987408..98c64d6a3 100644 --- a/api/http/handler/system/version_test.go +++ b/api/http/handler/system/version_test.go @@ -36,6 +36,7 @@ func Test_getSystemVersion(t *testing.T) { // setup services jwtService, err := jwt.NewService("1h", store) is.NoError(err, "Error initiating jwt service") + apiKeyService := apikey.NewAPIKeyService(store.APIKeyRepository(), store.User()) requestBouncer := security.NewRequestBouncer(store, jwtService, apiKeyService) @@ -45,7 +46,6 @@ func Test_getSystemVersion(t *testing.T) { jwt, _, _ := jwtService.GenerateToken(&portainer.TokenData{ID: adminUser.ID, Username: adminUser.Username, Role: adminUser.Role}) t.Run("Display Edition", func(t *testing.T) { - req := httptest.NewRequest(http.MethodGet, "/system/version", nil) testhelpers.AddTestSecurityCookie(req, jwt)