This test relies on a race condition, and has been failing often in CI.
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
| ... | ... |
@@ -97,33 +97,6 @@ func (s *DockerRegistrySuite) TestPushMultipleTags(c *check.C) {
|
| 97 | 97 |
} |
| 98 | 98 |
} |
| 99 | 99 |
|
| 100 |
-func (s *DockerRegistrySuite) TestPushInterrupt(c *check.C) {
|
|
| 101 |
- repoName := fmt.Sprintf("%v/dockercli/busybox", privateRegistryURL)
|
|
| 102 |
- // tag the image and upload it to the private registry |
|
| 103 |
- dockerCmd(c, "tag", "busybox", repoName) |
|
| 104 |
- |
|
| 105 |
- pushCmd := exec.Command(dockerBinary, "push", repoName) |
|
| 106 |
- if err := pushCmd.Start(); err != nil {
|
|
| 107 |
- c.Fatalf("Failed to start pushing to private registry: %v", err)
|
|
| 108 |
- } |
|
| 109 |
- |
|
| 110 |
- // Interrupt push (yes, we have no idea at what point it will get killed). |
|
| 111 |
- time.Sleep(50 * time.Millisecond) // dependent on race condition. |
|
| 112 |
- if err := pushCmd.Process.Kill(); err != nil {
|
|
| 113 |
- c.Fatalf("Failed to kill push process: %v", err)
|
|
| 114 |
- } |
|
| 115 |
- if out, _, err := dockerCmdWithError("push", repoName); err == nil {
|
|
| 116 |
- if !strings.Contains(out, "already in progress") {
|
|
| 117 |
- c.Fatalf("Push should be continued on daemon side, but seems ok: %v, %s", err, out)
|
|
| 118 |
- } |
|
| 119 |
- } |
|
| 120 |
- // now wait until all this pushes will complete |
|
| 121 |
- // if it failed with timeout - there would be some error, |
|
| 122 |
- // so no logic about it here |
|
| 123 |
- for exec.Command(dockerBinary, "push", repoName).Run() != nil {
|
|
| 124 |
- } |
|
| 125 |
-} |
|
| 126 |
- |
|
| 127 | 100 |
func (s *DockerRegistrySuite) TestPushEmptyLayer(c *check.C) {
|
| 128 | 101 |
repoName := fmt.Sprintf("%v/dockercli/emptylayer", privateRegistryURL)
|
| 129 | 102 |
emptyTarball, err := ioutil.TempFile("", "empty_tarball")
|