1
0
mirror of https://github.com/rancher/os.git synced 2025-06-29 08:16:49 +00:00
os/config/cloudinit/test
Sven Dowideit e2ed97648a move coreos-cloudinit into config/cloudinit
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-02-28 13:58:34 +10:00

28 lines
444 B
Bash
Executable File

#!/bin/bash -e
source ./build
SRC=$(find . -name '*.go' \
-not -path "./vendor/*")
PKG=$(cd gopath/src/${REPO_PATH}; go list ./... | \
grep --invert-match vendor)
echo "Checking gofix..."
go tool fix -diff $SRC
echo "Checking gofmt..."
res=$(gofmt -d -e -s $SRC)
echo "${res}"
if [ -n "${res}" ]; then
exit 1
fi
echo "Checking govet..."
go vet $PKG
echo "Running tests..."
go test -timeout 60s -cover $@ ${PKG} --race
echo "Success"