diff --git a/cluster/BUILD b/cluster/BUILD index d2b7027f8c2..86387ceccc3 100644 --- a/cluster/BUILD +++ b/cluster/BUILD @@ -46,3 +46,31 @@ pkg_tar( "//cluster/saltbase:salt-manifests", ], ) + +# These tests just verify that bash can interpret the file. +sh_test( + name = "common_test", + srcs = ["common.sh"], + data = [ + ":all-srcs", + ], + deps = ["//hack/lib"], +) + +sh_test( + name = "clientbin_test", + srcs = ["clientbin.sh"], + data = [ + ":all-srcs", + ], + deps = ["//hack/lib"], +) + +sh_test( + name = "kube-util_test", + srcs = ["kube-util.sh"], + data = [ + ":all-srcs", + ], + deps = ["//hack/lib"], +) diff --git a/cluster/clientbin.sh b/cluster/clientbin.sh old mode 100644 new mode 100755 diff --git a/cluster/common.sh b/cluster/common.sh index 8c02c5946ec..f4ed595fdff 100755 --- a/cluster/common.sh +++ b/cluster/common.sh @@ -22,7 +22,7 @@ set -o pipefail KUBE_ROOT=$(cd $(dirname "${BASH_SOURCE}")/.. && pwd) -DEFAULT_KUBECONFIG="${HOME}/.kube/config" +DEFAULT_KUBECONFIG="${HOME:-.}/.kube/config" source "${KUBE_ROOT}/hack/lib/util.sh" source "${KUBE_ROOT}/cluster/lib/logging.sh" diff --git a/cluster/kube-util.sh b/cluster/kube-util.sh old mode 100644 new mode 100755