add test for the registered feature gates
This commit is contained in:
@@ -53,4 +53,19 @@ if [[ -n "${missing_defers}" ]]; then
|
||||
rc=1
|
||||
fi
|
||||
|
||||
|
||||
# ensure all generic features are added in alphabetic order
|
||||
lines=$(git grep 'genericfeatures[.].*:' -- pkg/features/kube_features.go)
|
||||
sorted_lines=$(echo "$lines" | sort -f)
|
||||
if [[ "$lines" != "$sorted_lines" ]]; then
|
||||
echo "Generic features in pkg/features/kube_features.go not sorted" >&2
|
||||
echo >&2
|
||||
echo "Expected:" >&2
|
||||
echo "$sorted_lines" >&2
|
||||
echo >&2
|
||||
echo "Got:" >&2
|
||||
echo "$lines" >&2
|
||||
rc=1
|
||||
fi
|
||||
|
||||
exit $rc
|
||||
|
||||
Reference in New Issue
Block a user