From bedee8cd8fb29584c14654f0ffa2f37ca159f7d2 Mon Sep 17 00:00:00 2001 From: Abhishek Chanda Date: Fri, 2 Oct 2015 14:19:53 -0700 Subject: [PATCH] Fix function call Make it skip if rkt is not installed --- client/testutil/driver_compatible.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/testutil/driver_compatible.go b/client/testutil/driver_compatible.go index 81c958866..c354a3286 100644 --- a/client/testutil/driver_compatible.go +++ b/client/testutil/driver_compatible.go @@ -19,13 +19,15 @@ func QemuCompatible(t *testing.T) { } } -func RktCompatible(t *testing.T) bool { +func RktCompatible(t *testing.T) { if runtime.GOOS == "windows" || syscall.Geteuid() != 0 { t.Skip("Must be root on non-windows environments to run test") } // else see if rkt exists _, err := exec.Command("rkt", "version").CombinedOutput() - return err == nil + if err != nil { + t.Skip("Must have rkt installed for rkt specific tests to run") + } } func MountCompatible(t *testing.T) {