File tree Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 42
42
./hack/verify-codegen.sh
43
43
./hack/verify-golint.sh
44
44
./hack/verify-no-vendor-cycles.sh
45
- ./hack/verify-test-featuregates.sh
46
45
./test/cmd/apply.sh
47
46
./test/cmd/apps.sh
48
47
./test/cmd/authorization.sh
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ _tmp="${KUBE_ROOT}/_tmp"
32
32
33
33
mkdir -p " ${_tmp} "
34
34
cp -a " ${SPECROOT} " " ${TMP_SPECROOT} "
35
- trap ' cp -a " ${TMP_SPECROOT}" " ${SPECROOT}" /..; rm -rf " ${_tmp}" ' EXIT SIGINT
35
+ trap ' cp -a ${TMP_SPECROOT} ${SPECROOT}/..; rm -rf ${_tmp}' EXIT SIGINT
36
36
rm " ${SPECROOT} " /*
37
37
cp " ${TMP_SPECROOT} /BUILD" " ${SPECROOT} /BUILD"
38
38
cp " ${TMP_SPECROOT} /README.md" " ${SPECROOT} /README.md"
Original file line number Diff line number Diff line change @@ -18,15 +18,15 @@ set -o errexit
18
18
set -o nounset
19
19
set -o pipefail
20
20
21
- KUBE_ROOT=$( dirname " ${BASH_SOURCE} " ) /..
21
+ KUBE_ROOT=$( dirname " ${BASH_SOURCE[0] } " ) /..
22
22
source " ${KUBE_ROOT} /hack/lib/init.sh"
23
23
24
24
cd " ${KUBE_ROOT} "
25
25
26
26
rc=0
27
27
28
28
# find test files accessing the mutable global feature gate or interface
29
- direct_sets=$( grep -n --include * _test.go -R ' MutableFeatureGate' . 2> /dev/null) || true
29
+ direct_sets=$( grep -n --include ' ./ *_test.go' -R ' MutableFeatureGate' . 2> /dev/null) || true
30
30
if [[ -n " ${direct_sets} " ]]; then
31
31
echo " Test files may not access mutable global feature gates directly:" >&2
32
32
echo " ${direct_sets} " >&2
@@ -38,7 +38,7 @@ if [[ -n "${direct_sets}" ]]; then
38
38
fi
39
39
40
40
# find test files calling SetFeatureGateDuringTest and not calling the result
41
- missing_defers=$( grep -n --include * _test.go -R ' SetFeatureGateDuringTest' . 2> /dev/null | egrep -v " defer .*\\ )\\ (\\ )$" ) || true
41
+ missing_defers=$( grep -n --include ' ./ *_test.go' -R ' SetFeatureGateDuringTest' . 2> /dev/null | grep -E -v " defer .*\\ )\\ (\\ )$" ) || true
42
42
if [[ -n " ${missing_defers} " ]]; then
43
43
echo " Invalid invocations of utilfeaturetesting.SetFeatureGateDuringTest():" >&2
44
44
echo " ${missing_defers} " >&2
You can’t perform that action at this time.
0 commit comments