Skip to content

Instantly share code, notes, and snippets.

@dqminh
Created October 3, 2014 15:33
Show Gist options
  • Save dqminh/d95056237acbbf5e3d37 to your computer and use it in GitHub Desktop.
Save dqminh/d95056237acbbf5e3d37 to your computer and use it in GitHub Desktop.
// test for https://github.com/docker/docker/issues/3631
func TestRunPipeStdoutSlowStdin(t *testing.T) {
defer deleteAllContainers()
defer deleteImages("fedora")
runCommand(exec.Command(dockerBinary, "pull", "fedora"))
runCmd := exec.Command("bash", "-c",
fmt.Sprintf(`%s run -i fedora tar -cf - /usr/bin | %s run -i fedora tar -tf -`,
dockerBinary, dockerBinary))
out, _, _ := runCommandWithOutput(runCmd)
if strings.Contains(string(out), "Unexpected EOF in archive") {
t.Fatal("Has unexpected EOF error in output")
}
logDone("run - pipe stdout to slow stdin")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment