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

fix(rms): fix the failing test cases in RMS #6171

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

profoundwu
Copy link
Contributor

@profoundwu profoundwu commented Jan 9, 2025

What this PR does / why we need it:
fix the failing test cases in RMS
Which issue this PR fixes:
(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged)
fixes #xxx

Special notes for your reviewer:

Release note:

1. Data Source Organizational Assignment Packages: add a prechecker to skip the test case if there are no organizations permissions
2. Data Source Aggregator Advanced Query: remove external providers to avoid network instability issues
3. Data Source Aggregator Discovered Resources: remove external providers to avoid network instability issues
4. Data Source Aggregator Policy Assignments: remove external providers to avoid network instability issues
5. Data Source Aggregator Policy States: remove external providers to avoid network instability issues
6. Resource Recorder: add a prechecker to skip the test case 
7. Data Source Assignment Packages: convert var_value to JSON format

PR Checklist

  • Tests added/passed.
 make testacc TEST="./huaweicloud/services/acceptance/rms" TESTARGS="-run TestAccDataSourceRmsOrganizationalAssignmentPackages_basic"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./huaweicloud/services/acceptance/rms -v -run TestAccDataSourceRmsOrganizationalAssignmentPackages_basic -timeout 360m -parallel 4
=== RUN   TestAccDataSourceRmsOrganizationalAssignmentPackages_basic
=== PAUSE TestAccDataSourceRmsOrganizationalAssignmentPackages_basic
=== CONT  TestAccDataSourceRmsOrganizationalAssignmentPackages_basic
    acceptance.go:617: HW_ORGANIZATIONS_OPEN must be set for the acceptance test
--- SKIP: TestAccDataSourceRmsOrganizationalAssignmentPackages_basic (0.00s)
PASS
ok      github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/services/acceptance/rms       0.055s

make testacc TEST="./huaweicloud/services/acceptance/rms" TESTARGS="-run TestAccDataSourceAggregatorAdvancedQuery_basic"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./huaweicloud/services/acceptance/rms -v -run TestAccDataSourceAggregatorAdvancedQuery_basic -timeout 360m -parallel 4
=== RUN   TestAccDataSourceAggregatorAdvancedQuery_basic
=== PAUSE TestAccDataSourceAggregatorAdvancedQuery_basic
=== CONT  TestAccDataSourceAggregatorAdvancedQuery_basic
--- PASS: TestAccDataSourceAggregatorAdvancedQuery_basic (111.13s)
PASS
ok      github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/services/acceptance/rms       111.213s


 make testacc TEST="./huaweicloud/services/acceptance/rms" TESTARGS="-run TestAccDataSourceAggregatorDiscoveredResources_basic"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./huaweicloud/services/acceptance/rms -v -run TestAccDataSourceAggregatorDiscoveredResources_basic -timeout 360m -parallel 4
=== RUN   TestAccDataSourceAggregatorDiscoveredResources_basic
=== PAUSE TestAccDataSourceAggregatorDiscoveredResources_basic
=== CONT  TestAccDataSourceAggregatorDiscoveredResources_basic
--- PASS: TestAccDataSourceAggregatorDiscoveredResources_basic (123.22s)
PASS
ok      github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/services/acceptance/rms       123.288s

make testacc TEST="./huaweicloud/services/acceptance/rms" TESTARGS="-run TestAccDataSourceAggregatorPolicyAssignments_basic"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./huaweicloud/services/acceptance/rms -v -run TestAccDataSourceAggregatorPolicyAssignments_basic -timeout 360m -parallel 4
=== RUN   TestAccDataSourceAggregatorPolicyAssignments_basic
=== PAUSE TestAccDataSourceAggregatorPolicyAssignments_basic
=== CONT  TestAccDataSourceAggregatorPolicyAssignments_basic
--- PASS: TestAccDataSourceAggregatorPolicyAssignments_basic (87.38s)
PASS
ok      github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/services/acceptance/rms       87.550s

 make testacc TEST="./huaweicloud/services/acceptance/rms" TESTARGS="-run TestAccDataSourceAggregatorPolicyStates_basic"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./huaweicloud/services/acceptance/rms -v -run TestAccDataSourceAggregatorPolicyStates_basic -timeout 360m -parallel 4
=== RUN   TestAccDataSourceAggregatorPolicyStates_basic
=== PAUSE TestAccDataSourceAggregatorPolicyStates_basic
=== CONT  TestAccDataSourceAggregatorPolicyStates_basic
--- PASS: TestAccDataSourceAggregatorPolicyStates_basic (110.73s)
PASS
ok      github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/services/acceptance/rms       110.799s

make testacc TEST="./huaweicloud/services/acceptance/rms" TESTARGS="-run TestAccRecorder_basic"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./huaweicloud/services/acceptance/rms -v -run TestAccRecorder_basic -timeout 360m -parallel 4
=== RUN   TestAccRecorder_basic
=== PAUSE TestAccRecorder_basic
=== CONT  TestAccRecorder_basic
--- PASS: TestAccRecorder_basic (117.07s)
PASS
ok      github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/services/acceptance/rms       117.143s


 make testacc TEST="./huaweicloud/services/acceptance/rms" TESTARGS="-run TestAccDataSourceRmsAssignmentPackages_basic"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./huaweicloud/services/acceptance/rms -v -run TestAccDataSourceRmsAssignmentPackages_basic -timeout 360m -parallel 4
=== RUN   TestAccDataSourceRmsAssignmentPackages_basic
=== PAUSE TestAccDataSourceRmsAssignmentPackages_basic
=== CONT  TestAccDataSourceRmsAssignmentPackages_basic
--- PASS: TestAccDataSourceRmsAssignmentPackages_basic (100.04s)
PASS
ok      github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/services/acceptance/rms       100.108s


  • [] Documentation updated.

  • Schema updated.

  • CheckDeleted.

    • a. During query operation (Read Context)
      aa. Resource not found
      >>>>>> Paste the screenshot here <<<<<<

    • b. During delete/disassociate/unbind operation (Delete Context)
      ba. Resource not found
      >>>>>> Paste the screenshot here <<<<<<

@houpeng80
Copy link
Collaborator

/lgtm

@github-ci-robot github-ci-robot added the LGTM /lgtm label Jan 9, 2025
@github-actions github-actions bot removed the LGTM /lgtm label Jan 9, 2025
@Jason-Zhang9309
Copy link
Collaborator

/approve

@github-ci-robot github-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 9, 2025
@Jason-Zhang9309
Copy link
Collaborator

/lgtm

Copy link
Collaborator

@github-ci-robot github-ci-robot left a comment

Choose a reason for hiding this comment

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

This PR has been approved by: @Jason-Zhang9309

/approve

@github-ci-robot github-ci-robot added the LGTM /lgtm label Jan 9, 2025
@github-ci-robot github-ci-robot merged commit e2fbd73 into huaweicloud:master Jan 9, 2025
18 checks passed
@profoundwu profoundwu deleted the test_rms branch January 9, 2025 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. bugfix LGTM /lgtm size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants