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

Add test case for description being present in search result #7141

Merged
merged 3 commits into from
Aug 3, 2020

Conversation

rhafer
Copy link
Contributor

@rhafer rhafer commented Jul 29, 2020

Test for a specific static image and match the description to avoid
regression like #7131

Also apply the fix above to the api implementation.

Signed-off-by: Ralf Haferkamp [email protected]

@saschagrunert
Copy link
Member

/cherry-pick v2.0

@saschagrunert
Copy link
Member

/cherry-pick v2.0

Did you think about enabling the cherry-pick plugin for this repo?

@vrothberg
Copy link
Member

/cherry-pick v2.0

Did you think about enabling the cherry-pick plugin for this repo?

We usually use labels but it seems like a nice to have for patches that apply cleanly. @mheon WDYT?

Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

LGTM

Comment on lines 108 to 113
for _, v := range lines {
match, _ = regexp.MatchString(`^quay.io\s+quay.io/libpod/whalesay\s+Static image used for automated testing.+$`, v)
if match {
break
}
}
Copy link
Member

Choose a reason for hiding this comment

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

Can we use a multi-line regex here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@mheon
Copy link
Member

mheon commented Jul 30, 2020

@vrothberg @saschagrunert We do want to do some additional CI maintenance at some point (to add flagging to PRs that change the API), so we can investigate adding the cherry-pick functionality when we're doing that.

@rhafer rhafer force-pushed the image_descr_test branch from 43c417c to e980bd2 Compare July 30, 2020 15:39
Copy link
Member

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

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

LGTM

@rhafer
Copy link
Contributor Author

rhafer commented Jul 31, 2020

Hm, tests are still failing. But it's now a different testcase. Seems that podman-remote search is broken with --no-trunc

@rhatdan
Copy link
Member

rhatdan commented Jul 31, 2020

/lgtm
/approve
/hold

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 31, 2020
@openshift-ci-robot openshift-ci-robot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jul 31, 2020
@rhafer rhafer force-pushed the image_descr_test branch from 1e74275 to 1a06fa2 Compare July 31, 2020 11:27
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Jul 31, 2020
@mheon
Copy link
Member

mheon commented Jul 31, 2020

Needs to rebase to fix the Ubuntu tests

rhafer added 3 commits July 31, 2020 15:39
Test for a specific static image and match the description to avoid
regression like containers#7131

Signed-off-by: Ralf Haferkamp <[email protected]>
`podman image search` returned wrong results for the image "Description" as
it was mapped to the wrong field ("ID") in the search results.
Basically cherry-picked into the api from
commit cf5c63b.

Signed-off-by: Ralf Haferkamp <[email protected]>
The HTTP API for image search was still lacking support of the NoTrunc
parameter.

Signed-off-by: Ralf Haferkamp <[email protected]>
@rhafer rhafer force-pushed the image_descr_test branch from 1a06fa2 to 54256fb Compare July 31, 2020 13:40
@TomSweeneyRedHat
Copy link
Member

LGTM

@mheon
Copy link
Member

mheon commented Jul 31, 2020

/lgtm

Will remove hold once things go green

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 31, 2020
Copy link
Member

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

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

Just got one single nit. @mheon feel free to lift the hold if it does not hurt. LGTM

search := podmanTest.Podman([]string{"search", "quay.io/libpod/whalesay"})
search.WaitWithDefaultTimeout()
Expect(search.ExitCode()).To(Equal(0))
output := fmt.Sprintf("%s", search.Out.Contents())
Copy link
Member

@saschagrunert saschagrunert Jul 31, 2020

Choose a reason for hiding this comment

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

nit: we could avoid the Sprintf here right?

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rhafer, rhatdan, saschagrunert

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@rhatdan
Copy link
Member

rhatdan commented Aug 2, 2020

@rhafer Could you cleanup the sprintf problem, and then we will merge.

@saschagrunert
Copy link
Member

@rhafer Could you cleanup the sprintf problem, and then we will merge.

Ralf is on vacation for the next 3 weeks, I can follow-up with the snprintf nit in another PR.

Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

LGTM

@vrothberg
Copy link
Member

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 3, 2020
@vrothberg
Copy link
Member

@rhafer Could you cleanup the sprintf problem, and then we will merge.

Ralf is on vacation for the next 3 weeks, I can follow-up with the snprintf nit in another PR.

SGTM, thanks!

@openshift-merge-robot openshift-merge-robot merged commit bfd3454 into containers:master Aug 3, 2020
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 24, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants