This is an automated email from the ASF dual-hosted git repository. pcongiusti pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit c5562c3946c56955d7a1a5e9433aad1846e93ee4 Author: Pasquale Congiusti <[email protected]> AuthorDate: Thu Dec 22 12:20:51 2022 +0100 fix(test): temporary remove env var Close #3952 --- e2e/namespace/install/cli/run_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/e2e/namespace/install/cli/run_test.go b/e2e/namespace/install/cli/run_test.go index 1504401b4..0a58bfac1 100644 --- a/e2e/namespace/install/cli/run_test.go +++ b/e2e/namespace/install/cli/run_test.go @@ -76,6 +76,10 @@ func TestKamelCLIRun(t *testing.T) { Eventually(DeleteIntegrations(ns), TestTimeoutLong).Should(Equal(0)) }) + // GIST does not like GITHUB_TOKEN apparently, we must temporary remove it + os.Setenv("GITHUB_TOKEN_TMP", os.Getenv("GITHUB_TOKEN")) + os.Setenv("GITHUB_TOKEN", "") + t.Run("Gist (ID)", func(t *testing.T) { name := "github-gist-id" Expect(KamelRunWithID(operatorID, ns, "--name", name, @@ -100,6 +104,10 @@ func TestKamelCLIRun(t *testing.T) { Eventually(DeleteIntegrations(ns), TestTimeoutLong).Should(Equal(0)) }) + // Revert GITHUB TOKEN + os.Setenv("GITHUB_TOKEN", os.Getenv("GITHUB_TOKEN_TMP")) + os.Setenv("GITHUB_TOKEN_TMP", "") + // Clean up Eventually(DeleteIntegrations(ns), TestTimeoutLong).Should(Equal(0)) })
