Skip to content

Move gcp_sweeper_test.go to the sweeper package#8217

Merged
zli82016 merged 2 commits into
mainfrom
move-sweeper-test
Aug 14, 2023
Merged

Move gcp_sweeper_test.go to the sweeper package#8217
zli82016 merged 2 commits into
mainfrom
move-sweeper-test

Conversation

@zli82016

@zli82016 zli82016 commented Jun 27, 2023

Copy link
Copy Markdown
Member

The file gcp_sweeper_test.go.erb is moved from the google package to the sweeper_test package in the folder sweeper.

With this change, the command to run the sweepers in the teamcity settings need to change, too.

If this PR is for Terraform, I acknowledge that I have:

  • Searched through the issue tracker for an open issue that this either resolves or contributes to, commented on it to claim it, and written "fixes {url}" or "part of {url}" in this PR description. If there were no relevant open issues, I opened one and commented that I would like to work on it (not necessary for very small changes).
  • Ensured that all new fields I added that can be set by a user appear in at least one example (for generated resources) or third_party test (for handwritten resources or update tests).
  • Generated Terraform providers, and ran make test and make lint in the generated providers to ensure it passes unit and linter tests.
  • Ran relevant acceptance tests using my own Google Cloud project and credentials (If the acceptance tests do not yet pass or you are unable to run them, please let your reviewer know).
  • Read Write release notes before writing my release note below.

Release Note Template for Downstream PRs (will be copied)


@zli82016

zli82016 commented Jun 27, 2023

Copy link
Copy Markdown
Member Author

go test ./google/sweeper -v -sweep="us-central1" -sweep-run="CloudRunV2Job"
2023/06/27 11:05:32 [DEBUG] Running Sweepers for region (us-central1):
2023/06/27 11:05:32 [DEBUG] Running Sweeper (CloudRunV2Job) in region (us-central1)
2023/06/27 11:05:32 [INFO][SWEEPER_LOG] Starting sweeper for CloudRunV2Job
2023/06/27 11:05:32 [INFO] Authenticating using configured Google JSON 'credentials'...
2023/06/27 11:05:32 [INFO] -- Scopes: [https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/userinfo.email]
2023/06/27 11:05:32 [INFO] Authenticating using configured Google JSON 'credentials'...
2023/06/27 11:05:32 [INFO] -- Scopes: [https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/userinfo.email]
2023/06/27 11:05:32 [DEBUG] Waiting for state to become: [success]
2023/06/27 11:05:32 [DEBUG] Waiting for state to become: [success]
2023/06/27 11:05:32 [DEBUG] Retry Transport: starting RoundTrip retry loop
2023/06/27 11:05:32 [DEBUG] Retry Transport: request attempt 0
2023/06/27 11:05:33 [DEBUG] Retry Transport: Stopping retries, last request was successful
2023/06/27 11:05:33 [DEBUG] Retry Transport: Returning after 1 attempts
2023/06/27 11:05:33 [INFO][SWEEPER_LOG] Nothing found in response.
2023/06/27 11:05:33 [DEBUG] Completed Sweeper (CloudRunV2Job) in region (us-central1) in 737.682084ms
2023/06/27 11:05:33 Completed Sweepers for region (us-central1) in 737.813ms
2023/06/27 11:05:33 Sweeper Tests for region (us-central1) ran successfully:
- CloudRunV2Job
ok github.com/hashicorp/terraform-provider-google/google/sweeper 1.182s

@modular-magician

Copy link
Copy Markdown
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.

Terraform GA: Diff ( 1 file changed, 1 insertion(+), 1 deletion(-))
Terraform Beta: Diff ( 1 file changed, 1 insertion(+), 1 deletion(-))
TF Conversion: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

@modular-magician

Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 2821
Passed tests 2518
Skipped tests: 301
Affected tests: 2

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
TestAccComputeNetworkEndpoints_networkEndpointsBasic|TestAccComputeFirewallPolicyRule_multipleRules

Get to know how VCR tests work

@modular-magician

Copy link
Copy Markdown
Collaborator

Tests passed during RECORDING mode:
TestAccComputeNetworkEndpoints_networkEndpointsBasic[Debug log]

Tests failed during RECORDING mode:
TestAccComputeFirewallPolicyRule_multipleRules[Error message] [Debug log]

Please fix these to complete your PR
View the build log or the debug log for each test

@zli82016
zli82016 requested review from a team and melinath and removed request for a team June 27, 2023 20:47

@melinath melinath left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could you elaborate on why this change is necessary?

@zli82016

Copy link
Copy Markdown
Member Author

Could you elaborate on why this change is necessary?

Currently, the file gcp_sweeper_test.go.erb is in the utils folder in the google package. We want to move all of the files in the utils folder to the specific folder/package.

@zli82016
zli82016 requested a review from melinath June 28, 2023 18:23

@SarahFrench SarahFrench left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@modular-magician

Copy link
Copy Markdown
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.

Terraform GA: Diff ( 2 files changed, 2 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 2 files changed, 2 insertions(+), 2 deletions(-))

@modular-magician

Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 2943
Passed tests 2641
Skipped tests: 302
Affected tests: 0

$\textcolor{green}{\textsf{All tests passed in REPLAYING mode.}}$
View the build log

@zli82016

Copy link
Copy Markdown
Member Author

I am going to merge this PR as the old Teamcity projects are read only now and no tests will be run in the old projects.

@zli82016
zli82016 merged commit a49d089 into main Aug 14, 2023
@zli82016
zli82016 deleted the move-sweeper-test branch August 14, 2023 23:05
DanielRieske pushed a commit to DanielRieske/magic-modules that referenced this pull request Aug 15, 2023
…8217)

* Move gcp_sweeper_test.go to the sweeper package

* Change the sweeper path
nevzheng pushed a commit to nevzheng/magic-modules that referenced this pull request Aug 16, 2023
…8217)

* Move gcp_sweeper_test.go to the sweeper package

* Change the sweeper path
rainshen49 pushed a commit to rainshen49/magic-modules that referenced this pull request Aug 21, 2023
…8217)

* Move gcp_sweeper_test.go to the sweeper package

* Change the sweeper path
joelkattapuram pushed a commit to joelkattapuram/magic-modules that referenced this pull request Sep 20, 2023
…8217)

* Move gcp_sweeper_test.go to the sweeper package

* Change the sweeper path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants