rm-gocheck: Not(Matches) -> !cmp.Regexp

sed -E -i 's#\bassert\.Assert\(c, (.*), checker\.Not\(checker\.Matches\), (.*)\)#assert.Assert(c, !is.Regexp("^"+\2+"$", \1)().Success())#g' \
-- "integration-cli/docker_cli_images_test.go"

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 10208e4d60)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Tibor Vass 2019-09-09 21:05:56 +00:00 committed by Sebastiaan van Stijn
parent 819baeb430
commit b3d02e7f3c
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -94,7 +94,7 @@ func (s *DockerSuite) TestImagesFilterLabelMatch(c *testing.T) {
out = strings.TrimSpace(out)
assert.Assert(c, out, checker.Matches, fmt.Sprintf("[\\s\\w:]*%s[\\s\\w:]*", image1ID))
assert.Assert(c, out, checker.Matches, fmt.Sprintf("[\\s\\w:]*%s[\\s\\w:]*", image2ID))
assert.Assert(c, out, checker.Not(checker.Matches), fmt.Sprintf("[\\s\\w:]*%s[\\s\\w:]*", image3ID))
assert.Assert(c, !is.Regexp("^"+fmt.Sprintf("[\\s\\w:]*%s[\\s\\w:]*", image3ID)+"$", out)().Success())
out, _ = dockerCmd(c, "images", "--no-trunc", "-q", "-f", "label=match=me too")
out = strings.TrimSpace(out)