浏览代码

e2e: Use new context use command

Signed-off-by: Christopher Crone <[email protected]>
Christopher Crone 5 年之前
父节点
当前提交
90e11cf349
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      tests/e2e/e2e.go

+ 3 - 2
tests/e2e/e2e.go

@@ -20,7 +20,7 @@ func main() {
 	})
 
 	It("should be initialized with default context", func() {
-		NewCommand("docker", "context", "use", "default").ExecOrDie()
+		NewDockerCommand("context", "use", "default").ExecOrDie()
 		output := NewCommand("docker", "context", "ls").ExecOrDie()
 		Expect(output).To(Not(ContainSubstring("test-example")))
 		Expect(output).To(ContainSubstring("default *"))
@@ -52,9 +52,10 @@ func main() {
 		//Expect(output).To(ContainSubstring("test-example context acitest created"))
 	})
 	defer NewDockerCommand("context", "rm", "test-example").ExecOrDie()
+	defer NewDockerCommand("context", "use", "default").ExecOrDie()
 
 	It("uses the test context", func() {
-		currentContext := NewCommand("docker", "context", "use", "test-example").ExecOrDie()
+		currentContext := NewDockerCommand("context", "use", "test-example").ExecOrDie()
 		Expect(currentContext).To(ContainSubstring("test-example"))
 		output := NewCommand("docker", "context", "ls").ExecOrDie()
 		Expect(output).To(ContainSubstring("test-example *"))