Skip to content

Commit

Permalink
tests: update golden tests for other scenarios
Browse files Browse the repository at this point in the history
These scenarios use setIamPolicy / getIamPolicy (predominantly), and
those methods now (correctly) return headers with our mock.
  • Loading branch information
justinsb committed Jul 20, 2024
1 parent 61c697c commit 98e0f29
Show file tree
Hide file tree
Showing 14 changed files with 1,409 additions and 294 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -278,11 +278,19 @@ X-Xss-Protection: 0
GET https://cloudkms.googleapis.com/v1/projects/${projectId}/locations/us-central1/keyRings/kmskeyring-${uniqueId}/cryptoKeys/kmscryptokey-${uniqueId}:getIamPolicy?alt=json&options.requestedPolicyVersion=3&prettyPrint=false
User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager


200 OK
Cache-Control: private
Content-Type: application/json; charset=UTF-8
Server: ESF
Vary: Origin
Vary: X-Origin
Vary: Referer
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 0

{
"etag": "abcdef0123A=",
"version": 3
"etag": "abcdef0123A="
}

---
Expand All @@ -306,7 +314,16 @@ User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terr
}
}


200 OK
Cache-Control: private
Content-Type: application/json; charset=UTF-8
Server: ESF
Vary: Origin
Vary: X-Origin
Vary: Referer
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 0

{
"bindings": [
Expand All @@ -318,15 +335,24 @@ User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terr
}
],
"etag": "abcdef0123A=",
"version": 3
"version": 1
}

---

GET https://cloudkms.googleapis.com/v1/projects/${projectId}/locations/us-central1/keyRings/kmskeyring-${uniqueId}/cryptoKeys/kmscryptokey-${uniqueId}:getIamPolicy?alt=json&options.requestedPolicyVersion=3&prettyPrint=false
User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager


200 OK
Cache-Control: private
Content-Type: application/json; charset=UTF-8
Server: ESF
Vary: Origin
Vary: X-Origin
Vary: Referer
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 0

{
"bindings": [
Expand All @@ -338,7 +364,7 @@ User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terr
}
],
"etag": "abcdef0123A=",
"version": 3
"version": 1
}

---
Expand Down Expand Up @@ -704,7 +730,16 @@ Grpc-Metadata-Content-Type: application/grpc
GET https://cloudkms.googleapis.com/v1/projects/${projectId}/locations/us-central1/keyRings/kmskeyring-${uniqueId}/cryptoKeys/kmscryptokey-${uniqueId}:getIamPolicy?alt=json&options.requestedPolicyVersion=3&prettyPrint=false
User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager


200 OK
Cache-Control: private
Content-Type: application/json; charset=UTF-8
Server: ESF
Vary: Origin
Vary: X-Origin
Vary: Referer
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 0

{
"bindings": [
Expand All @@ -716,7 +751,7 @@ User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terr
}
],
"etag": "abcdef0123A=",
"version": 3
"version": 1
}

---
Expand All @@ -732,23 +767,41 @@ User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terr
}
}


200 OK
Cache-Control: private
Content-Type: application/json; charset=UTF-8
Server: ESF
Vary: Origin
Vary: X-Origin
Vary: Referer
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 0

{
"etag": "abcdef0123A=",
"version": 3
"version": 1
}

---

GET https://cloudkms.googleapis.com/v1/projects/${projectId}/locations/us-central1/keyRings/kmskeyring-${uniqueId}/cryptoKeys/kmscryptokey-${uniqueId}:getIamPolicy?alt=json&options.requestedPolicyVersion=3&prettyPrint=false
User-Agent: google-api-go-client/0.5 Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager


200 OK
Cache-Control: private
Content-Type: application/json; charset=UTF-8
Server: ESF
Vary: Origin
Vary: X-Origin
Vary: Referer
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 0

{
"etag": "abcdef0123A=",
"version": 3
"version": 1
}

---
Expand Down
Loading

0 comments on commit 98e0f29

Please sign in to comment.