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 2019/11/28 07:40:53 UTC
[camel-k] 06/07: Fix #613: Add integration test with github packages
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 3c165cb06ec50be4706f3a3522c59806d049b708
Author: Nicola Ferraro <ni...@gmail.com>
AuthorDate: Tue Nov 26 15:32:50 2019 +0100
Fix #613: Add integration test with github packages
---
e2e/docker_hub_test.go | 2 +-
e2e/{docker_hub_test.go => github_packages_test.go} | 17 +++++++++--------
pkg/trait/trait_catalog.go | 2 +-
3 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/e2e/docker_hub_test.go b/e2e/docker_hub_test.go
index a5e8ec2..4e5d4f2 100644
--- a/e2e/docker_hub_test.go
+++ b/e2e/docker_hub_test.go
@@ -30,7 +30,7 @@ import (
v1 "k8s.io/api/core/v1"
)
-func TestRunWithDockerHubRepo(t *testing.T) {
+func TestRunWithDockerHubRegistry(t *testing.T) {
user := os.Getenv("TEST_DOCKER_HUB_USERNAME")
pass := os.Getenv("TEST_DOCKER_HUB_PASSWORD")
if user == "" || pass == "" {
diff --git a/e2e/docker_hub_test.go b/e2e/github_packages_test.go
similarity index 80%
copy from e2e/docker_hub_test.go
copy to e2e/github_packages_test.go
index a5e8ec2..fa31782 100644
--- a/e2e/docker_hub_test.go
+++ b/e2e/github_packages_test.go
@@ -30,18 +30,19 @@ import (
v1 "k8s.io/api/core/v1"
)
-func TestRunWithDockerHubRepo(t *testing.T) {
- user := os.Getenv("TEST_DOCKER_HUB_USERNAME")
- pass := os.Getenv("TEST_DOCKER_HUB_PASSWORD")
- if user == "" || pass == "" {
- t.Skip("no docker hub credentials: skipping")
+func TestRunWithGithubPackagesRegistry(t *testing.T) {
+ user := os.Getenv("TEST_GITHUB_PACKAGES_USERNAME")
+ pass := os.Getenv("TEST_GITHUB_PACKAGES_PASSWORD")
+ repo := os.Getenv("TEST_GITHUB_PACKAGES_REPO")
+ if user == "" || pass == "" || repo == "" {
+ t.Skip("no github packages data: skipping")
} else {
withNewTestNamespace(func(ns string) {
RegisterTestingT(t)
Expect(kamel("install",
"-n", ns,
- "--registry", "docker.io",
- "--organization", user,
+ "--registry", "docker.pkg.github.com",
+ "--organization", repo,
"--registry-auth-username", user,
"--registry-auth-password", pass,
"--cluster-type", "kubernetes").
@@ -50,7 +51,7 @@ func TestRunWithDockerHubRepo(t *testing.T) {
Expect(kamel("run", "-n", ns, "files/groovy.groovy").Execute()).Should(BeNil())
Eventually(integrationPodPhase(ns, "groovy"), 5*time.Minute).Should(Equal(v1.PodRunning))
Eventually(integrationLogs(ns, "groovy"), 1*time.Minute).Should(ContainSubstring("Magicstring!"))
- Eventually(integrationPodImage(ns, "groovy"), 1*time.Minute).Should(HavePrefix("docker.io"))
+ Eventually(integrationPodImage(ns, "groovy"), 1*time.Minute).Should(HavePrefix("docker.pkg.github.com"))
Expect(kamel("delete", "--all", "-n", ns).Execute()).Should(BeNil())
})
diff --git a/pkg/trait/trait_catalog.go b/pkg/trait/trait_catalog.go
index 57c5880..1f3c1d1 100644
--- a/pkg/trait/trait_catalog.go
+++ b/pkg/trait/trait_catalog.go
@@ -54,7 +54,7 @@ type Catalog struct {
tProbes Trait
tQuarkus Trait
tContainer Trait
- tPullSecret Trait
+ tPullSecret Trait
}
// NewCatalog creates a new trait Catalog