Skip to content

Adding extended tests for buildconfig postCommit #12047

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

Merged
merged 1 commit into from
Nov 30, 2016
Merged

Adding extended tests for buildconfig postCommit #12047

merged 1 commit into from
Nov 30, 2016

Conversation

jupierce
Copy link
Contributor

@jupierce
Copy link
Contributor Author

[testextended][extended:core(testing build configuration hooks)]

Copy link
Contributor

@bparees bparees left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also can we remove the existing tests in test/cmd/builds.sh? they seem redundant since you're doing patch here.

oc.Run("create").Args("-f", buildFixture).Execute()

g.By("waiting for istag to initialize")
wait.Poll(time.Second, 60*time.Second, func() (bool, error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use WaitForAnImageStreamTag()

err := oc.Run("patch").Args("bc/busybox", "-p", "{\"spec\":{\"postCommit\":{\"script\":\"false\",\"command\":null}}}").Execute()
o.Expect(err).NotTo(o.HaveOccurred())
br, _ := exutil.StartBuildAndWait(oc, "busybox")
br.AssertFailure()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs to confirm the failure was due to the post commit hook running and failing.

err := oc.Run("patch").Args("bc/busybox", "-p", "{\"spec\":{\"postCommit\":{\"command\":[\"sh\",\"-c\"],\"args\":[\"false\"],\"script\":\"\"}}}").Execute()
o.Expect(err).NotTo(o.HaveOccurred())
br, _ := exutil.StartBuildAndWait(oc, "busybox")
br.AssertFailure()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

err := oc.Run("patch").Args("bc/busybox", "-p", "{\"spec\":{\"postCommit\":{\"args\":[\"false\"],\"command\":null,\"script\":\"\"}}}").Execute()
o.Expect(err).NotTo(o.HaveOccurred())
br, _ := exutil.StartBuildAndWait(oc, "busybox")
br.AssertFailure()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

@jupierce
Copy link
Contributor Author

@bparees I didn't want to remove them without discussion since having faster lightweight tests is nice for unit testing. But all they do, in effect, is validate schema & oc-patch. Very low value -- so I'll remove them in the next push unless I hear otherwise.

@bparees
Copy link
Contributor

bparees commented Nov 29, 2016

@bparees I didn't want to remove them without discussion since having faster lightweight tests is nice for unit testing. But all they do, in effect, is validate schema & oc-patch. Very low value -- so I'll remove them in the next push unless I hear otherwise.

yeah, let's get rid of them. We need to start culling our tests to get rid of overlap and this feels like low hanging fruit.

@openshift-bot
Copy link
Contributor

Evaluated for origin testextended up to c74d91c

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/testextended SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin_extended/841/) (Base Commit: 2eb8b82) (Extended Tests: core(testing build configuration hooks))

@jupierce
Copy link
Contributor Author

@bparees Tests are passing. ptal.

@bparees
Copy link
Contributor

bparees commented Nov 29, 2016

lgtm [merge]

@bparees bparees self-assigned this Nov 29, 2016
@openshift-bot
Copy link
Contributor

[Test]ing while waiting on the merge queue

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to c74d91c

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/11786/) (Base Commit: f966ae2)

@bparees
Copy link
Contributor

bparees commented Nov 30, 2016 via email

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to c74d91c

@openshift-bot
Copy link
Contributor

openshift-bot commented Nov 30, 2016

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/11800/) (Base Commit: ae9c732) (Image: devenv-rhel7_5441)

@openshift-bot openshift-bot merged commit 2fefe09 into openshift:master Nov 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants