Skip to content

Commit

Permalink
Merge pull request #1076 from vdemeester/fix-e2e-system
Browse files Browse the repository at this point in the history
Fix e2e/system tests
  • Loading branch information
Vincent Demeester authored May 22, 2018
2 parents 0022bb8 + 0016ff9 commit 56fc890
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
4 changes: 3 additions & 1 deletion e2e/system/inspect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
})
}
17 changes: 17 additions & 0 deletions e2e/system/main_test.go
Original file line number Diff line number Diff line change
@@ -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())
}

0 comments on commit 56fc890

Please sign in to comment.