This is an automated email from the ASF dual-hosted git repository.

astefanutti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit a8f4b10963266d37e4a4b6941fd057ac0f05c364
Author: phantomjinx <[email protected]>
AuthorDate: Tue Nov 30 19:06:39 2021 +0000

    Adds support for marking tests as problematic
    
    * If an env var is set then marked tests will be skipped
    
    * Meant as interim option to allow test suites to avoid failure due to
      problematic tests rather than regressions in the coding.
---
 e2e/common/traits/route_test.go      | 12 ++++++++++++
 e2e/common/traits/toleration_test.go | 12 ++++++++++++
 2 files changed, 24 insertions(+)

diff --git a/e2e/common/traits/route_test.go b/e2e/common/traits/route_test.go
index 9132e49..aeba12a 100644
--- a/e2e/common/traits/route_test.go
+++ b/e2e/common/traits/route_test.go
@@ -34,6 +34,7 @@ import (
        "math/big"
        rand2 "math/rand"
        "net/http"
+       "os"
        "testing"
        "time"
 
@@ -69,7 +70,18 @@ var certPem []byte
 // then in this case the HTTP client validates the TLS certificate.
 var skipClientTLSVerification = true
 
+/*
+ * TODO
+ * Test needs to be modified as route for unsecured http is not created on OCP.
+ * Already skipped when executed using Kind since cluster does not support 
route API.
+ *
+ * Adding CAMEL_K_TEST_SKIP_PROBLEMATIC env var for the moment.
+ */
 func TestRunRoutes(t *testing.T) {
+       if os.Getenv("CAMEL_K_TEST_SKIP_PROBLEMATIC") == "true" {
+               t.Skip("WARNING: Test marked as problematic ... skipping")
+       }
+
        WithNewTestNamespace(t, func(ns string) {
                ocp, err := openshift.IsOpenShift(TestClient())
                if !ocp {
diff --git a/e2e/common/traits/toleration_test.go 
b/e2e/common/traits/toleration_test.go
index a58eaaf..711bee4 100644
--- a/e2e/common/traits/toleration_test.go
+++ b/e2e/common/traits/toleration_test.go
@@ -23,6 +23,7 @@ limitations under the License.
 package traits
 
 import (
+       "os"
        "testing"
 
        . "github.com/onsi/gomega"
@@ -35,7 +36,18 @@ import (
        v1 "github.com/apache/camel-k/pkg/apis/camel/v1"
 )
 
+/*
+ * TODO
+ * Test needs to be modified as taint test for java3 integration does not work 
on OCP.
+ * Already skipped when executed using Kind since that is only a single-node 
cluster.
+ *
+ * Adding CAMEL_K_TEST_SKIP_PROBLEMATIC env var for the moment.
+ */
 func TestTolerationTrait(t *testing.T) {
+       if os.Getenv("CAMEL_K_TEST_SKIP_PROBLEMATIC") == "true" {
+               t.Skip("WARNING: Test marked as problematic ... skipping")
+       }
+
        WithNewTestNamespace(t, func(ns string) {
                Expect(Kamel("install", "-n", ns).Execute()).To(Succeed())
 

Reply via email to