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

refactor(cdn): refactor the cache_refresh and cache_preheat resources code style #6165

Conversation

jinyangyang222
Copy link
Contributor

@jinyangyang222 jinyangyang222 commented Jan 8, 2025

What this PR does / why we need it:

commit1: refactor the cache_refresh resource code style.
commit2: refactor the cache_preheat resource code style.

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:


refactor the `cache_refresh` and `cache_preheat` resources code style

PR Checklist

  • Tests added/passed.

Test Cache Refresh

$ export HW_CDN_DOMAIN_URL=xxxxxxxxxxx
$ export HW_ENTERPRISE_PROJECT_ID_TEST=xxxxxxxxx

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

Test Cache Preheat

$ export HW_CDN_DOMAIN_URL=xxxxxxxxxxx
$ export HW_ENTERPRISE_PROJECT_ID_TEST=xxxxxxxxx

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

Test case coverage

image

image

  • Documentation updated.

  • Schema updated.

  • CheckDeleted.

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

image

image

<!-- If the resource depends the parent resource(s), please provide the related check result(s) of the CheckDeleted validation.
ab. Related resources (parent resources) not found
\>>>>>> Paste the screenshot here <<<<<<
-->
  • b. During delete/disassociate/unbind operation (Delete Context)
    ba. Resource not found
    >>>>>> Paste the screenshot here <<<<<<

@jinyangyang222 jinyangyang222 force-pushed the refactor-cdn/refactor-cache_refresh-codeStyle branch 3 times, most recently from e658864 to 7ae68a1 Compare January 8, 2025 09:03
@github-actions github-actions bot added size/L and removed size/M labels Jan 8, 2025
@jinyangyang222 jinyangyang222 changed the title refactor(cdn/cache_refresh): refactor the cache_refresh resource code style refactor(cdn): refactor the cache_refresh and cache_preheat resources code style Jan 8, 2025
@jinyangyang222 jinyangyang222 force-pushed the refactor-cdn/refactor-cache_refresh-codeStyle branch 2 times, most recently from 7822465 to 11ffc32 Compare January 8, 2025 09:49
@Alice1319
Copy link

LGTM

@jinyangyang222 jinyangyang222 force-pushed the refactor-cdn/refactor-cache_refresh-codeStyle branch from 11ffc32 to f2a29ca Compare January 9, 2025 08:18
@deer-hang
Copy link
Contributor

/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 Jan 9, 2025
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: @deer-hang

/approve
/lgtm

@github-ci-robot github-ci-robot merged commit 60cab0c into huaweicloud:master Jan 9, 2025
14 checks passed
@jinyangyang222 jinyangyang222 deleted the refactor-cdn/refactor-cache_refresh-codeStyle branch January 15, 2025 03:21
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. LGTM /lgtm refactor size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants