fix(test): temporary remove env var
Close
@@ -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))
})
