-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
test, manifest: test push retry #20242
Conversation
Signed-off-by: Aditya R <[email protected]>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: flouthoc The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
3e57e66
to
e07aae8
Compare
test/e2e/manifest_test.go
Outdated
push := podmanTest.Podman([]string{"manifest", "push", "--all", "--tls-verify=false", "--remove-signatures", "foo", "localhost:7000/bogus"}) | ||
push.WaitWithDefaultTimeout() | ||
Expect(push).Should(Exit(1)) | ||
Expect(push.ErrorToString()).To(ContainSubstring("Failed, retrying in 1s ... (1/3).")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this is correct way to capture warnings before error ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that looks good to me. Any chance we can avoid the 3 seconds delay in the test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM also. Strictly speaking, that doesn't actually confirm that there was a retry, so something like this would be more confidence-inspiring:
Expect(push.ErrorToString()).To(MatchRegexp("Copying blob.*Failed, retrying in 1s \\.\\.\\. \\(1/3\\).*Copying blob.*Failed, retrying in 2s"))
...but this is way in the weeds. I don't see a realistic way for "Failed, retrying" to appear but the retry itself not to happen.
Thank you for remembering to add a test!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@edsantiago thanks I'll amend, could you let me know why current warning catch worked in some tests and failed in others ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh! Because remote. You'll need to SkipIfRemote()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good moment to remind everyone of my greasemonkey Cirrus colorizer. Look how easy it is to find the common element (pink) in this results list:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah warnings are not relayed in remote setup. @edsantiago thanks for pointing amended the test now.
e07aae8
to
9b088ea
Compare
Test: containers/common#1666 Signed-off-by: Aditya R <[email protected]>
9b088ea
to
b576b79
Compare
LGTM |
/lgtm |
Test: containers/common#1666