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

azurerm_spring_cloud_api_portal - split to create/update functions #24115

Conversation

ms-henglu
Copy link
Contributor

=== RUN   TestAccSpringCloudAPIPortal_basic
=== PAUSE TestAccSpringCloudAPIPortal_basic
=== CONT  TestAccSpringCloudAPIPortal_basic
=== RUN   TestAccSpringCloudAPIPortal_requiresImport
=== PAUSE TestAccSpringCloudAPIPortal_requiresImport
=== CONT  TestAccSpringCloudAPIPortal_requiresImport
=== RUN   TestAccSpringCloudAPIPortal_complete
=== PAUSE TestAccSpringCloudAPIPortal_complete
=== CONT  TestAccSpringCloudAPIPortal_complete
=== RUN   TestAccSpringCloudAPIPortal_update
=== PAUSE TestAccSpringCloudAPIPortal_update
=== CONT  TestAccSpringCloudAPIPortal_update
--- PASS: TestAccSpringCloudAPIPortal_requiresImport (846.38s)
--- PASS: TestAccSpringCloudAPIPortal_update (849.44s)
--- PASS: TestAccSpringCloudAPIPortal_complete (904.65s)
--- PASS: TestAccSpringCloudAPIPortal_basic (1033.62s)
PASS

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 @ms-henglu. Tests look fine, but there are some typos in the error messages.

existing, err := client.Get(ctx, id.ResourceGroup, id.SpringName, id.ApiPortalName)
if err != nil {
if !utils.ResponseWasNotFound(existing.Response) {
return fmt.Errorf("retreiving %s: %+v", id, err)
Copy link
Member

Choose a reason for hiding this comment

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

This is misspelled multiple times, please fix all of them

Suggested change
return fmt.Errorf("retreiving %s: %+v", id, err)
return fmt.Errorf("retrieving %s: %+v", id, err)

Comment on lines 246 to 250
return fmt.Errorf("creating/updating %s: %+v", id, err)
}

if err := future.WaitForCompletionRef(ctx, client.Client); err != nil {
return fmt.Errorf("waiting for creation/update of %s: %+v", id, err)
Copy link
Member

Choose a reason for hiding this comment

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

The error messaged in the create function also need to be updated.

Suggested change
return fmt.Errorf("creating/updating %s: %+v", id, err)
}
if err := future.WaitForCompletionRef(ctx, client.Client); err != nil {
return fmt.Errorf("waiting for creation/update of %s: %+v", id, err)
return fmt.Errorf("updating %s: %+v", id, err)
}
if err := future.WaitForCompletionRef(ctx, client.Client); err != nil {
return fmt.Errorf("waiting for update of %s: %+v", id, err)

@ms-henglu
Copy link
Contributor Author

Hi @stephybun ,

Thanks for the code review! I've updated this PR as suggested, please take another look.

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 @ms-henglu LGTM 👍

@stephybun stephybun merged commit 61c14a4 into hashicorp:main Dec 6, 2023
22 checks passed
@github-actions github-actions bot added this to the v3.84.0 milestone Dec 6, 2023
Copy link

github-actions bot commented May 5, 2024

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 May 5, 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.

2 participants