Merge pull request #51649 from mml/sh-test

Automatic merge from submit-queue (batch tested with PRs 49971, 51357, 51616, 51649, 51372)

Add some initial shell parsing tests.

These just test to see if there is a bash syntax error in these shell
libraries.

For #51642

```release-note
NONE
```
pull/6/head
Kubernetes Submit Queue 2017-09-01 01:12:45 -07:00 committed by GitHub
commit 28d0077688
4 changed files with 29 additions and 1 deletions

View File

@ -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"],
)

0
cluster/clientbin.sh Normal file → Executable file
View File

View File

@ -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"

0
cluster/kube-util.sh Normal file → Executable file
View File