mirror of
https://github.com/FairwindsOps/polaris.git
synced 2026-08-23 22:26:34 +00:00
fix test
This commit is contained in:
@@ -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."
|
||||
|
||||
Reference in New Issue
Block a user