You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2020/04/21 08:23:00 UTC
[camel-k] 02/06: Fix #1362: refactor into folders removing tags
This is an automated email from the ASF dual-hosted git repository.
nferraro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit 03b8f445e010f54a52d55ab4866a5b5a0460b0d1
Author: Nicola Ferraro <ni...@gmail.com>
AuthorDate: Mon Apr 20 16:04:44 2020 +0200
Fix #1362: refactor into folders removing tags
---
e2e/{ => builder}/build_test.go | 2 +-
e2e/{tekton_test.go => builder/doc.go} | 27 +++----------------------
e2e/{ => builder}/docker_hub_test.go | 2 +-
e2e/{ => builder}/files/Java.java | 0
e2e/{ => builder}/files/groovy.groovy | 0
e2e/{ => builder}/github_packages_test.go | 2 +-
e2e/{ => builder}/global_test.go | 2 +-
e2e/{ => common}/addons_test.go | 2 +-
e2e/{ => common}/backward_compat_test.go | 2 +-
e2e/{ => common}/client_test.go | 2 +-
e2e/{ => common}/cron_test.go | 2 +-
e2e/{ => common}/dev_mode_test.go | 4 ++--
e2e/{tekton_test.go => common/doc.go} | 25 ++---------------------
e2e/{ => common}/files/Java.java | 0
e2e/{ => common}/files/Master.java | 0
e2e/{ => common}/files/Prop.java | 0
e2e/{ => common}/files/RestConsumer.java | 0
e2e/{ => common}/files/RestProducer.groovy | 0
e2e/{ => common}/files/cron-fallback.groovy | 0
e2e/{ => common}/files/cron-timer.groovy | 0
e2e/{ => common}/files/cron.groovy | 0
e2e/{ => common}/files/groovy.groovy | 0
e2e/{ => common}/files/js-polyglot.js | 0
e2e/{ => common}/files/js.js | 0
e2e/{ => common}/files/kotlin.kts | 0
e2e/{ => common}/files/prop.properties | 0
e2e/{ => common}/files/xml.xml | 0
e2e/{ => common}/files/yaml-polyglot.yaml | 0
e2e/{ => common}/files/yaml.yaml | 0
e2e/{ => common}/init_test.go | 4 ++--
e2e/{ => common}/install_test.go | 2 +-
e2e/{ => common}/offline_commands_test.go | 2 +-
e2e/{ => common}/platformless_run_test.go | 2 +-
e2e/{ => common}/rest_test.go | 2 +-
e2e/{ => common}/run_test.go | 2 +-
e2e/{ => common}/tekton_test.go | 2 +-
e2e/{ => common}/uninstall_test.go | 2 +-
e2e/{ => common}/upgrade_test.go | 2 +-
e2e/{tekton_test.go => knative/doc.go} | 25 ++---------------------
e2e/{ => knative}/files/knative1.groovy | 0
e2e/{ => knative}/files/knative2.groovy | 0
e2e/{ => knative}/files/knative3.groovy | 0
e2e/{ => knative}/files/knativech1.groovy | 0
e2e/{ => knative}/files/knativech2.groovy | 0
e2e/{ => knative}/files/knativeevt1.groovy | 0
e2e/{ => knative}/files/knativeevt2.groovy | 0
e2e/{ => knative}/files/knativegetpost1.groovy | 0
e2e/{ => knative}/files/knativegetpost2.groovy | 0
e2e/{ => knative}/files/knativemultihop1.groovy | 0
e2e/{ => knative}/files/knativemultihop2.groovy | 0
e2e/{ => knative}/files/knativemultihop3.groovy | 0
e2e/{ => knative}/files/petstore-api.yaml | 0
e2e/{ => knative}/files/petstore.groovy | 0
e2e/{ => knative}/files/yaml.yaml | 0
e2e/{ => knative}/knative_platform_test.go | 4 ++--
e2e/{ => knative}/knative_test.go | 4 ++--
e2e/{ => knative}/openapi_test.go | 4 ++--
e2e/support/test_staging_hooks.go | 2 +-
e2e/support/test_support.go | 4 ++--
e2e/{ => support}/util/dump.go | 2 ++
e2e/{ => support}/util/log_scanner.go | 2 ++
e2e/{ => support}/util/temp_file.go | 2 ++
script/Makefile | 16 ++++++++++-----
63 files changed, 53 insertions(+), 104 deletions(-)
diff --git a/e2e/build_test.go b/e2e/builder/build_test.go
similarity index 99%
rename from e2e/build_test.go
rename to e2e/builder/build_test.go
index 559d043..2169bbe 100644
--- a/e2e/build_test.go
+++ b/e2e/builder/build_test.go
@@ -19,7 +19,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package e2e
+package builder
import (
"testing"
diff --git a/e2e/tekton_test.go b/e2e/builder/doc.go
similarity index 51%
copy from e2e/tekton_test.go
copy to e2e/builder/doc.go
index 6054900..04e8574 100644
--- a/e2e/tekton_test.go
+++ b/e2e/builder/doc.go
@@ -1,6 +1,6 @@
// +build integration
-// To enable compilation of this file in Goland, go to "Settings -> Go -> Vendoring & Build Tags -> Custom Tags" and add "integration"
+// To enable compilation of this file in Goland, go to "Settings -> Go -> Vendoring & Build Tags -> Custom Tags" and add "builder"
/*
Licensed to the Apache Software Foundation (ASF) under one or more
@@ -19,26 +19,5 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package e2e
-
-import (
- "testing"
-
- . "github.com/apache/camel-k/e2e/support"
- . "github.com/onsi/gomega"
-)
-
-// TestTektonLikeBehavior verifies that the kamel binary can be invoked from within the Camel K image.
-// This feature is used in Tekton pipelines.
-func TestTektonLikeBehavior(t *testing.T) {
- WithNewTestNamespace(t, func(ns string) {
- Expect(CreateOperatorServiceAccount(ns)).Should(BeNil())
- Expect(CreateOperatorRole(ns)).Should(BeNil())
- Expect(CreateOperatorRoleBinding(ns)).Should(BeNil())
-
- Eventually(OperatorPod(ns)).Should(BeNil())
- Expect(CreateKamelPod(ns, "tekton-task", "install", "--skip-cluster-setup", "--force")).Should(BeNil())
-
- Eventually(OperatorPod(ns)).ShouldNot(BeNil())
- })
-}
+// Package builder contains e2e tests that should be executed with all builders in the matrix
+package builder
diff --git a/e2e/docker_hub_test.go b/e2e/builder/docker_hub_test.go
similarity index 99%
rename from e2e/docker_hub_test.go
rename to e2e/builder/docker_hub_test.go
index b98d62c..2f11e2f 100644
--- a/e2e/docker_hub_test.go
+++ b/e2e/builder/docker_hub_test.go
@@ -19,7 +19,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package e2e
+package builder
import (
"os"
diff --git a/e2e/files/Java.java b/e2e/builder/files/Java.java
similarity index 100%
copy from e2e/files/Java.java
copy to e2e/builder/files/Java.java
diff --git a/e2e/files/groovy.groovy b/e2e/builder/files/groovy.groovy
similarity index 100%
copy from e2e/files/groovy.groovy
copy to e2e/builder/files/groovy.groovy
diff --git a/e2e/github_packages_test.go b/e2e/builder/github_packages_test.go
similarity index 99%
rename from e2e/github_packages_test.go
rename to e2e/builder/github_packages_test.go
index a43d60c..df257ed 100644
--- a/e2e/github_packages_test.go
+++ b/e2e/builder/github_packages_test.go
@@ -19,7 +19,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package e2e
+package builder
import (
"os"
diff --git a/e2e/global_test.go b/e2e/builder/global_test.go
similarity index 99%
rename from e2e/global_test.go
rename to e2e/builder/global_test.go
index 84799db..8d38d85 100644
--- a/e2e/global_test.go
+++ b/e2e/builder/global_test.go
@@ -19,7 +19,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package e2e
+package builder
import (
"os"
diff --git a/e2e/addons_test.go b/e2e/common/addons_test.go
similarity index 99%
rename from e2e/addons_test.go
rename to e2e/common/addons_test.go
index a776f84..df3fc1b 100644
--- a/e2e/addons_test.go
+++ b/e2e/common/addons_test.go
@@ -19,7 +19,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package e2e
+package common
import (
"testing"
diff --git a/e2e/backward_compat_test.go b/e2e/common/backward_compat_test.go
similarity index 99%
rename from e2e/backward_compat_test.go
rename to e2e/common/backward_compat_test.go
index cacfe9f..35b4819 100644
--- a/e2e/backward_compat_test.go
+++ b/e2e/common/backward_compat_test.go
@@ -19,7 +19,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package e2e
+package common
import (
"testing"
diff --git a/e2e/client_test.go b/e2e/common/client_test.go
similarity index 99%
rename from e2e/client_test.go
rename to e2e/common/client_test.go
index 672d4cc..e68fb26 100644
--- a/e2e/client_test.go
+++ b/e2e/common/client_test.go
@@ -19,7 +19,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package e2e
+package common
import (
"testing"
diff --git a/e2e/cron_test.go b/e2e/common/cron_test.go
similarity index 99%
rename from e2e/cron_test.go
rename to e2e/common/cron_test.go
index bf63fc9..ed961a6 100644
--- a/e2e/cron_test.go
+++ b/e2e/common/cron_test.go
@@ -19,7 +19,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package e2e
+package common
import (
"testing"
diff --git a/e2e/dev_mode_test.go b/e2e/common/dev_mode_test.go
similarity index 97%
rename from e2e/dev_mode_test.go
rename to e2e/common/dev_mode_test.go
index 652c887..36bad8d 100644
--- a/e2e/dev_mode_test.go
+++ b/e2e/common/dev_mode_test.go
@@ -19,7 +19,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package e2e
+package common
import (
"context"
@@ -27,7 +27,7 @@ import (
"testing"
. "github.com/apache/camel-k/e2e/support"
- "github.com/apache/camel-k/e2e/util"
+ "github.com/apache/camel-k/e2e/support/util"
. "github.com/onsi/gomega"
)
diff --git a/e2e/tekton_test.go b/e2e/common/doc.go
similarity index 56%
copy from e2e/tekton_test.go
copy to e2e/common/doc.go
index 6054900..252475e 100644
--- a/e2e/tekton_test.go
+++ b/e2e/common/doc.go
@@ -19,26 +19,5 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package e2e
-
-import (
- "testing"
-
- . "github.com/apache/camel-k/e2e/support"
- . "github.com/onsi/gomega"
-)
-
-// TestTektonLikeBehavior verifies that the kamel binary can be invoked from within the Camel K image.
-// This feature is used in Tekton pipelines.
-func TestTektonLikeBehavior(t *testing.T) {
- WithNewTestNamespace(t, func(ns string) {
- Expect(CreateOperatorServiceAccount(ns)).Should(BeNil())
- Expect(CreateOperatorRole(ns)).Should(BeNil())
- Expect(CreateOperatorRoleBinding(ns)).Should(BeNil())
-
- Eventually(OperatorPod(ns)).Should(BeNil())
- Expect(CreateKamelPod(ns, "tekton-task", "install", "--skip-cluster-setup", "--force")).Should(BeNil())
-
- Eventually(OperatorPod(ns)).ShouldNot(BeNil())
- })
-}
+// Package common contains common e2e tests whose outcome does not depend on the builder that has been used, thus they that can be executed with a single builder in the CI
+package common
diff --git a/e2e/files/Java.java b/e2e/common/files/Java.java
similarity index 100%
rename from e2e/files/Java.java
rename to e2e/common/files/Java.java
diff --git a/e2e/files/Master.java b/e2e/common/files/Master.java
similarity index 100%
rename from e2e/files/Master.java
rename to e2e/common/files/Master.java
diff --git a/e2e/files/Prop.java b/e2e/common/files/Prop.java
similarity index 100%
rename from e2e/files/Prop.java
rename to e2e/common/files/Prop.java
diff --git a/e2e/files/RestConsumer.java b/e2e/common/files/RestConsumer.java
similarity index 100%
rename from e2e/files/RestConsumer.java
rename to e2e/common/files/RestConsumer.java
diff --git a/e2e/files/RestProducer.groovy b/e2e/common/files/RestProducer.groovy
similarity index 100%
rename from e2e/files/RestProducer.groovy
rename to e2e/common/files/RestProducer.groovy
diff --git a/e2e/files/cron-fallback.groovy b/e2e/common/files/cron-fallback.groovy
similarity index 100%
rename from e2e/files/cron-fallback.groovy
rename to e2e/common/files/cron-fallback.groovy
diff --git a/e2e/files/cron-timer.groovy b/e2e/common/files/cron-timer.groovy
similarity index 100%
rename from e2e/files/cron-timer.groovy
rename to e2e/common/files/cron-timer.groovy
diff --git a/e2e/files/cron.groovy b/e2e/common/files/cron.groovy
similarity index 100%
rename from e2e/files/cron.groovy
rename to e2e/common/files/cron.groovy
diff --git a/e2e/files/groovy.groovy b/e2e/common/files/groovy.groovy
similarity index 100%
rename from e2e/files/groovy.groovy
rename to e2e/common/files/groovy.groovy
diff --git a/e2e/files/js-polyglot.js b/e2e/common/files/js-polyglot.js
similarity index 100%
rename from e2e/files/js-polyglot.js
rename to e2e/common/files/js-polyglot.js
diff --git a/e2e/files/js.js b/e2e/common/files/js.js
similarity index 100%
rename from e2e/files/js.js
rename to e2e/common/files/js.js
diff --git a/e2e/files/kotlin.kts b/e2e/common/files/kotlin.kts
similarity index 100%
rename from e2e/files/kotlin.kts
rename to e2e/common/files/kotlin.kts
diff --git a/e2e/files/prop.properties b/e2e/common/files/prop.properties
similarity index 100%
rename from e2e/files/prop.properties
rename to e2e/common/files/prop.properties
diff --git a/e2e/files/xml.xml b/e2e/common/files/xml.xml
similarity index 100%
rename from e2e/files/xml.xml
rename to e2e/common/files/xml.xml
diff --git a/e2e/files/yaml-polyglot.yaml b/e2e/common/files/yaml-polyglot.yaml
similarity index 100%
rename from e2e/files/yaml-polyglot.yaml
rename to e2e/common/files/yaml-polyglot.yaml
diff --git a/e2e/files/yaml.yaml b/e2e/common/files/yaml.yaml
similarity index 100%
copy from e2e/files/yaml.yaml
copy to e2e/common/files/yaml.yaml
diff --git a/e2e/init_test.go b/e2e/common/init_test.go
similarity index 97%
rename from e2e/init_test.go
rename to e2e/common/init_test.go
index 5a87212..984d8a4 100644
--- a/e2e/init_test.go
+++ b/e2e/common/init_test.go
@@ -19,7 +19,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package e2e
+package common
import (
"fmt"
@@ -27,7 +27,7 @@ import (
"testing"
. "github.com/apache/camel-k/e2e/support"
- "github.com/apache/camel-k/e2e/util"
+ "github.com/apache/camel-k/e2e/support/util"
camelv1 "github.com/apache/camel-k/pkg/apis/camel/v1"
. "github.com/onsi/gomega"
v1 "k8s.io/api/core/v1"
diff --git a/e2e/install_test.go b/e2e/common/install_test.go
similarity index 99%
rename from e2e/install_test.go
rename to e2e/common/install_test.go
index b51cd78..5d472a8 100644
--- a/e2e/install_test.go
+++ b/e2e/common/install_test.go
@@ -19,7 +19,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package e2e
+package common
import (
"testing"
diff --git a/e2e/offline_commands_test.go b/e2e/common/offline_commands_test.go
similarity index 99%
rename from e2e/offline_commands_test.go
rename to e2e/common/offline_commands_test.go
index 9cda428..a0b0e9c 100644
--- a/e2e/offline_commands_test.go
+++ b/e2e/common/offline_commands_test.go
@@ -19,7 +19,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package e2e
+package common
import (
"io/ioutil"
diff --git a/e2e/platformless_run_test.go b/e2e/common/platformless_run_test.go
similarity index 99%
rename from e2e/platformless_run_test.go
rename to e2e/common/platformless_run_test.go
index 1f132fc..743a462 100644
--- a/e2e/platformless_run_test.go
+++ b/e2e/common/platformless_run_test.go
@@ -19,7 +19,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package e2e
+package common
import (
"os"
diff --git a/e2e/rest_test.go b/e2e/common/rest_test.go
similarity index 99%
rename from e2e/rest_test.go
rename to e2e/common/rest_test.go
index 00067ef..fd5a711 100644
--- a/e2e/rest_test.go
+++ b/e2e/common/rest_test.go
@@ -19,7 +19,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package e2e
+package common
import (
"bytes"
diff --git a/e2e/run_test.go b/e2e/common/run_test.go
similarity index 99%
rename from e2e/run_test.go
rename to e2e/common/run_test.go
index 186110b..96fd9a3 100644
--- a/e2e/run_test.go
+++ b/e2e/common/run_test.go
@@ -19,7 +19,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package e2e
+package common
import (
"os"
diff --git a/e2e/tekton_test.go b/e2e/common/tekton_test.go
similarity index 99%
copy from e2e/tekton_test.go
copy to e2e/common/tekton_test.go
index 6054900..f9ce39e 100644
--- a/e2e/tekton_test.go
+++ b/e2e/common/tekton_test.go
@@ -19,7 +19,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package e2e
+package common
import (
"testing"
diff --git a/e2e/uninstall_test.go b/e2e/common/uninstall_test.go
similarity index 99%
rename from e2e/uninstall_test.go
rename to e2e/common/uninstall_test.go
index 6c0bd4a..ea4fb3b 100644
--- a/e2e/uninstall_test.go
+++ b/e2e/common/uninstall_test.go
@@ -19,7 +19,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package e2e
+package common
import (
"testing"
diff --git a/e2e/upgrade_test.go b/e2e/common/upgrade_test.go
similarity index 99%
rename from e2e/upgrade_test.go
rename to e2e/common/upgrade_test.go
index 7c7ff47..c747fb9 100644
--- a/e2e/upgrade_test.go
+++ b/e2e/common/upgrade_test.go
@@ -19,7 +19,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package e2e
+package common
import (
"testing"
diff --git a/e2e/tekton_test.go b/e2e/knative/doc.go
similarity index 56%
rename from e2e/tekton_test.go
rename to e2e/knative/doc.go
index 6054900..5c024f6 100644
--- a/e2e/tekton_test.go
+++ b/e2e/knative/doc.go
@@ -19,26 +19,5 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package e2e
-
-import (
- "testing"
-
- . "github.com/apache/camel-k/e2e/support"
- . "github.com/onsi/gomega"
-)
-
-// TestTektonLikeBehavior verifies that the kamel binary can be invoked from within the Camel K image.
-// This feature is used in Tekton pipelines.
-func TestTektonLikeBehavior(t *testing.T) {
- WithNewTestNamespace(t, func(ns string) {
- Expect(CreateOperatorServiceAccount(ns)).Should(BeNil())
- Expect(CreateOperatorRole(ns)).Should(BeNil())
- Expect(CreateOperatorRoleBinding(ns)).Should(BeNil())
-
- Eventually(OperatorPod(ns)).Should(BeNil())
- Expect(CreateKamelPod(ns, "tekton-task", "install", "--skip-cluster-setup", "--force")).Should(BeNil())
-
- Eventually(OperatorPod(ns)).ShouldNot(BeNil())
- })
-}
+// Package knative contains Knative related e2e tests
+package knative
diff --git a/e2e/files/knative1.groovy b/e2e/knative/files/knative1.groovy
similarity index 100%
rename from e2e/files/knative1.groovy
rename to e2e/knative/files/knative1.groovy
diff --git a/e2e/files/knative2.groovy b/e2e/knative/files/knative2.groovy
similarity index 100%
rename from e2e/files/knative2.groovy
rename to e2e/knative/files/knative2.groovy
diff --git a/e2e/files/knative3.groovy b/e2e/knative/files/knative3.groovy
similarity index 100%
rename from e2e/files/knative3.groovy
rename to e2e/knative/files/knative3.groovy
diff --git a/e2e/files/knativech1.groovy b/e2e/knative/files/knativech1.groovy
similarity index 100%
rename from e2e/files/knativech1.groovy
rename to e2e/knative/files/knativech1.groovy
diff --git a/e2e/files/knativech2.groovy b/e2e/knative/files/knativech2.groovy
similarity index 100%
rename from e2e/files/knativech2.groovy
rename to e2e/knative/files/knativech2.groovy
diff --git a/e2e/files/knativeevt1.groovy b/e2e/knative/files/knativeevt1.groovy
similarity index 100%
rename from e2e/files/knativeevt1.groovy
rename to e2e/knative/files/knativeevt1.groovy
diff --git a/e2e/files/knativeevt2.groovy b/e2e/knative/files/knativeevt2.groovy
similarity index 100%
rename from e2e/files/knativeevt2.groovy
rename to e2e/knative/files/knativeevt2.groovy
diff --git a/e2e/files/knativegetpost1.groovy b/e2e/knative/files/knativegetpost1.groovy
similarity index 100%
rename from e2e/files/knativegetpost1.groovy
rename to e2e/knative/files/knativegetpost1.groovy
diff --git a/e2e/files/knativegetpost2.groovy b/e2e/knative/files/knativegetpost2.groovy
similarity index 100%
rename from e2e/files/knativegetpost2.groovy
rename to e2e/knative/files/knativegetpost2.groovy
diff --git a/e2e/files/knativemultihop1.groovy b/e2e/knative/files/knativemultihop1.groovy
similarity index 100%
rename from e2e/files/knativemultihop1.groovy
rename to e2e/knative/files/knativemultihop1.groovy
diff --git a/e2e/files/knativemultihop2.groovy b/e2e/knative/files/knativemultihop2.groovy
similarity index 100%
rename from e2e/files/knativemultihop2.groovy
rename to e2e/knative/files/knativemultihop2.groovy
diff --git a/e2e/files/knativemultihop3.groovy b/e2e/knative/files/knativemultihop3.groovy
similarity index 100%
rename from e2e/files/knativemultihop3.groovy
rename to e2e/knative/files/knativemultihop3.groovy
diff --git a/e2e/files/petstore-api.yaml b/e2e/knative/files/petstore-api.yaml
similarity index 100%
rename from e2e/files/petstore-api.yaml
rename to e2e/knative/files/petstore-api.yaml
diff --git a/e2e/files/petstore.groovy b/e2e/knative/files/petstore.groovy
similarity index 100%
rename from e2e/files/petstore.groovy
rename to e2e/knative/files/petstore.groovy
diff --git a/e2e/files/yaml.yaml b/e2e/knative/files/yaml.yaml
similarity index 100%
rename from e2e/files/yaml.yaml
rename to e2e/knative/files/yaml.yaml
diff --git a/e2e/knative_platform_test.go b/e2e/knative/knative_platform_test.go
similarity index 98%
rename from e2e/knative_platform_test.go
rename to e2e/knative/knative_platform_test.go
index f0d2cac..ad9f82e 100644
--- a/e2e/knative_platform_test.go
+++ b/e2e/knative/knative_platform_test.go
@@ -1,4 +1,4 @@
-// +build knative
+// +build integration
// To enable compilation of this file in Goland, go to "Settings -> Go -> Vendoring & Build Tags -> Custom Tags" and add "integration"
@@ -19,7 +19,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package e2e
+package knative
import (
"strings"
diff --git a/e2e/knative_test.go b/e2e/knative/knative_test.go
similarity index 99%
rename from e2e/knative_test.go
rename to e2e/knative/knative_test.go
index 5fee6e9..c8e79dc 100644
--- a/e2e/knative_test.go
+++ b/e2e/knative/knative_test.go
@@ -1,4 +1,4 @@
-// +build knative
+// +build integration
// To enable compilation of this file in Goland, go to "Settings -> Go -> Vendoring & Build Tags -> Custom Tags" and add "knative"
@@ -19,7 +19,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package e2e
+package knative
import (
"testing"
diff --git a/e2e/openapi_test.go b/e2e/knative/openapi_test.go
similarity index 98%
rename from e2e/openapi_test.go
rename to e2e/knative/openapi_test.go
index 95220ac..c9a3044 100644
--- a/e2e/openapi_test.go
+++ b/e2e/knative/openapi_test.go
@@ -1,4 +1,4 @@
-// +build knative
+// +build integration
// To enable compilation of this file in Goland, go to "Settings -> Go -> Vendoring & Build Tags -> Custom Tags" and add "knative"
@@ -19,7 +19,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package e2e
+package knative
import (
"testing"
diff --git a/e2e/support/test_staging_hooks.go b/e2e/support/test_staging_hooks.go
index 99816fc..31ffd57 100644
--- a/e2e/support/test_staging_hooks.go
+++ b/e2e/support/test_staging_hooks.go
@@ -1,4 +1,4 @@
-// +build integration knative
+// +build integration
// To enable compilation of this file in Goland, go to "Settings -> Go -> Vendoring & Build Tags -> Custom Tags" and add "integration"
diff --git a/e2e/support/test_support.go b/e2e/support/test_support.go
index 4ae154a..c622164 100644
--- a/e2e/support/test_support.go
+++ b/e2e/support/test_support.go
@@ -1,4 +1,4 @@
-// +build integration knative
+// +build integration
// To enable compilation of this file in Goland, go to "Settings -> Go -> Vendoring & Build Tags -> Custom Tags" and add "integration"
@@ -37,7 +37,7 @@ import (
rbacv1 "k8s.io/api/rbac/v1"
- "github.com/apache/camel-k/e2e/util"
+ "github.com/apache/camel-k/e2e/support/util"
"github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/client"
"github.com/apache/camel-k/pkg/cmd"
diff --git a/e2e/util/dump.go b/e2e/support/util/dump.go
similarity index 99%
rename from e2e/util/dump.go
rename to e2e/support/util/dump.go
index afaabdb..35a0b9e 100644
--- a/e2e/util/dump.go
+++ b/e2e/support/util/dump.go
@@ -1,3 +1,5 @@
+// +build integration
+
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
diff --git a/e2e/util/log_scanner.go b/e2e/support/util/log_scanner.go
similarity index 98%
rename from e2e/util/log_scanner.go
rename to e2e/support/util/log_scanner.go
index 34a148f..65004eb 100644
--- a/e2e/util/log_scanner.go
+++ b/e2e/support/util/log_scanner.go
@@ -1,3 +1,5 @@
+// +build integration
+
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
diff --git a/e2e/util/temp_file.go b/e2e/support/util/temp_file.go
similarity index 98%
rename from e2e/util/temp_file.go
rename to e2e/support/util/temp_file.go
index 4448485..e1ac8b5 100644
--- a/e2e/util/temp_file.go
+++ b/e2e/support/util/temp_file.go
@@ -1,3 +1,5 @@
+// +build integration
+
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
diff --git a/script/Makefile b/script/Makefile
index 77ae2d3..7edb1f2 100644
--- a/script/Makefile
+++ b/script/Makefile
@@ -125,12 +125,16 @@ test: build
go test ./...
test-integration: build
- STAGING_RUNTIME_REPO="$(STAGING_RUNTIME_REPO)" go test -timeout 60m -v ./e2e -tags=integration
- #go test -timeout 60m -v ./e2e -tags=integration
+ STAGING_RUNTIME_REPO="$(STAGING_RUNTIME_REPO)" go test -timeout 60m -v ./e2e/common -tags=integration
+ #go test -timeout 60m -v ./e2e/common -tags=integration
test-knative: build
- STAGING_RUNTIME_REPO="$(STAGING_RUNTIME_REPO)" go test -timeout 60m -v ./e2e -tags=knative
- #go test -timeout 60m -v ./e2e -tags=knative
+ STAGING_RUNTIME_REPO="$(STAGING_RUNTIME_REPO)" go test -timeout 60m -v ./e2e/knative -tags=integration
+ #go test -timeout 60m -v ./e2e/knative -tags=integration
+
+test-builder: build
+ STAGING_RUNTIME_REPO="$(STAGING_RUNTIME_REPO)" go test -timeout 60m -v ./e2e/builder -tags=integration
+ #go test -timeout 60m -v ./e2e/builder -tags=integration
build-kamel:
go build $(GOFLAGS) -o kamel ./cmd/kamel/*.go
@@ -144,7 +148,9 @@ build-olm:
./script/build_olm.sh $(VERSION)
build-compile-integration-tests:
- go test -c -tags="integration knative" ./e2e/*.go
+ go test -c -tags="integration" ./e2e/common
+ go test -c -tags="integration" ./e2e/knative
+ go test -c -tags="integration" ./e2e/builder
clean:
# disable gomodules when executing go clean: