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

ENGSUP-8949: consistently use zone_name, fixes integration tests. #429

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ Some examples, more below in the actual changelog (newer entries are more likely

* api/mock/mock_api_implementation: panic when trying to fake `ResourceWithTag` (#419, @drpsychick)

### Fixed

* CloudDNS now consistently uses `zone_name` during requests, fixing integration tests (#429, @drpsychick)

## [0.7.6] -- 2024-11-04

### Added
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/clouddns/v1/mocks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ func mock_update_zone(z clouddnsv1.Zone) {

expectedData := struct {
clouddnsv1.Zone
Name string `json:"zoneName"`
Name string `json:"zone_name"`
}{
Zone: z,
Name: z.Name,
Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/clouddns/v1/zone_genclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ func (z *Zone) FilterAPIRequestBody(ctx context.Context) (interface{}, error) {
if err != nil {
return nil, err
}
// The Create and Update endpoints expect the Zone's name to be in the request body under the key "zoneName"
// The Create and Update endpoints expect the Zone's name to be in the request body under the key "zone_name"
if op == types.OperationCreate || op == types.OperationUpdate {
zWithZoneName := struct {
Zone
ZoneName string `json:"zoneName"`
ZoneName string `json:"zone_name"`
}{*z, z.Name}

// `name` does not exist as a field on the Engine API for these requests,
Expand Down
4 changes: 2 additions & 2 deletions pkg/clouddns/zone/zone.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ type Definition struct {

// Required - Zone name parameter
// Parameter used for create/update/delete etc.
ZoneName string `json:"zoneName"`
ZoneName string `json:"zone_name"`

// Required - Is master flag
// Flag designating if CloudDNS operates as master or slave.
Expand Down Expand Up @@ -116,7 +116,7 @@ type ResourceRecord struct {
}

type Create struct {
Name string `json:"zoneName"`
Name string `json:"zone_name"`
Master bool `json:"master"`
}

Expand Down
Loading