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

Create Zone Hold functionality #1365

Merged
merged 10 commits into from Aug 10, 2023
Merged

Conversation

danquack
Copy link
Contributor

@danquack danquack commented Aug 9, 2023

Description

Adds the ability to create a zone hold based on the hold API.

Has your change been tested?

I called the apis manually. I am happy to write tests, but I'm not sure where to get started. I could stub the responses, but since this is basically just calling the raw api, im not sure what I would be testing (no additional logic).

Screenshots (if appropriate):

Types of changes

What sort of change does your code introduce/modify?

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • This change is using publicly documented in cloudflare/api-schemas
    and relies on stable APIs.

closes #1364

@github-actions
Copy link
Contributor

github-actions bot commented Aug 9, 2023

changelog detected ✅

hold.go Outdated Show resolved Hide resolved
hold.go Outdated Show resolved Hide resolved
hold.go Outdated Show resolved Hide resolved
hold.go Outdated Show resolved Hide resolved
hold.go Outdated Show resolved Hide resolved
hold.go Outdated Show resolved Hide resolved
hold.go Outdated Show resolved Hide resolved
hold.go Outdated Show resolved Hide resolved
hold.go Outdated Show resolved Hide resolved
@danquack danquack requested review from tpaulus and patryk August 9, 2023 18:13
hold.go Outdated Show resolved Hide resolved
hold.go Outdated Show resolved Hide resolved
Copy link
Member

@jacobbednarz jacobbednarz left a comment

Choose a reason for hiding this comment

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

thanks for the PR!

i've left some feedback inline about the library conventions we need to update here but we'll also need to add test coverage. you can check out another file like https://github.com/cloudflare/cloudflare-go/blob/master/accounts_test.go to get an idea on the minimums we expect here.

danquack and others added 4 commits August 9, 2023 18:39
Co-authored-by: Jacob Bednarz <jacob.bednarz@hey.com>
Signed-off-by: Jacob Bednarz <jacob.bednarz@gmail.com>
…ures

Signed-off-by: Jacob Bednarz <jacob.bednarz@gmail.com>
@codecov-commenter
Copy link

codecov-commenter commented Aug 10, 2023

Codecov Report

Merging #1365 (54f1d9d) into master (b9ac804) will increase coverage by 0.15%.
Report is 142 commits behind head on master.
The diff coverage is 54.96%.

@@            Coverage Diff             @@
##           master    #1365      +/-   ##
==========================================
+ Coverage   48.33%   48.49%   +0.15%     
==========================================
  Files         133      138       +5     
  Lines       13023    13413     +390     
==========================================
+ Hits         6295     6504     +209     
- Misses       5201     5322     +121     
- Partials     1527     1587      +60     
Files Changed Coverage Δ
access_application.go 72.72% <ø> (ø)
access_audit_log.go 79.31% <ø> (ø)
access_bookmark.go 72.44% <ø> (ø)
access_ca_certificate.go 68.00% <ø> (ø)
access_group.go 70.00% <ø> (ø)
access_identity_provider.go 66.32% <ø> (ø)
access_keys.go 71.42% <ø> (ø)
access_mutual_tls_certificates.go 68.86% <ø> (ø)
access_organization.go 53.84% <ø> (ø)
access_service_tokens.go 51.85% <ø> (ø)
... and 119 more

... and 1 file with indirect coverage changes

The response body is identical to other zone hold responses so let's reuse that instead.

Signed-off-by: Jacob Bednarz <jacob.bednarz@gmail.com>
@jacobbednarz jacobbednarz merged commit dc95f32 into cloudflare:master Aug 10, 2023
11 checks passed
@github-actions github-actions bot added this to the v0.75.0 milestone Aug 10, 2023
github-actions bot pushed a commit that referenced this pull request Aug 10, 2023
@github-actions
Copy link
Contributor

This functionality has been released in v0.75.0.

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 Aug 15, 2023
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.

Cloudflare Zone Hold Support
5 participants