diff --git a/e2e/system/inspect_test.go b/e2e/system/inspect_test.go index eb1e37d3df..aefab51606 100644 --- a/e2e/system/inspect_test.go +++ b/e2e/system/inspect_test.go @@ -11,6 +11,8 @@ func TestInspectInvalidReference(t *testing.T) { // This test should work on both Windows and Linux result := icmd.RunCmd(icmd.Command("docker", "inspect", "FooBar")) result.Assert(t, icmd.Expected{ - Out: "[]\nError: No such object: FooBar", + Out: "[]", + Err: "Error: No such object: FooBar", + ExitCode: 1, }) } diff --git a/e2e/system/main_test.go b/e2e/system/main_test.go new file mode 100644 index 0000000000..b154d1a191 --- /dev/null +++ b/e2e/system/main_test.go @@ -0,0 +1,17 @@ +package system + +import ( + "fmt" + "os" + "testing" + + "github.com/docker/cli/internal/test/environment" +) + +func TestMain(m *testing.M) { + if err := environment.Setup(); err != nil { + fmt.Println(err.Error()) + os.Exit(3) + } + os.Exit(m.Run()) +}