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

chore(dws/queue): replacing the list api with the query detail api and adjust acceptance test #5436

Merged
merged 2 commits into from
Sep 3, 2024

Conversation

wuzhuanhong
Copy link
Contributor

@wuzhuanhong wuzhuanhong commented Aug 22, 2024

What this PR does / why we need it:

  1. Replacing the list API with the query detail API.
  2. Adjust acceptance test corresponding to workload queue.
  3. Modify workload queue resource document.

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:


PR Checklist

  • Tests added/passed.
make testacc TEST=./huaweicloud/services/acceptance/dws TESTARGS='-run WorkloadQueue'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./huaweicloud/services/acceptance/dws -v -run WorkloadQueue -timeout 360m -parallel 4
=== RUN   TestAccDataSourceWorkloadQueues_basic
=== PAUSE TestAccDataSourceWorkloadQueues_basic
=== RUN   TestAccDataSourceWorkloadQueues_logicalCluster
=== PAUSE TestAccDataSourceWorkloadQueues_logicalCluster
=== RUN   TestAccResourceWorkloadQueue_basic
=== PAUSE TestAccResourceWorkloadQueue_basic
=== RUN   TestAccResourceWorkloadQueue_basic_logicalClusterName
=== PAUSE TestAccResourceWorkloadQueue_basic_logicalClusterName
=== CONT  TestAccDataSourceWorkloadQueues_basic
=== CONT  TestAccResourceWorkloadQueue_basic
=== CONT  TestAccDataSourceWorkloadQueues_logicalCluster
=== CONT  TestAccResourceWorkloadQueue_basic_logicalClusterName
--- PASS: TestAccResourceWorkloadQueue_basic_logicalClusterName (53.39s)
--- PASS: TestAccResourceWorkloadQueue_basic (55.06s)
--- PASS: TestAccDataSourceWorkloadQueues_logicalCluster (98.84s)
--- PASS: TestAccDataSourceWorkloadQueues_basic (123.69s)
PASS
ok      github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/services/acceptance/dws       123.754s
  • Documentation updated.

  • Schema updated.

  • CheckDeleted.

    • a. During query operation (Read Context)
      aa. Resource not found
      image

      ab. Related resources (parent resources) not found
      The DWS cluster ID does not exist (standard UUID).
      image

      Unspecifies logical cluster name in logical cluster mode.
      image

      Logical cluster name does not exist in logical cluster mode.
      image

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

@wuzhuanhong
Copy link
Contributor Author

make testacc TEST=./huaweicloud/services/acceptance/dws TESTARGS='-run TestAccResourceWorkloadQueue_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./huaweicloud/services/acceptance/dws -v -run TestAccResourceWorkloadQueue_ -timeout 360m -parallel 4
=== RUN TestAccResourceWorkloadQueue_basic
=== PAUSE TestAccResourceWorkloadQueue_basic
=== RUN TestAccResourceWorkloadQueue_logicalClusterName
=== PAUSE TestAccResourceWorkloadQueue_logicalClusterName
=== CONT TestAccResourceWorkloadQueue_basic
=== CONT TestAccResourceWorkloadQueue_logicalClusterName
--- PASS: TestAccResourceWorkloadQueue_basic (44.93s)
--- PASS: TestAccResourceWorkloadQueue_logicalClusterName (45.03s)
PASS
ok github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/services/acceptance/dws 45.100s

return common.CheckDeletedDiag(d, err, "DWS workload queue")
}
// 1. "DWS.0047": The cluster ID is a standard UUID, the status code is 404.
// 2. Resource does not exist.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// 2. Resource does not exist.
// 2. The API response includes these cases about resource not found:

@@ -111,8 +112,8 @@ and **cpu_share** are exclusive, one of them must be set, and the **cpu_limit**
no restriction, unit: MB.
+ When the `resource name` is **activestatements**, the value range is from `-1` to `2,147,483,647`, where `-1` and
`0` indicates no control.
+ When the `resource name` is **cpu_limit**, the value range is from `0` to `99`, unit: %.
+ When the `resource name` is **cpu_share**, the value range is from `0` to `99`, unit: %.
+ When the `resource name` is **cpu_limit**, the value range is from `1` to `99`, `0` means unlimited, unit: %.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
+ When the `resource name` is **cpu_limit**, the value range is from `1` to `99`, `0` means unlimited, unit: %.
+ When the `resource name` is **cpu_limit**, the value range is from `0` to `99`, `0` means unlimited, unit: %.

@Lance52259
Copy link
Collaborator

/approve
/lgtm

@github-ci-robot github-ci-robot added LGTM /lgtm approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Sep 3, 2024
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: @Lance52259

/approve
/lgtm

@github-ci-robot github-ci-robot merged commit 5f40e06 into huaweicloud:master Sep 3, 2024
14 checks passed
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. chore LGTM /lgtm size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants