From 45407846f35ad63dc910137ecc675b6a61f936ba Mon Sep 17 00:00:00 2001 From: Phil Estes Date: Wed, 4 Apr 2018 15:03:55 -0400 Subject: [PATCH 1/2] Test whether use of `exit` is hiding errors Signed-off-by: Phil Estes --- .travis.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index d1dc3f7ae..814b846a7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -75,10 +75,8 @@ script: sudo PATH=$PATH containerd -log-level debug &> /tmp/containerd-cri.log & sudo ctr version ; sudo PATH=$PATH GOPATH=$GOPATH critest --runtime-endpoint=/var/run/containerd/containerd.sock --parallel=8 ; - exit_code=$? ; - test $exit_code -ne 0 && cat /tmp/containerd-cri.log ; + test $? -ne 0 && cat /tmp/containerd-cri.log ; sudo pkill containerd ; - exit $exit_code ; fi after_success: From b769cce9042ea51c498af89fe69be5480f509b33 Mon Sep 17 00:00:00 2001 From: Phil Estes Date: Wed, 4 Apr 2018 15:28:41 -0400 Subject: [PATCH 2/2] Fix tests using invalid ID These tests are using their name as ID, but subtests add a forward slash connected to the parent test, and slash (/) is an invalid character for container IDs. Signed-off-by: Phil Estes --- container_linux_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container_linux_test.go b/container_linux_test.go index d479d47d4..f1bf853b7 100644 --- a/container_linux_test.go +++ b/container_linux_test.go @@ -493,7 +493,7 @@ func testContainerUser(t *testing.T, userstr, expectedOutput string) { var ( image Image ctx, cancel = testContext() - id = t.Name() + id = strings.Replace(t.Name(), "/", "_", -1) ) defer cancel()