test: CmdAddWithResult sets CNI_PATH from PATH
authorDan Williams <dcbw@redhat.com>
Wed, 19 Apr 2017 04:45:05 +0000 (23:45 -0500)
committerDan Williams <dcbw@redhat.com>
Wed, 19 Apr 2017 04:49:26 +0000 (23:49 -0500)
To actually use CNI plugins in the given CNI_PATH, we need to add
CNI_PATH to PATH because CmdAddWithResult() does this:

os.Setenv("CNI_PATH", os.Getenv("PATH"))

test

diff --git a/test b/test
index f563f8d..83b5cda 100755 (executable)
--- a/test
+++ b/test
@@ -48,7 +48,7 @@ fi
 split=(${TEST// / })
 TEST=${split[@]/#/${REPO_PATH}/}
 
-sudo -E bash -c "umask 0; PATH=${GOROOT}/bin:$(pwd)/bin:${PATH} CNI_PATH=${CNI_PATH} go test ${TEST}"
+sudo -E bash -c "umask 0; PATH=${GOROOT}/bin:$(pwd)/bin:${CNI_PATH}:${PATH} go test ${TEST}"
 
 echo "Checking gofmt..."
 fmtRes=$(gofmt -l $FMT)