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 33c8110b40d8077f49f48e606fd76ba317b25bd6
Author: John Poth <[email protected]>
AuthorDate: Tue May 25 16:32:33 2021 +0200

    chore #2327: Add E2E test
---
 e2e/common/build/maven_repository_test.go | 51 +++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/e2e/common/build/maven_repository_test.go 
b/e2e/common/build/maven_repository_test.go
new file mode 100644
index 0000000..44d5af1
--- /dev/null
+++ b/e2e/common/build/maven_repository_test.go
@@ -0,0 +1,51 @@
+// +build integration
+
+// To enable compilation of this file in Goland, go to "Settings -> Go -> 
Vendoring & Build Tags -> Custom Tags" and add "integration"
+
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package build
+
+import (
+       "testing"
+
+       . "github.com/onsi/gomega"
+
+       v1 "k8s.io/api/core/v1"
+
+       . "github.com/apache/camel-k/e2e/support"
+       camelv1 "github.com/apache/camel-k/pkg/apis/camel/v1"
+)
+
+func TestRunExtraRepository(t *testing.T) {
+       WithNewTestNamespace(t, func(ns string) {
+               Expect(Kamel("install", "-n", ns).Execute()).To(Succeed())
+
+               name := "java"
+               Expect(Kamel("run", "-n", ns, "files/Java.java",
+                       "--maven-repository", 
"https://maven.repository.redhat.com/ga@id=redhat";,
+                       "--dependency", 
"mvn:jakarta.annotation:jakarta.annotation-api:1.3.5.redhat-00002",
+                       "--name", name,
+               ).Execute()).To(Succeed())
+
+               Eventually(IntegrationPodPhase(ns, name), 
TestTimeoutMedium).Should(Equal(v1.PodRunning))
+               Eventually(IntegrationCondition(ns, name, 
camelv1.IntegrationConditionReady), 
TestTimeoutShort).Should(Equal(v1.ConditionTrue))
+               Eventually(IntegrationLogs(ns, name), 
TestTimeoutShort).Should(ContainSubstring("Magicstring!"))
+               Expect(Kamel("delete", "--all", "-n", 
ns).Execute()).To(Succeed())
+       })
+}

Reply via email to