Commit a1be868
fix(ci): use owned resource in posture zone test to prevent flakiness (#703)
`TestAccSecurePostureZone` fails intermittently in CI (IBM Secure
Acceptance Tests) at Step 3/4 with "plan was not empty" on `policy_ids`.
The test used `data.sysdig_secure_posture_policies.all.policies[0].id`
to get a policy ID, but the data source returns policies in
non-deterministic order from the API. Between apply and refresh, the
data source is re-read and `policies[0]` can resolve to a different
policy, causing drift.
This replaces the data source lookup with a test-owned
`sysdig_secure_posture_policy` resource so the ID is stable across
reads.1 parent e28d86b commit a1be868
1 file changed
Lines changed: 9 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
70 | 75 | | |
71 | 76 | | |
72 | | - | |
73 | | - | |
74 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
75 | 80 | | |
0 commit comments