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 behaviour of block_page_enabled block #3010

Merged
merged 3 commits into from
Dec 27, 2023

Conversation

Nmishin
Copy link
Contributor

@Nmishin Nmishin commented Dec 17, 2023

For now, if block_page_enabled block is set - value will be updated each time regardless it set to true or false.

Fix for #2923

Copy link
Contributor

changelog detected ✅

@jacobbednarz
Copy link
Member

thanks for the PR here @Nmishin - looks like we're failing one of the acceptance tests though.

TF_ACC=1 go test ./internal/sdkv2provider -v -run "^TestAccCloudflareTeamsRule_" -count 1 -timeout 120m -parallel 1
=== RUN   TestAccCloudflareTeamsRule_Basic
--- PASS: TestAccCloudflareTeamsRule_Basic (8.11s)
=== RUN   TestAccCloudflareTeamsRule_NoSettings
    resource_cloudflare_teams_rules_test.go:98: Step 2/2 error: Check failed: Check 8/8 error: cloudflare_teams_rule.ezalaphmxv: Attribute 'rule_settings.#' expected "0", got "1"
--- FAIL: TestAccCloudflareTeamsRule_NoSettings (10.10s)
FAIL
FAIL	github.com/cloudflare/terraform-provider-cloudflare/internal/sdkv2provider	19.019s
FAIL
make: *** [testacc] Error 1

@Nmishin
Copy link
Contributor Author

Nmishin commented Dec 21, 2023

I fixed the bug and updated the tests a bit. I think it would be better to test for values other than the default (true in our case).

@jacobbednarz
Copy link
Member

thanks, acceptance tests all good now

TF_ACC=1 go test ./internal/sdkv2provider -v -run "^TestAccCloudflareTeamsRule_" -count 1 -timeout 120m -parallel 1
=== RUN   TestAccCloudflareTeamsRule_Basic
--- PASS: TestAccCloudflareTeamsRule_Basic (8.07s)
=== RUN   TestAccCloudflareTeamsRule_NoSettings
--- PASS: TestAccCloudflareTeamsRule_NoSettings (11.27s)
PASS
ok  	github.com/cloudflare/terraform-provider-cloudflare/internal/sdkv2provider	19.849s

@jacobbednarz jacobbednarz merged commit fac8cbc into cloudflare:master Dec 27, 2023
9 checks passed
@github-actions github-actions bot added this to the v4.22.0 milestone Dec 27, 2023
github-actions bot pushed a commit that referenced this pull request Dec 27, 2023
Copy link
Contributor

This functionality has been released in v4.22.0 of the Terraform Cloudflare Provider.

Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants