Skip to content

Commit

Permalink
Fix TODOs with array assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
nolancon committed Apr 8, 2024
1 parent a41e2df commit f015fe3
Showing 1 changed file with 30 additions and 16 deletions.
46 changes: 30 additions & 16 deletions e2e/tests/stable/chainsaw-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -190,14 +190,26 @@ spec:
reason: Available
status: "True"
type: Ready
# TODO: These conditions are appearing in the wrong order which is causing the test to fail.
# conditions:
# - reason: Available
# status: "True"
# type: Ready
# - reason: ReconcileSuccess
# status: "True"
# type: Synced
# Extra assertion for overall Bucket conditions.
# This method of iterative assertions is necessary here because
# these conditions do not always appear in the same order.
# We perform this as a separate assertion, after the initial
# assertion because this method will result in a nil error
# if the conditions do not exist.
- assert:
resource:
apiVersion: provider-ceph.ceph.crossplane.io/v1alpha1
kind: Bucket
metadata:
name: lc-config-bucket
status:
~.(conditions[?reason == 'Available']):
status: "True"
type: Ready
~.(conditions[?reason == 'ReconcileSuccess']):
status: "True"
type: Synced


# Assert auto-pause-bucket is synced with paused label.
- assert:
Expand Down Expand Up @@ -290,14 +302,16 @@ spec:
reason: Available
status: "True"
type: Ready
# TODO: These conditions are appearing in the wrong order which is causing the test to fail.
# conditions:
# - reason: Available
# status: "True"
# type: Ready
# - reason: ReconcileSuccess
# status: "True"
# type: Synced
# This method of iterative assertions is necessary here because
# these conditions do not always appear in the same order.
# It's safe to perform this assertions because we have already
# asserted that these conditios exist.
~.(conditions[?reason == 'Available']):
status: "True"
type: Ready
~.(conditions[?reason == 'ReconcileSuccess']):
status: "True"
type: Synced

- name: Check for buckets on Localstack backends.
try:
Expand Down

0 comments on commit f015fe3

Please sign in to comment.