Skip to content

Commit

Permalink
Adapt expectations to account for --default-repo=gcr.io/k8s-skaffold …
Browse files Browse the repository at this point in the history
…in integration tests

Signed-off-by: Cornelius Weig <[email protected]>
  • Loading branch information
corneliusweig committed Dec 22, 2019
1 parent f0234af commit 4f6807d
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion integration/build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (
"github.com/GoogleContainerTools/skaffold/pkg/skaffold/util"
)

const imageName = "simple-build:"
const imageName = "gcr.io/k8s-skaffold/simple-build:"

func TestBuild(t *testing.T) {
if testing.Short() || RunOnGCP() {
Expand Down
2 changes: 1 addition & 1 deletion integration/cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func TestCacheAPITriggers(t *testing.T) {
defer shutdown()

waitForEvent(t, entries, func(e *proto.LogEntry) bool {
return e.GetEvent().GetBuildEvent().GetArtifact() == "gcr.io/k8s-skaffold/skaffold-example"
return e.GetEvent().GetBuildEvent().GetArtifact() == "skaffold-example"
})
}

Expand Down
6 changes: 3 additions & 3 deletions integration/deploy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ func TestBuildDeploy(t *testing.T) {

var webTag, appTag string
for _, a := range buildArtifacts.Builds {
if a.ImageName == "gcr.io/k8s-skaffold/leeroy-web" {
if a.ImageName == "leeroy-web" {
webTag = a.Tag
}
if a.ImageName == "gcr.io/k8s-skaffold/leeroy-app" {
if a.ImageName == "leeroy-app" {
appTag = a.Tag
}
}
Expand Down Expand Up @@ -135,7 +135,7 @@ func TestDeployWithInCorrectConfig(t *testing.T) {
output, err := skaffold.Deploy().InDir("examples/getting-started").InNs(ns.Name).RunWithCombinedOutput(t)
if err == nil {
t.Errorf("expected to see an error since not every image tag is provided: %s", output)
} else if !strings.Contains(string(output), "no tag provided for image [gcr.io/k8s-skaffold/skaffold-example]") {
} else if !strings.Contains(string(output), "no tag provided for image [skaffold-example]") {
t.Errorf("failed without saying the reason: %s", output)
}
}
2 changes: 1 addition & 1 deletion integration/dev_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func TestDevAPITriggers(t *testing.T) {
// Ensure we see a build triggered in the event log
err := wait.PollImmediate(time.Millisecond*500, 2*time.Minute, func() (bool, error) {
e := <-entries
return e.GetEvent().GetBuildEvent().GetArtifact() == "gcr.io/k8s-skaffold/test-dev", nil
return e.GetEvent().GetBuildEvent().GetArtifact() == "test-dev", nil
})
failNowIfError(t, err)

Expand Down
2 changes: 1 addition & 1 deletion integration/helm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func TestHelmDeploy(t *testing.T) {

// To fix #1823, we make use of env variable templating for release name
env := []string{fmt.Sprintf("TEST_NS=%s", ns.Name)}
skaffold.Deploy("--images", "gcr.io/k8s-skaffold/skaffold-helm").InDir("testdata/helm").InNs(ns.Name).WithEnv(env).RunOrFail(t)
skaffold.Deploy("--images", "skaffold-helm").InDir("testdata/helm").InNs(ns.Name).WithEnv(env).RunOrFail(t)

// check if labels are set correctly for deploment
dep := client.GetDeployment("skaffold-helm-" + ns.Name)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ profiles:
tagPolicy:
gitCommit: {}
cluster:
pullSecretName: kaniko-secret
pullSecretName: kaniko-secret
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: skaffold/v1beta13
kind: Config
build:
artifacts:
- image: main-config
- image: gcr.io/k8s-skaffold/main-config
deploy:
kubectl:
manifests:
Expand All @@ -11,7 +11,7 @@ profiles:
- name: oncluster
build:
artifacts:
- image: main-config-pipeline
- image: gcr.io/k8s-skaffold/main-config-pipeline
context: .
kaniko:
buildContext:
Expand Down

0 comments on commit 4f6807d

Please sign in to comment.