Skip to content

Commit

Permalink
change pqe patch request to put
Browse files Browse the repository at this point in the history
Signed-off-by: Arjun Chauhan <[email protected]>
  • Loading branch information
arjunchauhanibm committed Jul 12, 2024
1 parent c9bb745 commit 184cfc8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion zonessettingsv1/zones_settings_v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -4470,7 +4470,7 @@ func (zonesSettings *ZonesSettingsV1) UpdateOriginPostQuantumEncryptionWithConte
"zone_identifier": *zonesSettings.ZoneIdentifier,
}

builder := core.NewRequestBuilder(core.PATCH)
builder := core.NewRequestBuilder(core.PUT)
builder = builder.WithContext(ctx)
builder.EnableGzipCompression = zonesSettings.GetEnableGzipCompression()
_, err = builder.ResolveRequestURL(zonesSettings.Service.Options.URL, `/v1/{crn}/zones/{zone_identifier}/cache/origin_post_quantum_encryption`, pathParamsMap)
Expand Down
6 changes: 3 additions & 3 deletions zonessettingsv1/zones_settings_v1_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16343,7 +16343,7 @@ var _ = Describe(`ZonesSettingsV1`, func() {

// Verify the contents of the request
Expect(req.URL.EscapedPath()).To(Equal(updateOriginPostQuantumEncryptionPath))
Expect(req.Method).To(Equal("PATCH"))
Expect(req.Method).To(Equal("PUT"))
res.Header().Set("Content-type", "application/json")
res.WriteHeader(200)
fmt.Fprint(res, `} this is not valid json {`)
Expand Down Expand Up @@ -16392,7 +16392,7 @@ var _ = Describe(`ZonesSettingsV1`, func() {

// Verify the contents of the request
Expect(req.URL.EscapedPath()).To(Equal(updateOriginPostQuantumEncryptionPath))
Expect(req.Method).To(Equal("PATCH"))
Expect(req.Method).To(Equal("PUT"))

// For gzip-disabled operation, verify Content-Encoding is not set.
Expect(req.Header.Get("Content-Encoding")).To(BeEmpty())
Expand Down Expand Up @@ -16467,7 +16467,7 @@ var _ = Describe(`ZonesSettingsV1`, func() {

// Verify the contents of the request
Expect(req.URL.EscapedPath()).To(Equal(updateOriginPostQuantumEncryptionPath))
Expect(req.Method).To(Equal("PATCH"))
Expect(req.Method).To(Equal("PUT"))

// For gzip-disabled operation, verify Content-Encoding is not set.
Expect(req.Header.Get("Content-Encoding")).To(BeEmpty())
Expand Down

0 comments on commit 184cfc8

Please sign in to comment.