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

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


The following commit(s) were added to refs/heads/master by this push:
     new 8819a7d  Move trait test to separate directory
8819a7d is described below

commit 8819a7da83ae67b2d09645f905624d2e2d8dea14
Author: Jan <[email protected]>
AuthorDate: Mon Feb 22 08:31:17 2021 +0100

    Move trait test to separate directory
---
 e2e/common/{ => traits}/affinity_test.go             | 8 ++++----
 e2e/common/{ => traits}/files/Master.java            | 0
 e2e/common/{ => traits}/istio_test.go                | 4 ++--
 e2e/common/{ => traits}/jolokia_test.go              | 4 ++--
 e2e/common/{addons_test.go => traits/master_test.go} | 4 ++--
 e2e/common/{ => traits}/prometheus_test.go           | 4 ++--
 e2e/common/{ => traits}/pull_secret_test.go          | 8 ++++----
 script/Makefile                                      | 2 +-
 8 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/e2e/common/affinity_test.go b/e2e/common/traits/affinity_test.go
similarity index 96%
rename from e2e/common/affinity_test.go
rename to e2e/common/traits/affinity_test.go
index f17dbee..5cf0db5 100644
--- a/e2e/common/affinity_test.go
+++ b/e2e/common/traits/affinity_test.go
@@ -19,7 +19,7 @@ See the License for the specific language governing 
permissions and
 limitations under the License.
 */
 
