Skip to content

Commit

Permalink
build: incorporate condition changes in e2e
Browse files Browse the repository at this point in the history
Signed-off-by: Hidde Beydals <[email protected]>
  • Loading branch information
hiddeco committed Nov 1, 2023
1 parent 3f9ed3b commit 53c9fea
Show file tree
Hide file tree
Showing 17 changed files with 40 additions and 38 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ jobs:
kubectl -n helm-system apply -f config/testdata/$test_name
echo -n ">>> Waiting for expected conditions"
count=0
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
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
echo -n '.'
sleep 5
count=$((count + 1))
Expand Down Expand Up @@ -213,7 +213,7 @@ jobs:
fi
kubectl -n helm-system delete -f config/testdata/$test_name
- name: Run install fail with remedition test
- name: Run install fail with remediation test
run: |
test_name=install-fail-remediate
kubectl -n helm-system apply -f config/testdata/$test_name
Expand All @@ -230,10 +230,10 @@ jobs:
done
echo ' done'
# Ensure release does not exist (was uninstalled).
HISTORY=$(helm -n helm-system history $test_name 2>&1; exit 0)
if [ "$HISTORY" != 'Error: release: not found' ]; then
echo -e "Unexpected release history: $HISTORY"
# Ensure release was uninstalled.
RELEASE_STATUS=$(helm -n helm-system history $test_name -o json | jq -r 'if length == 1 then .[0].status else empty end')
if [ "$RELEASE_STATUS" != "uninstalled" ]; then
echo -e "Unexpected release status: $RELEASE_STATUS"
exit 1
fi
Expand All @@ -244,7 +244,7 @@ jobs:
kubectl -n helm-system apply -f config/testdata/$test_name
echo -n ">>> Waiting for expected conditions"
count=0
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
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 .Remediated=and .Ready=="False" )' )" ]; do
echo -n '.'
sleep 5
count=$((count + 1))
Expand Down
6 changes: 4 additions & 2 deletions config/testdata/install-fail-remediate/helmrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,20 @@ kind: HelmRelease
metadata:
name: install-fail-remediate
spec:
interval: 5m
interval: 30s
chart:
spec:
chart: podinfo
version: '>=6.0.0 <7.0.0'
sourceRef:
kind: HelmRepository
name: podinfo
interval: 1m
interval: 10m
install:
remediation:
remediateLastFailure: true
uninstall:
keepHistory: true
values:
resources:
requests:
Expand Down
4 changes: 2 additions & 2 deletions config/testdata/install-fail-retry/helmrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ kind: HelmRelease
metadata:
name: install-fail-retry
spec:
interval: 5m
interval: 30s
chart:
spec:
chart: podinfo
version: '>=6.0.0 <7.0.0'
sourceRef:
kind: HelmRepository
name: podinfo
interval: 1m
interval: 10m
install:
remediation:
retries: 1
Expand Down
4 changes: 2 additions & 2 deletions config/testdata/install-fail/helmrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ kind: HelmRelease
metadata:
name: install-fail
spec:
interval: 5m
interval: 30s
chart:
spec:
chart: podinfo
version: '>=6.0.0 <7.0.0'
sourceRef:
kind: HelmRepository
name: podinfo
interval: 1m
interval: 10m
values:
resources:
requests:
Expand Down
4 changes: 2 additions & 2 deletions config/testdata/install-test-fail-ignore/helmrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ kind: HelmRelease
metadata:
name: install-test-fail-ignore
spec:
interval: 5m
interval: 30s
chart:
spec:
chart: podinfo
version: '>=6.0.0 <7.0.0'
sourceRef:
kind: HelmRepository
name: podinfo
interval: 1m
interval: 10m
test:
enable: true
ignoreFailures: true
Expand Down
4 changes: 2 additions & 2 deletions config/testdata/install-test-fail/helmrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ kind: HelmRelease
metadata:
name: install-test-fail
spec:
interval: 5m
interval: 30s
chart:
spec:
chart: podinfo
version: '>=6.0.0 <7.0.0'
sourceRef:
kind: HelmRepository
name: podinfo
interval: 1m
interval: 10m
test:
enable: true
values:
Expand Down
4 changes: 2 additions & 2 deletions config/testdata/upgrade-fail-remediate-uninstall/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ kind: HelmRelease
metadata:
name: upgrade-fail-remediate-uninstall
spec:
interval: 5m
interval: 30s
chart:
spec:
chart: podinfo
version: '>=6.0.0 <7.0.0'
sourceRef:
kind: HelmRepository
name: podinfo
interval: 1m
interval: 10m
values:
resources:
requests:
Expand Down
4 changes: 2 additions & 2 deletions config/testdata/upgrade-fail-remediate-uninstall/upgrade.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ kind: HelmRelease
metadata:
name: upgrade-fail-remediate-uninstall
spec:
interval: 5m
interval: 30s
chart:
spec:
chart: podinfo
version: '>=6.0.0 <7.0.0'
sourceRef:
kind: HelmRepository
name: podinfo
interval: 1m
interval: 10m
upgrade:
remediation:
remediateLastFailure: true
Expand Down
4 changes: 2 additions & 2 deletions config/testdata/upgrade-fail-remediate/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ kind: HelmRelease
metadata:
name: upgrade-fail-remediate
spec:
interval: 5m
interval: 30s
chart:
spec:
chart: podinfo
version: '>=6.0.0 <7.0.0'
sourceRef:
kind: HelmRepository
name: podinfo
interval: 1m
interval: 10m
values:
resources:
requests:
Expand Down
4 changes: 2 additions & 2 deletions config/testdata/upgrade-fail-remediate/upgrade.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ kind: HelmRelease
metadata:
name: upgrade-fail-remediate
spec:
interval: 5m
interval: 30s
chart:
spec:
chart: podinfo
version: '>=6.0.0 <7.0.0'
sourceRef:
kind: HelmRepository
name: podinfo
interval: 1m
interval: 10m
upgrade:
remediation:
remediateLastFailure: true
Expand Down
4 changes: 2 additions & 2 deletions config/testdata/upgrade-fail-retry/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ kind: HelmRelease
metadata:
name: upgrade-fail-retry
spec:
interval: 5m
interval: 30s
chart:
spec:
chart: podinfo
version: '>=6.0.0 <7.0.0'
sourceRef:
kind: HelmRepository
name: podinfo
interval: 1m
interval: 10m
values:
resources:
requests:
Expand Down
4 changes: 2 additions & 2 deletions config/testdata/upgrade-fail-retry/upgrade.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ kind: HelmRelease
metadata:
name: upgrade-fail-retry
spec:
interval: 5m
interval: 30s
chart:
spec:
chart: podinfo
version: '>=6.0.0 <7.0.0'
sourceRef:
kind: HelmRepository
name: podinfo
interval: 1m
interval: 10m
upgrade:
remediation:
retries: 1
Expand Down
4 changes: 2 additions & 2 deletions config/testdata/upgrade-fail/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ kind: HelmRelease
metadata:
name: upgrade-fail
spec:
interval: 5m
interval: 30s
chart:
spec:
chart: podinfo
version: '>=6.0.0 <7.0.0'
sourceRef:
kind: HelmRepository
name: podinfo
interval: 1m
interval: 10m
values:
resources:
requests:
Expand Down
4 changes: 2 additions & 2 deletions config/testdata/upgrade-fail/upgrade.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ kind: HelmRelease
metadata:
name: upgrade-fail
spec:
interval: 5m
interval: 30s
chart:
spec:
chart: podinfo
version: '>=6.0.0 <7.0.0'
sourceRef:
kind: HelmRepository
name: podinfo
interval: 1m
interval: 10m
values:
resources:
requests:
Expand Down
4 changes: 2 additions & 2 deletions config/testdata/upgrade-test-fail/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ kind: HelmRelease
metadata:
name: upgrade-test-fail
spec:
interval: 5m
interval: 30s
chart:
spec:
chart: podinfo
version: '>=6.0.0 <7.0.0'
sourceRef:
kind: HelmRepository
name: podinfo
interval: 1m
interval: 10m
values:
resources:
requests:
Expand Down
4 changes: 2 additions & 2 deletions config/testdata/upgrade-test-fail/upgrade.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ kind: HelmRelease
metadata:
name: upgrade-test-fail
spec:
interval: 5m
interval: 30s
chart:
spec:
chart: podinfo
version: '>=6.0.0 <7.0.0'
sourceRef:
kind: HelmRepository
name: podinfo
interval: 1m
interval: 10m
test:
enable: true
values:
Expand Down
2 changes: 1 addition & 1 deletion config/testdata/valuesfrom/helmrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
sourceRef:
kind: HelmRepository
name: podinfo
interval: 1m
interval: 10m
valuesFrom:
- kind: ConfigMap
name: valuesfrom-config
Expand Down

0 comments on commit 53c9fea

Please sign in to comment.