From ccc55c37ff2cf65bad777d76e10fd3637e54f205 Mon Sep 17 00:00:00 2001 From: Ismo Vuorinen Date: Sun, 22 Mar 2026 17:38:09 +0200 Subject: [PATCH] fix(tests): isolate wizard tests from GITHUB_TOKEN env var (#201) * fix(tests): isolate wizard tests from GITHUB_TOKEN env var Clear GITHUB_TOKEN and GH_README_GITHUB_TOKEN in wizard tests so the wizard doesn't skip token prompts, which caused input misalignment and "configuration canceled by user" failures. * refactor(tests): use appconstants for env var names in wizard tests --- internal/wizard/wizard_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/wizard/wizard_test.go b/internal/wizard/wizard_test.go index 38c9c8f..a89996d 100644 --- a/internal/wizard/wizard_test.go +++ b/internal/wizard/wizard_test.go @@ -655,6 +655,8 @@ func TestConfigureGitHubIntegration(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { + t.Setenv(appconstants.EnvGitHubTokenStandard, "") + t.Setenv(appconstants.EnvGitHubToken, "") wizard := testWizard(tt.inputs) if tt.existingToken != "" { wizard.config.GitHubToken = tt.existingToken @@ -996,6 +998,8 @@ func TestRun(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { + t.Setenv(appconstants.EnvGitHubTokenStandard, "") + t.Setenv(appconstants.EnvGitHubToken, "") wizard := testWizard(tt.inputs) config, err := wizard.Run()