You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pc...@apache.org on 2023/05/19 07:41:53 UTC
[camel-k] branch release-1.10.x updated: Fix e2e/namespace/install/cli/run_test.go for cli run from gist
This is an automated email from the ASF dual-hosted git repository.
pcongiusti pushed a commit to branch release-1.10.x
in repository https://gitbox.apache.org/repos/asf/camel-k.git
The following commit(s) were added to refs/heads/release-1.10.x by this push:
new bc59774e9 Fix e2e/namespace/install/cli/run_test.go for cli run from gist
bc59774e9 is described below
commit bc59774e9f9df374e63e3b0e37013e10fcda677f
Author: Claudio Miranda <cl...@claudius.com.br>
AuthorDate: Thu May 18 00:02:26 2023 -0300
Fix e2e/namespace/install/cli/run_test.go for cli run from gist
Fix https://github.com/apache/camel-k/issues/3952
---
e2e/namespace/install/cli/run_test.go | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/e2e/namespace/install/cli/run_test.go b/e2e/namespace/install/cli/run_test.go
index 589f5d6ed..f27b14bcd 100644
--- a/e2e/namespace/install/cli/run_test.go
+++ b/e2e/namespace/install/cli/run_test.go
@@ -24,6 +24,7 @@ package common
import (
"fmt"
+ "os"
"testing"
. "github.com/onsi/gomega"
@@ -75,6 +76,10 @@ func TestKamelCLIRun(t *testing.T) {
Expect(Kamel("delete", "--all", "-n", ns).Execute()).To(Succeed())
})
+ // GIST does not like GITHUB_TOKEN apparently, we must temporary remove it
+ os.Setenv("GITHUB_TOKEN_TMP", os.Getenv("GITHUB_TOKEN"))
+ os.Unsetenv("GITHUB_TOKEN")
+
t.Run("Gist (ID)", func(t *testing.T) {
name := "github-gist-id"
Expect(KamelRunWithID(operatorID, ns, "--name", name,
@@ -98,6 +103,10 @@ func TestKamelCLIRun(t *testing.T) {
Eventually(IntegrationLogs(ns, name), TestTimeoutShort).Should(ContainSubstring("Tick!"))
Expect(Kamel("delete", "--all", "-n", ns).Execute()).To(Succeed())
})
+
+ // Revert GITHUB TOKEN
+ os.Setenv("GITHUB_TOKEN", os.Getenv("GITHUB_TOKEN_TMP"))
+ os.Unsetenv("GITHUB_TOKEN_TMP")
})
t.Run("Run and update", func(t *testing.T) {