-
Notifications
You must be signed in to change notification settings - Fork 23
validate: use golden yaml for expected status #500
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let name this after the application tested - appset-deploy-rbd - like the testdata directory. In the future we will have more testdata and golden files. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,112 @@ | ||
| # Golden file for the expected report.ApplicationStatus produced by | ||
| # TestValidateApplicationPassed in command_test.go. | ||
| # | ||
| # Generated from the report.ApplicationStatus struct that was previously | ||
| # hardcoded in the test, by temporarily marshaling it to yaml and writing | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No need to detail how it used to work ("previously hardcoded in the test") |
||
| # it to this path. See the commit message for the exact steps used. | ||
| # | ||
| # If the test fixtures under pkg/testdata/appset-deploy-rbd/ change, | ||
| # this file must be regenerated to match. | ||
|
Comment on lines
+1
to
+9
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The useful parts are only:
|
||
|
|
||
| hub: | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add a comment to the file explaining how it is generated and when we need to update it. |
||
| drpc: | ||
| action: | ||
| state: ok ✅ | ||
| clusterTime: "2025-07-29T17:24:30Z" | ||
| conditions: | ||
| - state: ok ✅ | ||
| type: Available | ||
| - state: ok ✅ | ||
| type: PeerReady | ||
| - state: ok ✅ | ||
| type: Protected | ||
| deleted: | ||
| state: ok ✅ | ||
| drPolicy: dr-policy-1m | ||
| lastGroupSyncTime: | ||
| state: ok ✅ | ||
| value: "2025-07-29T17:23:00Z" | ||
| name: appset-deploy-rbd | ||
| namespace: argocd | ||
| phase: | ||
| state: ok ✅ | ||
| value: Deployed | ||
| progression: | ||
| state: ok ✅ | ||
| value: Completed | ||
| schedulingInterval: | ||
| state: ok ✅ | ||
| value: 1m0s | ||
| primaryCluster: | ||
| name: dr1 | ||
| vrg: | ||
| clusterTime: "2025-07-29T17:24:30Z" | ||
| conditions: | ||
| - state: ok ✅ | ||
| type: DataReady | ||
| - state: ok ✅ | ||
| type: ClusterDataReady | ||
| - state: ok ✅ | ||
| type: ClusterDataProtected | ||
| - state: ok ✅ | ||
| type: KubeObjectsReady | ||
| - state: ok ✅ | ||
| type: NoClusterDataConflict | ||
| deleted: | ||
| state: ok ✅ | ||
| lastGroupSyncTime: | ||
| state: ok ✅ | ||
| value: "2025-07-29T17:23:00Z" | ||
| name: appset-deploy-rbd | ||
| namespace: e2e-appset-deploy-rbd | ||
| protectedPVCs: | ||
| - conditions: | ||
| - state: ok ✅ | ||
| type: DataReady | ||
| - state: ok ✅ | ||
| type: ClusterDataProtected | ||
| deleted: | ||
| state: ok ✅ | ||
| name: busybox-pvc | ||
| namespace: e2e-appset-deploy-rbd | ||
| phase: | ||
| state: ok ✅ | ||
| value: Bound | ||
| replication: volrep | ||
| schedulingInterval: | ||
| state: ok ✅ | ||
| value: 1m0s | ||
| state: | ||
| state: ok ✅ | ||
| value: Primary | ||
| s3: | ||
| profiles: | ||
| state: ok ✅ | ||
| value: | ||
| - gathered: | ||
| state: ok ✅ | ||
| value: true | ||
| name: minio-on-dr1 | ||
| - gathered: | ||
| state: ok ✅ | ||
| value: true | ||
| name: minio-on-dr2 | ||
| secondaryCluster: | ||
| name: dr2 | ||
| vrg: | ||
| clusterTime: "2025-07-29T17:24:30Z" | ||
| conditions: | ||
| - state: ok ✅ | ||
| type: NoClusterDataConflict | ||
| deleted: | ||
| state: ok ✅ | ||
| lastGroupSyncTime: | ||
| state: ok ✅ | ||
| name: appset-deploy-rbd | ||
| namespace: e2e-appset-deploy-rbd | ||
| schedulingInterval: | ||
| state: ok ✅ | ||
| value: 1m0s | ||
| state: | ||
| state: ok ✅ | ||
| value: Secondary | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.