From 1f13de07e649ec2a80d06b88444367668c0e788a Mon Sep 17 00:00:00 2001 From: Matt Liggett Date: Wed, 30 Aug 2017 15:05:37 -0700 Subject: [PATCH] fixup tests: remove test-shlib and rename the tests --- cluster/BUILD | 22 ++++++++++------------ cluster/clientbin.sh | 0 cluster/clientbin_test.sh | 24 ------------------------ cluster/common_test.sh | 24 ------------------------ cluster/kube-util.sh | 0 cluster/kube-util_test.sh | 24 ------------------------ hack/BUILD | 5 ----- hack/test-shlib.sh | 23 ----------------------- 8 files changed, 10 insertions(+), 112 deletions(-) mode change 100644 => 100755 cluster/clientbin.sh delete mode 100755 cluster/clientbin_test.sh delete mode 100755 cluster/common_test.sh mode change 100644 => 100755 cluster/kube-util.sh delete mode 100755 cluster/kube-util_test.sh delete mode 100644 hack/test-shlib.sh diff --git a/cluster/BUILD b/cluster/BUILD index 302ba46123df1..50a29bb34b526 100644 --- a/cluster/BUILD +++ b/cluster/BUILD @@ -47,32 +47,30 @@ pkg_tar( ], ) +# These tests just verify that bash can interpret the file. sh_test( - name = "common", - srcs = ["common_test.sh"], + name = "common_test", + srcs = ["common.sh"], data = [ - "all-srcs", + ":all-srcs", "//hack/lib:all-srcs", ], - deps = ["//hack:test-shlib"], ) sh_test( - name = "clientbin", - srcs = ["clientbin_test.sh"], + name = "clientbin_test", + srcs = ["clientbin.sh"], data = [ - "all-srcs", + ":all-srcs", "//hack/lib:all-srcs", ], - deps = ["//hack:test-shlib"], ) sh_test( - name = "kube-util", - srcs = ["kube-util_test.sh"], + name = "kube-util_test", + srcs = ["kube-util.sh"], data = [ - "all-srcs", + ":all-srcs", "//hack/lib:all-srcs", ], - deps = ["//hack:test-shlib"], ) diff --git a/cluster/clientbin.sh b/cluster/clientbin.sh old mode 100644 new mode 100755 diff --git a/cluster/clientbin_test.sh b/cluster/clientbin_test.sh deleted file mode 100755 index a83fc9e570854..0000000000000 --- a/cluster/clientbin_test.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -# Copyright 2017 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -o errexit -set -o nounset -set -o pipefail - -# Setup test environment -source hack/test-shlib.sh - -# Test for syntax errors -source cluster/clientbin.sh diff --git a/cluster/common_test.sh b/cluster/common_test.sh deleted file mode 100755 index a60f86d769c5f..0000000000000 --- a/cluster/common_test.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -# Copyright 2017 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -o errexit -set -o nounset -set -o pipefail - -# Setup test environment -source hack/test-shlib.sh - -# Test for syntax errors -source cluster/common.sh diff --git a/cluster/kube-util.sh b/cluster/kube-util.sh old mode 100644 new mode 100755 diff --git a/cluster/kube-util_test.sh b/cluster/kube-util_test.sh deleted file mode 100755 index 97a2f0ea69f6f..0000000000000 --- a/cluster/kube-util_test.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -# Copyright 2017 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -o errexit -set -o nounset -set -o pipefail - -# Setup test environment -source hack/test-shlib.sh - -# Test for syntax errors -source cluster/kube-util.sh diff --git a/hack/BUILD b/hack/BUILD index 63361f18e030b..e07e77cb048b1 100644 --- a/hack/BUILD +++ b/hack/BUILD @@ -14,11 +14,6 @@ filegroup( visibility = ["//visibility:private"], ) -sh_library( - name = "test-shlib", - srcs = ["test-shlib.sh"], -) - filegroup( name = "all-srcs", srcs = [ diff --git a/hack/test-shlib.sh b/hack/test-shlib.sh deleted file mode 100644 index 5aa02b63d8f88..0000000000000 --- a/hack/test-shlib.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -# Copyright 2017 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Generic support library for shell tests. - -set -o errexit -set -o nounset -set -o pipefail - -# HOME is, by default, not set. Give it a bogus value. -HOME=${PWD}