You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thenecho -e "\\n${RED}FAILLED! Error, the expected specs are not the same as the actual ones.${NC}"&&exit 1 ;fi
93
+
thenecho -e "\\n${RED}FAILED! Error, the expected specs are not the same as the actual ones.${NC}"&&exit 1 ;fi
96
94
echo -e "${GREEN} -- OK --${NC}\\n"
97
95
98
96
# Verify that trying to add a pod with resources exceeding what is left to use results in an error
99
97
echo -e "\\n ${PURPLE}-- Trying to add a pod over max ressources (must be forbidden) --${NC}"&& sleep 3
100
98
if kubectl apply -f $ROOT/e2e/KindConfig/pod5.yml -n $NS;# if the command does NOT result in an error then the test fails
101
-
thenecho -e "\\n${RED}FAILLED! error durring Pod test: The pod must not be accepted because it uses more ressources than what's left to use.${NC}"&&exit 1 ;fi
99
+
thenecho -e "\\n${RED}FAILED! error during Pod test: The pod must not be accepted because it uses more ressources than what's left to use.${NC}"&&exit 1 ;fi
102
100
echo -e "${GREEN} -- OK --${NC}\\n"
103
101
104
102
# Apply a new quotaclaim to scale up the resourses
105
103
# verify that the claim is accepted (nothing should appear in the 'status' field)
106
104
echo -e "\\n ${PURPLE}-- Scale UP --${NC}"
107
105
kubectl apply -f $ROOT/e2e/KotaryService/QuotaClaimUp.yaml -n $NS&& sleep 3 #apply the new rqc
108
-
kubectl get $QUOTACLAIM -n $NS -o=json > temp.json #get the claim
106
+
kubectl get $QUOTACLAIM -n $NS -o=json > temp.json #get the claim
109
107
phase=$(jq ' .items[].status.phase' temp.json)#get the status of the claim if the claim has been accepted $phase will be empty
110
108
if [ "$phase"!="" ];#if the phase isn't empty, then it is an error
111
-
thenecho -e "\\n${RED}FAILLED! error durring Scale UP: the Claim is $phase${NC}\\n"&& kubectl get $QUOTACLAIM -n $NS&&exit 1 ;fi
109
+
thenecho -e "\\n${RED}FAILED! error during Scale UP: the Claim is $phase${NC}\\n"&& kubectl get $QUOTACLAIM -n $NS&&exit 1 ;fi
112
110
echo -e "${GREEN} -- OK --${NC}\\n"
113
111
114
112
# Apply a new quotaclaim to scale up the resourses but this claim is to big,
kubectl get $QUOTACLAIM -n $NS -o=json > temp.json
131
129
phase=$(jq ' .items[].status.phase' temp.json)
132
130
if [ "$phase"!="\"PENDING\"" ];#The claim MUST be pending, else it is an error
133
-
thenecho -e "\\n${RED}FAILLED! error durring pending test: the Claim is not set to PENDING${NC}"&& kubectl get $QUOTACLAIM -n $NS&&exit 1 ;fi
131
+
thenecho -e "\\n${RED}FAILED! error during pending test: the Claim is not set to PENDING${NC}"&& kubectl get $QUOTACLAIM -n $NS&&exit 1 ;fi
134
132
echo -e "${GREEN} -- OK --${NC}\\n"
135
133
136
134
# Reduce the current usage of cpu and memory by deleting a pod
137
-
echo -e "\\n ${PURPLE}-- Delete pod-4: the pending claim should now be accepted --${NC}"&& sleep 3
135
+
echo -e "\\n ${PURPLE}-- Delete pod-4: the pending claim should now be accepted --${NC}"
138
136
kubectl delete pod -n $NS podtest-4 && sleep 3
139
-
140
137
# assert that, after deletion of the pod, the 'pending' claim is now accepted
141
138
kubectl get $QUOTACLAIM -n $NS -o=json > temp.json
142
139
phase=$(jq ' .items[].status.phase' temp.json)
143
140
if [ "$phase"!="" ];#The status must be empty because the claim should now be accepted. (remember: empty=accepted)
144
-
thenecho -e "\\n${RED}FAILLED! error durring pending test: the PENDING Claim is not accepted after resources are updated${NC}"&& kubectl get $QUOTACLAIM -n $NS&&exit 1;fi
141
+
thenecho -e "\\n${RED}FAILED! error during pending test: the PENDING Claim is not accepted after resources are updated${NC}"&& kubectl get $QUOTACLAIM -n $NS&&exit 1;fi
0 commit comments