@@ -169,7 +169,7 @@ jobs:
169
169
kubectl -n helm-system apply -f config/testdata/$test_name
170
170
echo -n ">>> Waiting for expected conditions"
171
171
count=0
172
- until [ 'true' == "$( kubectl -n helm-system get helmrelease/$test_name -o json | jq '.status.conditions | map( { (.type): .status } ) | add | .Released=="False " and .TestSuccess=="False" and .Ready=="False"' )" ]; do
172
+ until [ 'true' == "$( kubectl -n helm-system get helmrelease/$test_name -o json | jq '.status.conditions | map( { (.type): .status } ) | add | .Released=="True " and .TestSuccess=="False" and .Ready=="False"' )" ]; do
173
173
echo -n '.'
174
174
sleep 5
175
175
count=$((count + 1))
@@ -213,7 +213,7 @@ jobs:
213
213
fi
214
214
215
215
kubectl -n helm-system delete -f config/testdata/$test_name
216
- - name : Run install fail with remedition test
216
+ - name : Run install fail with remediation test
217
217
run : |
218
218
test_name=install-fail-remediate
219
219
kubectl -n helm-system apply -f config/testdata/$test_name
@@ -230,21 +230,22 @@ jobs:
230
230
done
231
231
echo ' done'
232
232
233
- # Ensure release does not exist ( was uninstalled) .
234
- HISTORY =$(helm -n helm-system history $test_name 2>&1; exit 0 )
235
- if [ "$HISTORY " != 'Error: release: not found' ]; then
236
- echo -e "Unexpected release history : $HISTORY "
233
+ # Ensure release was uninstalled.
234
+ RELEASE_STATUS =$(helm -n helm-system history $test_name -o json | jq -r 'if length == 1 then .[0].status else empty end' )
235
+ if [ "$RELEASE_STATUS " != "uninstalled" ]; then
236
+ echo -e "Unexpected release status : $RELEASE_STATUS "
237
237
exit 1
238
238
fi
239
239
240
240
kubectl -n helm-system delete -f config/testdata/$test_name
241
+ helm -n helm-system delete $test_name
241
242
- name : Run install fail with retry test
242
243
run : |
243
244
test_name=install-fail-retry
244
245
kubectl -n helm-system apply -f config/testdata/$test_name
245
246
echo -n ">>> Waiting for expected conditions"
246
247
count=0
247
- until [ 'true' == "$( kubectl -n helm-system get helmrelease/$test_name -o json | jq '.status.installFailures == 2 and ( .status.conditions | map( { (.type): .status } ) | add | .Released=="False" and .Ready=="False" )' )" ]; do
248
+ until [ 'true' == "$( kubectl -n helm-system get helmrelease/$test_name -o json | jq '.status.installFailures == 2 and ( .status.conditions | map( { (.type): .status } ) | add | .Released=="False" and .Ready=="False" and .Stalled=="True" )' )" ]; do
248
249
echo -n '.'
249
250
sleep 5
250
251
count=$((count + 1))
@@ -290,7 +291,7 @@ jobs:
290
291
kubectl -n helm-system apply -f config/testdata/$test_name/upgrade.yaml
291
292
echo -n ">>> Waiting for expected conditions"
292
293
count=0
293
- until [ 'true' == "$( kubectl -n helm-system get helmrelease/$test_name -o json | jq '.status.conditions | map( { (.type): .status } ) | add | .Released=="False" and .Ready=="False"' )" ]; do
294
+ until [ 'true' == "$( kubectl -n helm-system get helmrelease/$test_name -o json | jq '.status.conditions | map( { (.type): .status } ) | add | .Released=="False" and .Ready=="False" and .Stalled=="True" ' )" ]; do
294
295
echo -n '.'
295
296
sleep 5
296
297
count=$((count + 1))
@@ -336,7 +337,7 @@ jobs:
336
337
kubectl -n helm-system apply -f config/testdata/$test_name/upgrade.yaml
337
338
echo -n ">>> Waiting for expected conditions"
338
339
count=0
339
- until [ 'true' == "$( kubectl -n helm-system get helmrelease/$test_name -o json | jq '.status.conditions | map( { (.type): .status } ) | add | .Released=="False " and .TestSuccess=="False" and .Ready=="False"' )" ]; do
340
+ until [ 'true' == "$( kubectl -n helm-system get helmrelease/$test_name -o json | jq '.status.conditions | map( { (.type): .status } ) | add | .Released=="True " and .TestSuccess=="False" and .Ready=="False" and .Stalled=="True "' )" ]; do
340
341
echo -n '.'
341
342
sleep 5
342
343
count=$((count + 1))
0 commit comments