From 7b86d36a63e9b281834fdb6c2db0840df992c57c Mon Sep 17 00:00:00 2001 From: Kevin Krakauer Date: Wed, 28 Nov 2018 10:09:22 -0800 Subject: Fix crictl tests. gvisor-containerd-shim moved. It now has a stable URL that run_tests.sh always uses. PiperOrigin-RevId: 223188822 Change-Id: I5687c78289404da27becd8d5949371e580fdb360 --- kokoro/run_tests.sh | 13 +++++++------ runsc/test/root/crictl_test.go | 9 --------- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/kokoro/run_tests.sh b/kokoro/run_tests.sh index fb9a7f300..927acb6a1 100755 --- a/kokoro/run_tests.sh +++ b/kokoro/run_tests.sh @@ -75,8 +75,10 @@ installCrictl() ( sudo -n -E make install # Install gvisor-containerd-shim. + local latest=/tmp/gvisor-containerd-shim-latest local shim_path=/tmp/gvisor-containerd-shim - wget https://storage.googleapis.com/cri-containerd-staging/gvisor-containerd-shim/gvisor-containerd-shim -O ${shim_path} + wget https://storage.googleapis.com/cri-containerd-staging/gvisor-containerd-shim/latest -O ${latest} + wget https://storage.googleapis.com/cri-containerd-staging/gvisor-containerd-shim/$(cat ${latest}) -O ${shim_path} chmod +x ${shim_path} sudo -n -E mv ${shim_path} /usr/local/bin @@ -100,11 +102,10 @@ EOF ) # Install containerd and crictl. -# FIXME: gvisor-containerd-shim installation broken. -#if [[ ${exit_code} -eq 0 ]]; then -# installCrictl -# exit_code=${?} -#fi +if [[ ${exit_code} -eq 0 ]]; then + installCrictl + exit_code=${?} +fi # Execute local tests that require docker. if [[ ${exit_code} -eq 0 ]]; then diff --git a/runsc/test/root/crictl_test.go b/runsc/test/root/crictl_test.go index 45cbec6b5..556d95fff 100644 --- a/runsc/test/root/crictl_test.go +++ b/runsc/test/root/crictl_test.go @@ -37,9 +37,6 @@ import ( // Tests for crictl have to be run as root (rather than in a user namespace) // because crictl creates named network namespaces in /var/run/netns/. func TestCrictlSanity(t *testing.T) { - // FIXME - t.Skip("crictl installation broken") - // Setup containerd and crictl. crictl, cleanup, err := setup(t) if err != nil { @@ -62,9 +59,6 @@ func TestCrictlSanity(t *testing.T) { } } func TestMountPaths(t *testing.T) { - // FIXME - t.Skip("crictl installation broken") - // Setup containerd and crictl. crictl, cleanup, err := setup(t) if err != nil { @@ -87,9 +81,6 @@ func TestMountPaths(t *testing.T) { } } func TestMountOverSymlinks(t *testing.T) { - // FIXME - t.Skip("crictl installation broken") - // Setup containerd and crictl. crictl, cleanup, err := setup(t) if err != nil { -- cgit v1.2.3