Fix e2e/system tests

a setup step is required and the test fails.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
Vincent Demeester 2018-05-22 14:32:53 +02:00
parent 0022bb83ea
commit 0016ff9c15
No known key found for this signature in database
GPG Key ID: 083CC6FD6EB699A3
2 changed files with 20 additions and 1 deletions

View File

@ -11,6 +11,8 @@ func TestInspectInvalidReference(t *testing.T) {
// This test should work on both Windows and Linux // This test should work on both Windows and Linux
result := icmd.RunCmd(icmd.Command("docker", "inspect", "FooBar")) result := icmd.RunCmd(icmd.Command("docker", "inspect", "FooBar"))
result.Assert(t, icmd.Expected{ result.Assert(t, icmd.Expected{
Out: "[]\nError: No such object: FooBar", Out: "[]",
Err: "Error: No such object: FooBar",
ExitCode: 1,
}) })
} }

17
e2e/system/main_test.go Normal file
View File

@ -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())
}