Skip to content

vendor containers/image#226

Merged
runcom merged 1 commit intocontainers:masterfrom
runcom:fix-copy-test-manlist
Oct 10, 2016
Merged

vendor containers/image#226
runcom merged 1 commit intocontainers:masterfrom
runcom:fix-copy-test-manlist

Conversation

@runcom
Copy link
Member

@runcom runcom commented Oct 6, 2016

specifically containers/image#115 and also add an integration test

Signed-off-by: Antonio Murdaca runcom@redhat.com

@runcom
Copy link
Member Author

runcom commented Oct 6, 2016

@mtrmac PTAL

@runcom
Copy link
Member Author

runcom commented Oct 6, 2016

I think it's time to setup the schema 1 registry in tests :) I'll do it

@runcom runcom force-pushed the fix-copy-test-manlist branch 2 times, most recently from 58b5ced to c7b972b Compare October 6, 2016 16:51
@mtrmac
Copy link
Contributor

mtrmac commented Oct 6, 2016

If it’s all the same to you, I’d prefer running the tests against a v2 registry with s2; s1 images’ signatures eventually should break with fixed s1 upload (#88), so converting most of the tests from Docker Hub estesp (s1+s2+list) against OpenShift to s2 against v2 registry would be nicer.

@runcom
Copy link
Member Author

runcom commented Oct 6, 2016

If it’s all the same to you, I’d prefer running the tests against a v2 registry with s2; s1 images’ signatures eventually should break with fixed s1 upload (#88), so converting most of the tests from Docker Hub estesp (s1+s2+list) against OpenShift to s2 against v2 registry would be nicer.

wait, v2s2 broke something in openshift here, I'll revert some changes and you can see

@runcom runcom force-pushed the fix-copy-test-manlist branch from c7b972b to 682236a Compare October 6, 2016 17:01
@runcom
Copy link
Member Author

runcom commented Oct 6, 2016

@mtrmac do you know why the current test with docker://busybox:latest which is v2s2 will make atomic registry fails with 500 when uploading the image there?

@mtrmac
Copy link
Contributor

mtrmac commented Oct 6, 2016

Atomic Registry by default refuses to accept s2. https://github.com/mtrmac/skopeo/tree/docker-push-to-tag enables that, but then we are running tests in a non-default configuration, not a great idea.

That’s why I was suggesting a docker/distribution registry + s2, instead of Atomic. (And why this is so much work.)

@runcom
Copy link
Member Author

runcom commented Oct 6, 2016

To summarize, you want that test to push the image to an in-test docker/distribution V2 registry, instead of the atomic registry, right?

@mtrmac
Copy link
Contributor

mtrmac commented Oct 6, 2016

At least TestCopySignatures, yes; perhaps others may be needed. There should still be something testing against the Atomic Registry.

@runcom
Copy link
Member Author

runcom commented Oct 6, 2016

Right, we can find an s1 image to still test something for the atomic registry, fine. I'll finish this tomorrow morning. The v2s2 registry is already setup in the test infra so it shouldn't be that hard I hope.

@mtrmac
Copy link
Contributor

mtrmac commented Oct 6, 2016

Yes, at least TestCopyDockerSigstore is already using it.

@runcom runcom force-pushed the fix-copy-test-manlist branch 3 times, most recently from 0518f8f to 5036ee2 Compare October 7, 2016 17:13
@runcom
Copy link
Member Author

runcom commented Oct 7, 2016

@mtrmac tests fixed, PTAL

Copy link
Contributor

@mtrmac mtrmac left a comment

Choose a reason for hiding this comment

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

Well, this does work, and most importantly it does fix the test breakage.

Please consider using CopySuite.registry instead of embedding SkopeoSuite; but if you want to merge the code as is, that’s OK as well.

}

func (s *CopySuite) SetUpTest(c *check.C) {
s.ss.SetUpTest(c)
Copy link
Contributor

Choose a reason for hiding this comment

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

SkopeoSuite is setting up a fresh set of five registries for every single test. That seems a fair bit of unnecessary overhead, especially when CopySuite.SetUpSuite is already setting up a v2 registry.

Copy link
Member Author

Choose a reason for hiding this comment

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

fair.

// FIXME: It would be nice to use one of the local Docker registries instead of neeeding an Internet connection.
// "pull": docker: → dir:
assertSkopeoSucceeds(c, "", "copy", "docker://estesp/busybox:latest", "dir:"+dir1)
assertSkopeoSucceeds(c, "", "copy", "docker://estesp/busybox:amd64", "dir:"+dir1)
Copy link
Contributor

Choose a reason for hiding this comment

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

Heh :) Nice and small.

@runcom runcom force-pushed the fix-copy-test-manlist branch from 5036ee2 to d6669d6 Compare October 10, 2016 17:22
@runcom
Copy link
Member Author

runcom commented Oct 10, 2016

Should be good to go if tests agree @mtrmac

// "pull": docker: → dir:
assertSkopeoSucceeds(c, "", "copy", "docker://busybox", "dir:"+dir1)
// "push": dir: → docker(v2s2):
assertSkopeoSucceeds(c, "", "--tls-verify=false", "--debug", "copy", "dir:"+dir1, ourRegistry+"busybox:unsigned")
Copy link
Contributor

Choose a reason for hiding this comment

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

This addresses the FIXME: Also check pushing to docker:// at line 152, which can now be removed.

Copy link
Member Author

@runcom runcom Oct 10, 2016

Choose a reason for hiding this comment

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

Ack, fixed

Copy link
Contributor

@mtrmac mtrmac left a comment

Choose a reason for hiding this comment

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

Thanks! Please merge if tests pass.

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
@runcom runcom force-pushed the fix-copy-test-manlist branch from d6669d6 to dc1e560 Compare October 10, 2016 17:46
@runcom runcom merged commit 0eb841e into containers:master Oct 10, 2016
@runcom runcom deleted the fix-copy-test-manlist branch October 10, 2016 18:06
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants