Răsfoiți Sursa

Fix docker-classic creation makefile target

Guillaume Tardif 5 ani în urmă
părinte
comite
ea98a2dd78
3 a modificat fișierele cu 6 adăugiri și 5 ștergeri
  1. 1 1
      Makefile
  2. 1 1
      cli/main.go
  3. 4 3
      tests/e2e/e2e_test.go

+ 1 - 1
Makefile

@@ -66,7 +66,7 @@ lint: ## run linter(s)
 	--target lint
 
 classic-link: ## create docker-classic symlink if does not already exist
-	ln -s /usr/local/bin/docker-classic /Applications/Docker.app/Contents/Resources/bin/docker
+	ln -s /Applications/Docker.app/Contents/Resources/bin/docker /usr/local/bin/docker-classic
 
 help: ## Show help
 	@echo Please specify a build target. The choices are:

+ 1 - 1
cli/main.go

@@ -186,7 +186,7 @@ func execMoby(ctx context.Context) {
 	// Only run original docker command if the current context is not
 	// ours.
 	if err != nil {
-		cmd := exec.CommandContext(ctx,"docker-classic", os.Args[1:]...)
+		cmd := exec.CommandContext(ctx, "docker-classic", os.Args[1:]...)
 		cmd.Stdin = os.Stdin
 		cmd.Stdout = os.Stdout
 		cmd.Stderr = os.Stderr

+ 4 - 3
tests/e2e/e2e_test.go

@@ -29,8 +29,6 @@ package main
 
 import (
 	"fmt"
-	. "github.com/onsi/gomega"
-	"github.com/stretchr/testify/suite"
 	"io/ioutil"
 	"log"
 	"os"
@@ -40,6 +38,9 @@ import (
 	"testing"
 	"time"
 
+	. "github.com/onsi/gomega"
+	"github.com/stretchr/testify/suite"
+
 	"gotest.tools/golden"
 
 	. "github.com/docker/api/tests/framework"
@@ -91,7 +92,7 @@ func (s *E2eSuite) TestKillChildOnCancel() {
 RUN sleep 100`), 0644)).To(Succeed())
 		shutdown := make(chan time.Time)
 		errs := make(chan error)
-			ctx := s.NewDockerCommand("build", "--no-cache", "-t", "test-sleep-image", ".").WithinDirectory(dir).WithTimeout(shutdown)
+		ctx := s.NewDockerCommand("build", "--no-cache", "-t", "test-sleep-image", ".").WithinDirectory(dir).WithTimeout(shutdown)
 		go func() {
 			_, err := ctx.Exec()
 			errs <- err