fix failing posture test
Release Note Template for Downstream PRs (will be copied)
Hello! I am a robot. Tests will require approval from a repository maintainer to run.
@roaks3, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look.
You can help make sure that review is quick by doing a self-review and by running impacted tests locally.
/gcbrun
Hi @roaks3, it doesn't seem clear to me as why the test is failing, can you please take a look
Hmm, sorry I didn't notice the issue here. We have been making some changes that affect the checks for our PRs, and sometimes a re-run or rebase is required.
I'll try to kick the jobs again, but if that doesn't work, I think you'll need to rebase the PR.
/gcbrun
Hi there, I'm the Modular magician. I've detected the following information about your changes:
Diff report
Your PR generated some diffs in downstreams - here they are.
Terraform GA: Diff ( 2 files changed, 8 insertions(+), 8 deletions(-)) Terraform Beta: Diff ( 2 files changed, 8 insertions(+), 8 deletions(-))
Tests analytics
Total tests: 4
Passed tests: 3
Skipped tests: 0
Affected tests: 1
Click here to see the affected service packages
- securityposture
Action taken
Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccSecurityposturePostureDeployment_securityposturePostureDeploymentBasicExample
$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccSecurityposturePostureDeployment_securityposturePostureDeploymentBasicExample[Debug log]
$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$
$\textcolor{green}{\textsf{All tests passed!}}$ View the build log or the debug log for each test
Tests pass and I see nothing wrong, but I'm curious why this fixed the test. Would you mind sharing how this solved the problem (would also help for posterity)?
Actually we have two resources: Posture and PostureDeployment. Posture deployment depends on Posture thus its test also involves creation of a Posture. Both Posture and Posture Deployment are organization level resources. Earlier both the tests had the same name for Posture resource, thus when run in parallel, one of the tests gets the posture created successfully and the other gets already exist error. Thus, have changed the names to prevent the already exist error.
Makes sense, thank you! Will re-run checks after the rebase, then this should be good to merge.
/gcbrun
Oh, and so it looks like this might resolve https://github.com/hashicorp/terraform-provider-google/issues/17399 (or at least part of it)?
Hi there, I'm the Modular magician. I've detected the following information about your changes:
Diff report
Your PR generated some diffs in downstreams - here they are.
Terraform GA: Diff ( 4 files changed, 8 insertions(+), 8 deletions(-)) Terraform Beta: Diff ( 4 files changed, 8 insertions(+), 8 deletions(-))
Tests analytics
Total tests: 4
Passed tests: 2
Skipped tests: 0
Affected tests: 2
Click here to see the affected service packages
- securityposture
Action taken
Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccSecurityposturePostureDeployment_securityposturePostureDeploymentBasicExample|TestAccSecurityposturePosture_securityposturePostureBasicExample
$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccSecurityposturePostureDeployment_securityposturePostureDeploymentBasicExample[Debug log]
TestAccSecurityposturePosture_securityposturePostureBasicExample[Debug log]
$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$
$\textcolor{green}{\textsf{All tests passed!}}$ View the build log or the debug log for each test
Oh, and so it looks like this might resolve hashicorp/terraform-provider-google#17399 (or at least part of it)?
Yes