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

resource - fix various tests #27544

Merged
merged 6 commits into from
Nov 14, 2024
Merged

resource - fix various tests #27544

merged 6 commits into from
Nov 14, 2024

Conversation

mbfrahry
Copy link
Member

@mbfrahry mbfrahry commented Sep 30, 2024

--- PASS: TestAccResourceGroup_disappears (41.76s)
--- PASS: TestAccResourceManagementPrivateLinkAssociation_requiresImport (72.94s)
  • Bug Fix
  • New Feature (ie adding a service, resource, or data source)
  • Enhancement
  • Breaking Change

@mbfrahry mbfrahry changed the title resource - fix various tests resource - fix various tests Sep 30, 2024
@@ -195,6 +195,9 @@ func resourceResourceGroupDelete(d *pluginsdk.ResourceData, meta interface{}) er
err = pluginsdk.Retry(10*time.Minute, func() *pluginsdk.RetryError {
results, err := resourceClient.ListByResourceGroupComplete(ctx, id.ResourceGroup, "", "provisioningState", utils.Int32(500))
if err != nil {
if strings.Contains(err.Error(), "could not be found") {
Copy link
Member

Choose a reason for hiding this comment

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

Error messages can change without us knowing, I wonder if we can check the response code of results using response.WasNotFound(results.HttpResponse) instead?

@@ -222,6 +226,9 @@ func resourceResourceGroupDelete(d *pluginsdk.ResourceData, meta interface{}) er

deleteFuture, err := client.Delete(ctx, id.ResourceGroup, "")
if err != nil {
if strings.Contains(err.Error(), "could not be found") {
Copy link
Member

Choose a reason for hiding this comment

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

Sorry should have left a comment here as well, could apply the same check on the Response here like we did above?

Copy link
Member

@stephybun stephybun left a comment

Choose a reason for hiding this comment

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

Thanks @mbfrahry LGTM 🥟

@katbyte katbyte merged commit 9bab25b into main Nov 14, 2024
29 of 30 checks passed
@katbyte katbyte deleted the t-resources branch November 14, 2024 01:04
@github-actions github-actions bot added this to the v4.10.0 milestone Nov 14, 2024
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants