Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extended: debug failed tag update #10664

Merged
merged 1 commit into from
Aug 26, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions test/extended/deployments/deployments.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
o "github.com/onsi/gomega"

kapi "k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/errors"
"k8s.io/kubernetes/pkg/labels"
"k8s.io/kubernetes/pkg/util/wait"
e2e "k8s.io/kubernetes/test/e2e/framework"
Expand Down Expand Up @@ -260,8 +261,21 @@ var _ = g.Describe("deploymentconfigs", func() {
o.Expect(waitForLatestCondition(oc, name, deploymentRunTimeout, deploymentReachedCompletion)).NotTo(o.HaveOccurred())

g.By("verifying the post deployment action happened: tag is set")
out, err := oc.Run("get").Args("istag/sample-stream:deployed").Output()
o.Expect(err).NotTo(o.HaveOccurred())
var out string
pollErr := wait.PollImmediate(100*time.Millisecond, 10*time.Second, func() (bool, error) {
out, err = oc.Run("get").Args("istag/sample-stream:deployed").Output()
if errors.IsNotFound(err) {
return false, nil
}
if err != nil {
return false, err
}
return true, nil
})
if pollErr == wait.ErrWaitTimeout {
pollErr = err
}
o.Expect(pollErr).NotTo(o.HaveOccurred())

if !strings.Contains(out, "origin-pod") {
err = fmt.Errorf("expected %q to be part of the image reference in %q", "origin-pod", out)
Expand Down
2 changes: 1 addition & 1 deletion test/extended/testdata/tag-images-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spec:
recreateParams:
timeoutSeconds: 20
post:
failurePolicy: Ignore
failurePolicy: Abort
tagImages:
- containerName: sample-name
to:
Expand Down