|
@@ -121,7 +121,7 @@ func assertPipe(input, output string, r io.Reader, w io.Writer, count int) error
|
|
|
func TestRunHostname(t *testing.T) {
|
|
|
stdout, stdoutPipe := io.Pipe()
|
|
|
|
|
|
- cli := api.NewDockerCli(nil, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr)
|
|
|
+ cli := api.NewDockerCli(nil, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr, nil)
|
|
|
defer cleanup(globalEngine, t)
|
|
|
|
|
|
c := make(chan struct{})
|
|
@@ -166,7 +166,7 @@ func TestRunHostname(t *testing.T) {
|
|
|
func TestRunWorkdir(t *testing.T) {
|
|
|
stdout, stdoutPipe := io.Pipe()
|
|
|
|
|
|
- cli := api.NewDockerCli(nil, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr)
|
|
|
+ cli := api.NewDockerCli(nil, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr, nil)
|
|
|
defer cleanup(globalEngine, t)
|
|
|
|
|
|
c := make(chan struct{})
|
|
@@ -211,7 +211,7 @@ func TestRunWorkdir(t *testing.T) {
|
|
|
func TestRunWorkdirExists(t *testing.T) {
|
|
|
stdout, stdoutPipe := io.Pipe()
|
|
|
|
|
|
- cli := api.NewDockerCli(nil, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr)
|
|
|
+ cli := api.NewDockerCli(nil, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr, nil)
|
|
|
defer cleanup(globalEngine, t)
|
|
|
|
|
|
c := make(chan struct{})
|
|
@@ -256,7 +256,7 @@ func TestRunExit(t *testing.T) {
|
|
|
stdin, stdinPipe := io.Pipe()
|
|
|
stdout, stdoutPipe := io.Pipe()
|
|
|
|
|
|
- cli := api.NewDockerCli(stdin, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr)
|
|
|
+ cli := api.NewDockerCli(stdin, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr, nil)
|
|
|
defer cleanup(globalEngine, t)
|
|
|
|
|
|
c1 := make(chan struct{})
|
|
@@ -309,7 +309,7 @@ func TestRunDisconnect(t *testing.T) {
|
|
|
stdin, stdinPipe := io.Pipe()
|
|
|
stdout, stdoutPipe := io.Pipe()
|
|
|
|
|
|
- cli := api.NewDockerCli(stdin, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr)
|
|
|
+ cli := api.NewDockerCli(stdin, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr, nil)
|
|
|
defer cleanup(globalEngine, t)
|
|
|
|
|
|
c1 := make(chan struct{})
|
|
@@ -355,7 +355,7 @@ func TestRunDisconnectTty(t *testing.T) {
|
|
|
stdin, stdinPipe := io.Pipe()
|
|
|
stdout, stdoutPipe := io.Pipe()
|
|
|
|
|
|
- cli := api.NewDockerCli(stdin, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr)
|
|
|
+ cli := api.NewDockerCli(stdin, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr, nil)
|
|
|
defer cleanup(globalEngine, t)
|
|
|
|
|
|
c1 := make(chan struct{})
|
|
@@ -407,7 +407,7 @@ func TestRunAttachStdin(t *testing.T) {
|
|
|
stdin, stdinPipe := io.Pipe()
|
|
|
stdout, stdoutPipe := io.Pipe()
|
|
|
|
|
|
- cli := api.NewDockerCli(stdin, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr)
|
|
|
+ cli := api.NewDockerCli(stdin, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr, nil)
|
|
|
defer cleanup(globalEngine, t)
|
|
|
|
|
|
ch := make(chan struct{})
|
|
@@ -471,7 +471,7 @@ func TestRunDetach(t *testing.T) {
|
|
|
stdin, stdinPipe := io.Pipe()
|
|
|
stdout, stdoutPipe := io.Pipe()
|
|
|
|
|
|
- cli := api.NewDockerCli(stdin, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr)
|
|
|
+ cli := api.NewDockerCli(stdin, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr, nil)
|
|
|
defer cleanup(globalEngine, t)
|
|
|
|
|
|
ch := make(chan struct{})
|
|
@@ -518,7 +518,7 @@ func TestAttachDetach(t *testing.T) {
|
|
|
stdin, stdinPipe := io.Pipe()
|
|
|
stdout, stdoutPipe := io.Pipe()
|
|
|
|
|
|
- cli := api.NewDockerCli(stdin, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr)
|
|
|
+ cli := api.NewDockerCli(stdin, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr, nil)
|
|
|
defer cleanup(globalEngine, t)
|
|
|
|
|
|
ch := make(chan struct{})
|
|
@@ -551,7 +551,7 @@ func TestAttachDetach(t *testing.T) {
|
|
|
|
|
|
stdin, stdinPipe = io.Pipe()
|
|
|
stdout, stdoutPipe = io.Pipe()
|
|
|
- cli = api.NewDockerCli(stdin, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr)
|
|
|
+ cli = api.NewDockerCli(stdin, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr, nil)
|
|
|
|
|
|
ch = make(chan struct{})
|
|
|
go func() {
|
|
@@ -599,7 +599,7 @@ func TestAttachDetachTruncatedID(t *testing.T) {
|
|
|
stdin, stdinPipe := io.Pipe()
|
|
|
stdout, stdoutPipe := io.Pipe()
|
|
|
|
|
|
- cli := api.NewDockerCli(stdin, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr)
|
|
|
+ cli := api.NewDockerCli(stdin, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr, nil)
|
|
|
defer cleanup(globalEngine, t)
|
|
|
|
|
|
// Discard the CmdRun output
|
|
@@ -617,7 +617,7 @@ func TestAttachDetachTruncatedID(t *testing.T) {
|
|
|
|
|
|
stdin, stdinPipe = io.Pipe()
|
|
|
stdout, stdoutPipe = io.Pipe()
|
|
|
- cli = api.NewDockerCli(stdin, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr)
|
|
|
+ cli = api.NewDockerCli(stdin, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr, nil)
|
|
|
|
|
|
ch := make(chan struct{})
|
|
|
go func() {
|
|
@@ -664,7 +664,7 @@ func TestAttachDisconnect(t *testing.T) {
|
|
|
stdin, stdinPipe := io.Pipe()
|
|
|
stdout, stdoutPipe := io.Pipe()
|
|
|
|
|
|
- cli := api.NewDockerCli(stdin, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr)
|
|
|
+ cli := api.NewDockerCli(stdin, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr, nil)
|
|
|
defer cleanup(globalEngine, t)
|
|
|
|
|
|
go func() {
|
|
@@ -733,7 +733,7 @@ func TestAttachDisconnect(t *testing.T) {
|
|
|
func TestRunAutoRemove(t *testing.T) {
|
|
|
t.Skip("Fixme. Skipping test for now, race condition")
|
|
|
stdout, stdoutPipe := io.Pipe()
|
|
|
- cli := api.NewDockerCli(nil, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr)
|
|
|
+ cli := api.NewDockerCli(nil, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr, nil)
|
|
|
defer cleanup(globalEngine, t)
|
|
|
|
|
|
c := make(chan struct{})
|
|
@@ -769,7 +769,7 @@ func TestRunAutoRemove(t *testing.T) {
|
|
|
|
|
|
func TestCmdLogs(t *testing.T) {
|
|
|
t.Skip("Test not impemented")
|
|
|
- cli := api.NewDockerCli(nil, ioutil.Discard, ioutil.Discard, testDaemonProto, testDaemonAddr)
|
|
|
+ cli := api.NewDockerCli(nil, ioutil.Discard, ioutil.Discard, testDaemonProto, testDaemonAddr, nil)
|
|
|
defer cleanup(globalEngine, t)
|
|
|
|
|
|
if err := cli.CmdRun(unitTestImageID, "sh", "-c", "ls -l"); err != nil {
|
|
@@ -787,7 +787,7 @@ func TestCmdLogs(t *testing.T) {
|
|
|
// Expected behaviour: error out when attempting to bind mount non-existing source paths
|
|
|
func TestRunErrorBindNonExistingSource(t *testing.T) {
|
|
|
|
|
|
- cli := api.NewDockerCli(nil, nil, ioutil.Discard, testDaemonProto, testDaemonAddr)
|
|
|
+ cli := api.NewDockerCli(nil, nil, ioutil.Discard, testDaemonProto, testDaemonAddr, nil)
|
|
|
defer cleanup(globalEngine, t)
|
|
|
|
|
|
c := make(chan struct{})
|
|
@@ -807,7 +807,7 @@ func TestRunErrorBindNonExistingSource(t *testing.T) {
|
|
|
func TestImagesViz(t *testing.T) {
|
|
|
stdout, stdoutPipe := io.Pipe()
|
|
|
|
|
|
- cli := api.NewDockerCli(nil, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr)
|
|
|
+ cli := api.NewDockerCli(nil, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr, nil)
|
|
|
defer cleanup(globalEngine, t)
|
|
|
|
|
|
image := buildTestImages(t, globalEngine)
|
|
@@ -857,7 +857,7 @@ func TestImagesViz(t *testing.T) {
|
|
|
func TestImagesTree(t *testing.T) {
|
|
|
stdout, stdoutPipe := io.Pipe()
|
|
|
|
|
|
- cli := api.NewDockerCli(nil, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr)
|
|
|
+ cli := api.NewDockerCli(nil, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr, nil)
|
|
|
defer cleanup(globalEngine, t)
|
|
|
|
|
|
image := buildTestImages(t, globalEngine)
|
|
@@ -940,7 +940,7 @@ func TestRunCidFileCheckIDLength(t *testing.T) {
|
|
|
}
|
|
|
tmpCidFile := path.Join(tmpDir, "cid")
|
|
|
|
|
|
- cli := api.NewDockerCli(nil, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr)
|
|
|
+ cli := api.NewDockerCli(nil, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr, nil)
|
|
|
defer cleanup(globalEngine, t)
|
|
|
|
|
|
c := make(chan struct{})
|
|
@@ -989,7 +989,7 @@ func TestRunCidFileCleanupIfEmpty(t *testing.T) {
|
|
|
}
|
|
|
tmpCidFile := path.Join(tmpDir, "cid")
|
|
|
|
|
|
- cli := api.NewDockerCli(nil, ioutil.Discard, ioutil.Discard, testDaemonProto, testDaemonAddr)
|
|
|
+ cli := api.NewDockerCli(nil, ioutil.Discard, ioutil.Discard, testDaemonProto, testDaemonAddr, nil)
|
|
|
defer cleanup(globalEngine, t)
|
|
|
|
|
|
c := make(chan struct{})
|
|
@@ -1019,7 +1019,7 @@ func TestContainerOrphaning(t *testing.T) {
|
|
|
defer os.RemoveAll(tmpDir)
|
|
|
|
|
|
// setup a CLI and server
|
|
|
- cli := api.NewDockerCli(nil, ioutil.Discard, ioutil.Discard, testDaemonProto, testDaemonAddr)
|
|
|
+ cli := api.NewDockerCli(nil, ioutil.Discard, ioutil.Discard, testDaemonProto, testDaemonAddr, nil)
|
|
|
defer cleanup(globalEngine, t)
|
|
|
srv := mkServerFromEngine(globalEngine, t)
|
|
|
|
|
@@ -1079,8 +1079,8 @@ func TestCmdKill(t *testing.T) {
|
|
|
var (
|
|
|
stdin, stdinPipe = io.Pipe()
|
|
|
stdout, stdoutPipe = io.Pipe()
|
|
|
- cli = api.NewDockerCli(stdin, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr)
|
|
|
- cli2 = api.NewDockerCli(nil, ioutil.Discard, ioutil.Discard, testDaemonProto, testDaemonAddr)
|
|
|
+ cli = api.NewDockerCli(stdin, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr, nil)
|
|
|
+ cli2 = api.NewDockerCli(nil, ioutil.Discard, ioutil.Discard, testDaemonProto, testDaemonAddr, nil)
|
|
|
)
|
|
|
defer cleanup(globalEngine, t)
|
|
|
|