Skip to content

Add tests for https://github.com/openshift/origin/issues/10402 - #10622

Closed
sgallagher wants to merge 1 commit into
openshift:masterfrom
sgallagher:image-tag-generation-wip
Closed

sgallagher wants to merge 1 commit into
openshift:masterfrom
sgallagher:image-tag-generation-wip

Conversation

@sgallagher

Copy link
Copy Markdown
Contributor

Proves that generation is always increased when tags are updated.

Signed-off-by: Stephen Gallagher [email protected]

@sgallagher

Copy link
Copy Markdown
Contributor Author

@mfojtik This test works, but because there is apparently a settling time for the status contents, I temporarily added a five-second sleep (which is overkill at least on my system). I'm not sure how to get os::cmd::try_until_success to deal with something that needs to compare the output with a known value before treating it as success or failure; I've been banging my head against that for the last two hours.

So now I'm just posting what I have and hoping you can help me get across the finish line on this.

@sgallagher

Copy link
Copy Markdown
Contributor Author

[test]

@liggitt

liggitt commented Aug 25, 2016

Copy link
Copy Markdown
Contributor

capture the value you want it to equal, then try_until_text?

Comment thread test/cmd/images_tests.sh Outdated

# https://github.com/openshift/origin/issues/10402
# Make latest a --reference to 8.1
os::cmd::expect_success 'oc tag --source=docker $reference_81 --reference wildfly:latest'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

os::cmd::expect_success "oc tag --source=docker '${reference_81}' --reference wildfly:latest"
                        ^                       ^ ^            ^^                           ^

Proves that generation is always increased when tags are updated.

Signed-off-by: Stephen Gallagher <[email protected]>
@sgallagher
sgallagher force-pushed the image-tag-generation-wip branch from 52ed102 to c603b8d Compare August 26, 2016 20:38
@sgallagher

Copy link
Copy Markdown
Contributor Author

@stevekuznetsov @liggitt OK, I think I figured out how to avoid those sleeps (and I fixed the minor issues Steve identified as well). PTAL

@sgallagher sgallagher changed the title [WIP] Add tests for https://github.com/openshift/origin/issues/10402 Add tests for https://github.com/openshift/origin/issues/10402 Aug 26, 2016
@openshift-bot

Copy link
Copy Markdown
Contributor

Evaluated for origin test up to c603b8d

Comment thread test/cmd/images_tests.sh
# Make latest a --reference to 8.1
os::cmd::expect_success "oc tag --source=docker '${reference_81}' --reference wildfly:latest"
reference_spec_tag_generation="$(oc get imagestreams/wildfly --template='{{range .spec.tags}}{{ if eq .name "latest"}}{{ .generation }}{{end}}{{end}}')"
os::cmd::expect_success 'test $reference_spec_tag_generation -gt $orig_spec_tag_generation'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Previous comment seems to have gotten lost: #10622 (comment)

@openshift-bot

Copy link
Copy Markdown
Contributor

zhaosijun pushed a commit to zhaosijun/origin that referenced this pull request Aug 27, 2016
@openshift-bot openshift-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 26, 2016
@openshift-bot openshift-bot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Oct 24, 2016
@openshift-bot openshift-bot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Nov 3, 2016
@openshift-bot openshift-bot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Dec 6, 2016
@openshift-bot openshift-bot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jan 17, 2017
@openshift-bot openshift-bot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jan 21, 2017
@openshift-bot openshift-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 23, 2017
@openshift-bot

openshift-bot commented Feb 23, 2017 •

Copy link
Copy Markdown
Contributor

Origin Action Required: Pull request cannot be automatically merged, please rebase your branch from latest HEAD and push again

@openshift-bot openshift-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. priority/P2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants