From 0852f5c188f79c0e827dfffac25d26e2889539ca Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Tue, 17 Oct 2017 10:07:35 -0600 Subject: [PATCH 1/2] Issue #1024: don't chmod a nonexistent file New network test makes improper assumptions about conmon path. Use predefined CONMON_BINARY variable instead. Signed-off-by: Ed Santiago --- test/network.bats | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/network.bats b/test/network.bats index d9d0304b..294ef217 100644 --- a/test/network.bats +++ b/test/network.bats @@ -171,11 +171,11 @@ function teardown() { # make conmon non-executable to cause the sandbox setup to fail after # networking has been configured - chmod 0644 /go/src/github.com/kubernetes-incubator/cri-o/conmon/conmon + chmod 0644 $CONMON_BINARY run crioctl pod run --config "$TESTDATA"/sandbox_config.json + chmod 0755 $CONMON_BINARY echo "$output" [ "$status" -ne 0 ] - chmod 0755 /go/src/github.com/kubernetes-incubator/cri-o/conmon/conmon # ensure that the server cleaned up sandbox networking if the sandbox # failed after network setup From e24cfb90c0257bc36cd4ecf662b94cb9515e2535 Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Tue, 17 Oct 2017 11:00:26 -0600 Subject: [PATCH 2/2] fixup! Restore conmon permissions in teardown() Signed-off-by: Ed Santiago --- test/network.bats | 1 + 1 file changed, 1 insertion(+) diff --git a/test/network.bats b/test/network.bats index 294ef217..dc8143c2 100644 --- a/test/network.bats +++ b/test/network.bats @@ -7,6 +7,7 @@ function teardown() { cleanup_pods stop_crio rm -f /var/lib/cni/networks/crionet_test_args/* + chmod 0755 $CONMON_BINARY cleanup_test }