update import of generic featuregate code from k8s.io/apiserver/pkg/util/feature -> k8s.io/component-base/featuregate

This commit is contained in:
Andrew Kim
2019-03-04 12:46:52 -05:00
committed by Andrew Sy Kim
parent b2831a686c
commit c919139245
140 changed files with 708 additions and 683 deletions

View File

@@ -32,7 +32,7 @@ if [[ -n "${direct_sets}" ]]; then
echo "${direct_sets}" >&2
echo >&2
echo "Use this invocation instead:" >&2
echo " defer utilfeaturetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.<FeatureName>, <value>)()" >&2
echo " defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.<FeatureName>, <value>)()" >&2
echo >&2
rc=1
fi
@@ -40,11 +40,11 @@ fi
# find test files calling SetFeatureGateDuringTest and not calling the result
missing_defers=$(grep -n --include '*_test.go' -R 'SetFeatureGateDuringTest' . 2>/dev/null | grep -E -v "defer .*\\)\\(\\)$") || true
if [[ -n "${missing_defers}" ]]; then
echo "Invalid invocations of utilfeaturetesting.SetFeatureGateDuringTest():" >&2
echo "Invalid invocations of featuregatetesting.SetFeatureGateDuringTest():" >&2
echo "${missing_defers}" >&2
echo >&2
echo "Always make a deferred call to the returned function to ensure the feature gate is reset:" >&2
echo " defer utilfeaturetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.<FeatureName>, <value>)()" >&2
echo " defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.<FeatureName>, <value>)()" >&2
echo >&2
rc=1
fi