summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorFabricio Voznika <fvoznika@google.com>2021-04-05 11:37:56 -0700
committergVisor bot <gvisor-bot@google.com>2021-04-05 11:39:53 -0700
commit3007ae647d2e7a8800f3550f5ffc53c5e73415ce (patch)
tree21e2c62185ef3e6e7f457c095fabacd33fcac0ad /test
parent8161ed4110e283c7643c2bb534f136aaf816d1cf (diff)
Fail tests when container returns non-zero status
PiperOrigin-RevId: 366839955
Diffstat (limited to 'test')
-rw-r--r--test/image/image_test.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/image/image_test.go b/test/image/image_test.go
index 968e62f63..952264173 100644
--- a/test/image/image_test.go
+++ b/test/image/image_test.go
@@ -183,7 +183,10 @@ func TestMysql(t *testing.T) {
// Start the container.
if err := server.Spawn(ctx, dockerutil.RunOpts{
Image: "basic/mysql",
- Env: []string{"MYSQL_ROOT_PASSWORD=foobar123"},
+ Env: []string{
+ "MYSQL_ROOT_PASSWORD=foobar123",
+ "MYSQL_ROOT_HOST=%", // Allow anyone to connect to the server.
+ },
}); err != nil {
t.Fatalf("docker run failed: %v", err)
}