From 90e11cf3495b67df009274639897e724f0e3a045 Mon Sep 17 00:00:00 2001 From: Christopher Crone Date: Thu, 14 May 2020 10:15:29 +0200 Subject: [PATCH] e2e: Use new context use command Signed-off-by: Christopher Crone --- tests/e2e/e2e.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/e2e/e2e.go b/tests/e2e/e2e.go index d20173ed..504cd31e 100644 --- a/tests/e2e/e2e.go +++ b/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 *"))