From 17bef4f59911a7b527a09c3ffa98f93891eef133 Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 31 May 2026 21:06:34 +0200 Subject: [PATCH] test(api/v2): defer license reset in admin webtest --- pkg/webtests/huma_admin_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/webtests/huma_admin_test.go b/pkg/webtests/huma_admin_test.go index 18b348cad..c241d3505 100644 --- a/pkg/webtests/huma_admin_test.go +++ b/pkg/webtests/huma_admin_test.go @@ -54,7 +54,11 @@ func TestHumaAdminProjects(t *testing.T) { t.Run("admin without the feature gets 404", func(t *testing.T) { e, err := setupTestEnv() require.NoError(t, err) - license.ResetForTests() + // A valid license that lacks the admin panel feature still gates the + // route. Match the sibling subtests' set/defer-reset pattern so the + // license state never bleeds into other tests. + license.SetForTests([]license.Feature{}) + defer license.ResetForTests() admin := promoteToAdmin(t, 1)