You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by as...@apache.org on 2021/04/02 10:59:51 UTC
[camel-k] 07/07: test: Assert no dependencies are downloaded from
mirrored repository
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
commit 2acb9505f89e166170796739d7dd49dd9ea2b465
Author: Antonin Stefanutti <an...@stefanutti.fr>
AuthorDate: Fri Apr 2 10:02:40 2021 +0200
test: Assert no dependencies are downloaded from mirrored repository
---
e2e/common/build/maven_ca_secret_test.go | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/e2e/common/build/maven_ca_secret_test.go b/e2e/common/build/maven_ca_secret_test.go
index 67656a3..259592a 100644
--- a/e2e/common/build/maven_ca_secret_test.go
+++ b/e2e/common/build/maven_ca_secret_test.go
@@ -400,8 +400,8 @@ ProxyPreserveHost On
// Install Camel K with the Maven Central Nexus proxy and the corresponding Maven CA secret
Expect(Kamel("install", "-n", ns,
- "--maven-repository", fmt.Sprintf(`https://%s/repository/maven-public/@id=central`, hostname),
- "--maven-repository", fmt.Sprintf(`https://%s/repository/apache-snapshots/@id=apache-snapshots@snapshots`, hostname),
+ "--maven-repository", fmt.Sprintf(`https://%s/repository/maven-public/@id=central-internal@mirrorOf=central`, hostname),
+ "--maven-repository", fmt.Sprintf(`https://%s/repository/apache-snapshots/@id=apache-snapshots@snapshots@noreleases`, hostname),
"--maven-ca-secret", secret.Name+"/"+corev1.TLSCertKey,
).Execute()).To(Succeed())
@@ -415,6 +415,15 @@ ProxyPreserveHost On
Eventually(IntegrationCondition(ns, name, v1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionTrue))
Eventually(IntegrationLogs(ns, name), TestTimeoutShort).Should(ContainSubstring("Magicstring!"))
+ // Assert no dependencies have been downloaded from the Maven central repository
+ // Note: this should be adapted for the Pod build strategy
+ pod := OperatorPod(ns)()
+ Expect(pod).NotTo(BeNil())
+
+ logs := Logs(ns, pod.Name, corev1.PodLogOptions{})()
+ Expect(logs).NotTo(BeEmpty())
+ Expect(logs).NotTo(ContainSubstring("Downloaded from central:"))
+
// Clean up
Expect(Kamel("delete", "--all", "-n", ns).Execute()).To(Succeed())
})