-package common
+package traits
 
 import (
        "fmt"
@@ -47,7 +47,7 @@ func TestAffinityTrait(t *testing.T) {
                if hostname != "" {
                        t.Run("Run Java with node affinity", func(t *testing.T) 
{
                                RegisterTestingT(t)
-                               Expect(Kamel("run", "-n", ns, "files/Java.java",
+                               Expect(Kamel("run", "-n", ns, 
"../files/Java.java",
                                        "--name", "java1",
                                        "-t", "affinity.enabled=true",
                                        "-t", 
fmt.Sprintf("affinity.node-affinity-labels=kubernetes.io/hostname in(%s)", 
hostname)).Execute()).Should(BeNil())
@@ -68,7 +68,7 @@ func TestAffinityTrait(t *testing.T) {
 
                t.Run("Run Java with pod affinity", func(t *testing.T) {
                        RegisterTestingT(t)
-                       Expect(Kamel("run", "-n", ns, "files/Java.java",
+                       Expect(Kamel("run", "-n", ns, "../files/Java.java",
                                "--name", "java2",
                                "-t", "affinity.enabled=true",
                                "-t", 
"affinity.pod-affinity-labels=camel.apache.org/integration").Execute()).Should(BeNil())
@@ -90,7 +90,7 @@ func TestAffinityTrait(t *testing.T) {
                t.Run("Run Java with pod anti affinity", func(t *testing.T) {
                        RegisterTestingT(t)
 
-                       Expect(Kamel("run", "-n", ns, "files/Java.java",
+                       Expect(Kamel("run", "-n", ns, "../files/Java.java",
                                "--name", "java3",
                                "-t", "affinity.enabled=true",
                                "-t", 
"affinity.pod-anti-affinity-labels=camel.apache.org/integration").Execute()).Should(BeNil())
diff --git a/e2e/common/files/Master.java b/e2e/common/traits/files/Master.java
similarity index 100%
rename from e2e/common/files/Master.java
rename to e2e/common/traits/files/Master.java
diff --git a/e2e/common/istio_test.go b/e2e/common/traits/istio_test.go
similarity index 96%
rename from e2e/common/istio_test.go
rename to e2e/common/traits/istio_test.go
index 7737b1c..36e6cd1 100644
--- a/e2e/common/istio_test.go
+++ b/e2e/common/traits/istio_test.go
@@ -19,7 +19,7 @@ See the License for the specific language governing 
permissions and
 limitations under the License.
 */
 
-package common
+package traits
 
 import (
        "testing"
@@ -37,7 +37,7 @@ func TestIstioTrait(t *testing.T) {
                Expect(Kamel("install", "-n", ns).Execute()).Should(BeNil())
 
                t.Run("Run Java with Istio", func(t *testing.T) {
-                       Expect(Kamel("run", "-n", ns, "files/Java.java",
+                       Expect(Kamel("run", "-n", ns, "../files/Java.java",
                                "-t", 
"istio.enabled=true").Execute()).Should(BeNil())
                        Eventually(IntegrationPodPhase(ns, "java"), 
TestTimeoutLong).Should(Equal(v1.PodRunning))
                        Eventually(IntegrationCondition(ns, "java", 
camelv1.IntegrationConditionReady), 
TestTimeoutShort).Should(Equal(v1.ConditionTrue))
diff --git a/e2e/common/jolokia_test.go b/e2e/common/traits/jolokia_test.go
similarity index 97%
rename from e2e/common/jolokia_test.go
rename to e2e/common/traits/jolokia_test.go
index eb7b63a..03ec7ee 100644
--- a/e2e/common/jolokia_test.go
+++ b/e2e/common/traits/jolokia_test.go
@@ -19,7 +19,7 @@ See the License for the specific language governing 
permissions and
 limitations under the License.
 */
 
-package common
+package traits
 
 import (
        "fmt"
@@ -37,7 +37,7 @@ func TestJolokiaTrait(t *testing.T) {
                Expect(Kamel("install", "-n", ns).Execute()).Should(BeNil())
 
                t.Run("Run Java with Jolokia", func(t *testing.T) {
-                       Expect(Kamel("run", "-n", ns, "files/Java.java",
+                       Expect(Kamel("run", "-n", ns, "../files/Java.java",
                                "-t", "jolokia.enabled=true",
                                "-t", 
"jolokia.use-ssl-client-authentication=false",
                                "-t", "jolokia.protocol=http",
diff --git a/e2e/common/addons_test.go b/e2e/common/traits/master_test.go
similarity index 98%
rename from e2e/common/addons_test.go
rename to e2e/common/traits/master_test.go
index 749743e..500c626 100644
--- a/e2e/common/addons_test.go
+++ b/e2e/common/traits/master_test.go
@@ -19,7 +19,7 @@ See the License for the specific language governing 
permissions and
 limitations under the License.
 */
 
-package common
+package traits
 
 import (
        "testing"
@@ -30,7 +30,7 @@ import (
        v1 "k8s.io/api/core/v1"
 )
 
-func TestAddons(t *testing.T) {
+func TestMasterTrait(t *testing.T) {
 
        WithNewTestNamespace(t, func(ns string) {
                Expect(Kamel("install", "-n", ns).Execute()).Should(BeNil())
diff --git a/e2e/common/prometheus_test.go 
b/e2e/common/traits/prometheus_test.go
similarity index 98%
rename from e2e/common/prometheus_test.go
rename to e2e/common/traits/prometheus_test.go
index 0f9ffff..9f3383e 100644
--- a/e2e/common/prometheus_test.go
+++ b/e2e/common/traits/prometheus_test.go
@@ -19,7 +19,7 @@ See the License for the specific language governing 
permissions and
 limitations under the License.
 */
 
-package common
+package traits
 
 import (
        "fmt"
@@ -48,7 +48,7 @@ func TestPrometheusTrait(t *testing.T) {
 
                Expect(Kamel("install", "-n", ns).Execute()).Should(BeNil())
 
-               Expect(Kamel("run", "-n", ns, "files/Java.java",
+               Expect(Kamel("run", "-n", ns, "../files/Java.java",
                        "-t", "prometheus.enabled=true",
                        "-t", fmt.Sprintf("prometheus.service-monitor=%v", 
createServiceMonitor)).Execute()).Should(BeNil())
                Eventually(IntegrationPodPhase(ns, "java"), 
TestTimeoutLong).Should(Equal(v1.PodRunning))
diff --git a/e2e/common/pull_secret_test.go 
b/e2e/common/traits/pull_secret_test.go
similarity index 94%
rename from e2e/common/pull_secret_test.go
rename to e2e/common/traits/pull_secret_test.go
index 2c78ab2..0854762 100644
--- a/e2e/common/pull_secret_test.go
+++ b/e2e/common/traits/pull_secret_test.go
@@ -19,7 +19,7 @@ See the License for the specific language governing 
permissions and
 limitations under the License.
 */
 
-package common
+package traits
 
 import (
        "testing"
@@ -41,7 +41,7 @@ func TestPullSecretTrait(t *testing.T) {
                Expect(Kamel("install", "-n", ns).Execute()).Should(BeNil())
 
                t.Run("Image pull secret is set on pod", func(t *testing.T) {
-                       Expect(Kamel("run", "-n", ns, "files/Java.java",
+                       Expect(Kamel("run", "-n", ns, "../files/Java.java",
                                "-t", "pull-secret.enabled=true",
                                "-t", 
"pull-secret.secret-name=dummy-secret").Execute()).Should(BeNil())
                        // pod may not run because the pull secret is dummy
@@ -55,7 +55,7 @@ func TestPullSecretTrait(t *testing.T) {
                })
 
                t.Run("Explicity disable image pull secret", func(t *testing.T) 
{
-                       Expect(Kamel("run", "-n", ns, "files/Java.java",
+                       Expect(Kamel("run", "-n", ns, "../files/Java.java",
                                "-t", 
"pull-secret.enabled=false").Execute()).Should(BeNil())
                        Eventually(IntegrationPodPhase(ns, "java"), 
TestTimeoutLong).Should(Equal(v1.PodRunning))
                        Eventually(IntegrationCondition(ns, "java", 
camelv1.IntegrationConditionReady), 
TestTimeoutShort).Should(Equal(v1.ConditionTrue))
@@ -75,7 +75,7 @@ func TestPullSecretTrait(t *testing.T) {
                if ocp {
                        // OpenShift always has an internal registry so image 
pull secret is set by default
                        t.Run("Image pull secret is automatically set by 
default", func(t *testing.T) {
-                               Expect(Kamel("run", "-n", ns, 
"files/Java.java").Execute()).Should(BeNil())
+                               Expect(Kamel("run", "-n", ns, 
"../files/Java.java").Execute()).Should(BeNil())
                                Eventually(IntegrationPodPhase(ns, "java"), 
TestTimeoutLong).Should(Equal(v1.PodRunning))
                                Eventually(IntegrationCondition(ns, "java", 
camelv1.IntegrationConditionReady), 
TestTimeoutShort).Should(Equal(v1.ConditionTrue))
                                Eventually(IntegrationLogs(ns, "java"), 
TestTimeoutShort).Should(ContainSubstring("Magicstring!"))
diff --git a/script/Makefile b/script/Makefile
index 7a3a75a..97e7465 100644
--- a/script/Makefile
+++ b/script/Makefile
@@ -147,7 +147,7 @@ test: build
        go test ./...
 
 test-integration: build
-       STAGING_RUNTIME_REPO="$(STAGING_RUNTIME_REPO)" go test -timeout 60m -v 
./e2e/common -tags=integration && go test -timeout 60m -v 
./e2e/common/languages -tags=integration
+       STAGING_RUNTIME_REPO="$(STAGING_RUNTIME_REPO)" go test -timeout 60m -v 
./e2e/common -tags=integration && go test -timeout 60m -v 
./e2e/common/languages -tags=integration && go test -timeout 60m -v 
./e2e/common/traits -tags=integration
        #go test -timeout 60m -v ./e2e/common -tags=integration
 
 test-knative: build

Reply via email to