Skip to content

client test: Fix check for whether sandbox has containerd#1538

Merged
tonistiigi merged 2 commits intomoby:masterfrom
sipsma:integ-fix
Jun 23, 2020
Merged

client test: Fix check for whether sandbox has containerd#1538
tonistiigi merged 2 commits intomoby:masterfrom
sipsma:integ-fix

Conversation

@sipsma
Copy link
Collaborator

@sipsma sipsma commented Jun 21, 2020

Before this, the check was always returning that containerd wasn't running and
thus skipping the rest of several test cases.

Signed-off-by: Erik Sipsma erik@sipsma.dev

Here's a go playground w/ a stripped down example that I believe shows the interface{} check wasn't working as expected.

@sipsma sipsma marked this pull request as draft June 21, 2020 21:50
}); !ok {
cdAddress := sb.ContainerdAddress()
if cdAddress == "" {
return
Copy link
Member

Choose a reason for hiding this comment

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

Should return skip here so we would notice when something like this happens. Or if a test has meaningful parts before the return maybe log out that "containerd specific parts were skipped".

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated to have them call t.Skip(). For the tests w/ meaningful parts before, they will still be marked as Failed if any of their require assertions fail before the skip call.

@sipsma sipsma force-pushed the integ-fix branch 2 times, most recently from 2f57fd2 to 7c4e34e Compare June 22, 2020 03:04
sipsma added 2 commits June 21, 2020 20:42
Before this, the check was always returning that containerd wasn't running and
thus skipping the rest of several test cases.

Signed-off-by: Erik Sipsma <erik@sipsma.dev>
This test had previously been accidentally not executing past the check for
whether containerd was running. A previous commit fixes that check, this commit
fixes a few bugs that had been going unnoticed in the containerd-specific part
of the test's code.

Signed-off-by: Erik Sipsma <erik@sipsma.dev>
@sipsma sipsma marked this pull request as ready for review June 22, 2020 04:03
@sipsma
Copy link
Collaborator Author

sipsma commented Jun 22, 2020

Updated w/ a separate commit that fixes the pre-existing test failures in TestBuildExportWithUncompressed this uncovered.

@tonistiigi tonistiigi merged commit 95010be into moby:master Jun 23, 2020
@tonistiigi
Copy link
Member

Thanks!

targetImg := llb.Image(target)
cmd = `sh -e -c "echo gzip > data"`
st = targetImg.Run(llb.Shlex(cmd), llb.Dir("/wd")).GetMount("/wd")
cmd = `sh -e -c "echo -n gzip > data"`
Copy link
Contributor

Choose a reason for hiding this comment

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

just curiosity, why add -n here?

Copy link
Contributor

Choose a reason for hiding this comment

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

never mind, the newline appened. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants