Skip to content
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

Ignore deletion_delay_hours when importing during TestAccVmwareenginePrivateCloud_vmwareEnginePrivateCloudUpdate #11295

Merged

Conversation

SarahFrench
Copy link
Contributor

@SarahFrench SarahFrench commented Jul 30, 2024

Addresses issues like this when testing import of the resource:

------- Stdout: -------
=== RUN   TestAccVmwareenginePrivateCloud_vmwareEnginePrivateCloudUpdate
=== PAUSE TestAccVmwareenginePrivateCloud_vmwareEnginePrivateCloudUpdate
=== CONT  TestAccVmwareenginePrivateCloud_vmwareEnginePrivateCloudUpdate
    vcr_utils.go:152: Step 2/4 error running import: ImportStateVerify attributes not equivalent. Difference is shown below. The - symbol indicates attributes missing after import.
          map[string]string{
        -   "deletion_delay_hours": "1",
          }
    testing_new.go:90: Error running post-test destroy, there may be dangling resources: exit status 1
        Error: Error waiting to delete PrivateCloud: got pending status "found"
--- FAIL: TestAccVmwareenginePrivateCloud_vmwareEnginePrivateCloudUpdate (17756.87s)
FAIL

This field is a virtual field (#10764) so doesn't have a value immediately after import.

Release Note Template for Downstream PRs (will be copied)


@SarahFrench SarahFrench changed the title Ignore deletion_delay_hours when importing Ignore deletion_delay_hours when importing during TestAccVmwareenginePrivateCloud_vmwareEnginePrivateCloudUpdate Jul 30, 2024
@modular-magician
Copy link
Collaborator

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.

google provider: Diff ( 1 file changed, 2 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 1 file changed, 2 insertions(+), 2 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 16
Passed tests: 11
Skipped tests: 5
Affected tests: 0

Click here to see the affected service packages
  • vmwareengine

$\textcolor{green}{\textsf{All tests passed!}}$

View the build log

@SarahFrench SarahFrench requested a review from swamitagupta July 30, 2024 18:25
@SarahFrench SarahFrench marked this pull request as ready for review July 30, 2024 18:25
Copy link
Member

@swamitagupta swamitagupta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thanks for adding this fix Sarah!

Could you please elaborate why a failed import fails the post delete check here and returns the Private Cloud in a 'found' state?

testing_new.go:90: Error running post-test destroy, there may be dangling resources: exit status 1
        Error: Error waiting to delete PrivateCloud: got pending status "found"

@SarahFrench
Copy link
Contributor Author

@swamitagupta I think those are two separate problems with the test. First the test fails due to a failed assertion that the state of the imported resource should match its state from when it was being managed via the test framework (which this PR fixes), and then the test framework is reporting a failure because it's unable to delete the resources it provisioned.

I believe "got pending status "found"" is an error surfaced from hashicorp/terraform-plugin-testing, and is due to how the the testing framework is waiting for a 404 after deletion but is still 'finding' the resource when performing GET requests.

@SarahFrench SarahFrench requested a review from BBBmau July 31, 2024 10:49
@SarahFrench SarahFrench merged commit 8a4ab31 into GoogleCloudPlatform:main Jul 31, 2024
14 checks passed
avianap pushed a commit to avianap/magic-modules that referenced this pull request Jul 31, 2024
Charlesleonius pushed a commit to Charlesleonius/magic-modules that referenced this pull request Aug 1, 2024
rainshen49 pushed a commit to rainshen49/magic-modules that referenced this pull request Aug 12, 2024
BBBmau pushed a commit to bschaatsbergen/magic-modules that referenced this pull request Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants