This commit is contained in:
Robert Brennan
2022-11-29 12:24:44 -05:00
parent a809875682
commit 1866a9649b
+7 -7
View File
@@ -137,11 +137,6 @@ if [ $pod_count != 2 ]; then
echo "Existing deployment was unable to scale after webhook installed: found $pod_count pods"
fi
if [ -z $SKIP_FINAL_CLEANUP ]; then
echo "Doing final cleanup..."
clean_up
fi
echo "Checking mutations"
helm upgrade --install polaris fairwinds-stable/polaris --namespace polaris --create-namespace \
--set dashboard.enable=false \
@@ -152,9 +147,9 @@ check_webhook_is_ready
kubectl apply -n mutate-test -f test/webhook_cases/mutation.deployment.yaml
if ! kubectl get -n mutate-test deployment nginx-deployment-mutated -oyaml | grep imagePullPolicy: Always; then
ALL_TESTS_PASSED=0
echo "Failed to mutate imagePullPolicy"
echo -e "${RED}****Test Failed: Polaris failed to mutate this resource****${NC}"
else
echo "Mutation OK"
echo -e "${GREEN}****Test Passed: Polaris mutated this resource****${NC}"
fi
kubectl delete -n mutate-test -f test/webhook_cases/mutation.deployment.yaml || true
sleep 5
@@ -162,6 +157,11 @@ sleep 5
echo "Done with tests"
if [ -z $SKIP_FINAL_CLEANUP ]; then
echo "Doing final cleanup..."
clean_up
fi
#Verify that all the tests passed.
if [ $ALL_TESTS_PASSED -eq 1 ]; then
echo "Tests Passed."