|
|
@@ -31,6 +31,7 @@ import (
|
|
|
"fmt"
|
|
|
"os"
|
|
|
"os/exec"
|
|
|
+ "path/filepath"
|
|
|
"testing"
|
|
|
"time"
|
|
|
|
|
|
@@ -65,6 +66,19 @@ func (s *E2eSuite) TestContextDefault() {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+func (s *E2eSuite) TestSetupError() {
|
|
|
+ It("should display an error if cannot shell out to docker-classic", func() {
|
|
|
+ err := os.Setenv("PATH", s.BinDir)
|
|
|
+ Expect(err).To(BeNil())
|
|
|
+ err = os.Remove(filepath.Join(s.BinDir, "docker-classic"))
|
|
|
+ Expect(err).To(BeNil())
|
|
|
+ output, err := s.NewDockerCommand("ps").Exec()
|
|
|
+ Expect(output).To(ContainSubstring("docker-classic"))
|
|
|
+ Expect(output).To(ContainSubstring("not found"))
|
|
|
+ Expect(err).NotTo(BeNil())
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
func (s *E2eSuite) TestLegacy() {
|
|
|
It("should list all legacy commands", func() {
|
|
|
output := s.NewDockerCommand("--help").ExecOrDie()
|