From 730932be13492f7ce706f065c99786f8493268af Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 31 May 2026 21:06:26 +0200 Subject: [PATCH] test(api/v2): defer session close in admin webtest --- pkg/webtests/huma_admin_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/webtests/huma_admin_test.go b/pkg/webtests/huma_admin_test.go index 507b655d9..18b348cad 100644 --- a/pkg/webtests/huma_admin_test.go +++ b/pkg/webtests/huma_admin_test.go @@ -42,10 +42,10 @@ func TestHumaAdminProjects(t *testing.T) { defer license.ResetForTests() s := db.NewSession() + defer s.Close() u, err := user.GetUserByID(s, 1) require.NoError(t, err) require.False(t, u.IsAdmin, "fixture precondition: user1 is not an admin") - s.Close() res := adminReq(t, e, http.MethodGet, "/api/v2/admin/projects", u, "") assert.Equal(t, http.StatusNotFound, res.Code)