mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #31125 from thaJeztah/fix-TestPullFailsWithAlteredLayer
fix TestPullFailsWithAlteredLayer
This commit is contained in:
commit
95a2aed95e
1 changed files with 4 additions and 1 deletions
|
@ -31,7 +31,10 @@ func setupImage(c *check.C) (digest.Digest, error) {
|
||||||
func setupImageWithTag(c *check.C, tag string) (digest.Digest, error) {
|
func setupImageWithTag(c *check.C, tag string) (digest.Digest, error) {
|
||||||
containerName := "busyboxbydigest"
|
containerName := "busyboxbydigest"
|
||||||
|
|
||||||
dockerCmd(c, "run", "-e", "digest=1", "--name", containerName, "busybox")
|
// new file is committed because this layer is used for detecting malicious
|
||||||
|
// changes. if this was committed as empty layer it would be skipped on pull
|
||||||
|
// and malicious changes would never be detected.
|
||||||
|
dockerCmd(c, "run", "-e", "digest=1", "--name", containerName, "busybox", "touch", "anewfile")
|
||||||
|
|
||||||
// tag the image to upload it to the private registry
|
// tag the image to upload it to the private registry
|
||||||
repoAndTag := repoName + ":" + tag
|
repoAndTag := repoName + ":" + tag
|
||||||
|
|
Loading…
Reference in a new issue