forked from GoogleCloudPlatform/k8s-config-connector
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request GoogleCloudPlatform#2474 from justinsb/tcpuptimech…
…eck_immutable tests: fix tcpuptimecheckconfig test for immutable change
- Loading branch information
Showing
3 changed files
with
353 additions
and
1 deletion.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
...uptimecheckconfig/tcpuptimecheckconfig/_generated_object_tcpuptimecheckconfig.golden.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
apiVersion: monitoring.cnrm.cloud.google.com/v1beta1 | ||
kind: MonitoringUptimeCheckConfig | ||
metadata: | ||
annotations: | ||
cnrm.cloud.google.com/management-conflict-prevention-policy: none | ||
cnrm.cloud.google.com/mutable-but-unreadable-fields: '{}' | ||
cnrm.cloud.google.com/observed-secret-versions: (removed) | ||
cnrm.cloud.google.com/state-into-spec: merge | ||
finalizers: | ||
- cnrm.cloud.google.com/finalizer | ||
- cnrm.cloud.google.com/deletion-defender | ||
generation: 3 | ||
labels: | ||
cnrm-test: "true" | ||
name: monitoringuptimecheckconfig-${uniqueId} | ||
namespace: ${uniqueId} | ||
spec: | ||
displayName: updated-tcp-uptime-check | ||
period: 60s | ||
projectRef: | ||
external: projects/${projectId} | ||
resourceGroup: | ||
groupRef: | ||
name: monitoringgroup-${uniqueId} | ||
resourceType: INSTANCE | ||
resourceID: ${uptimeCheckConfigId} | ||
tcpCheck: | ||
port: 80 | ||
timeout: 45s | ||
status: | ||
conditions: | ||
- lastTransitionTime: "1970-01-01T00:00:00Z" | ||
message: The resource is up to date | ||
reason: UpToDate | ||
status: "True" | ||
type: Ready | ||
observedGeneration: 3 |
314 changes: 314 additions & 0 deletions
314
...tdata/basic/monitoring/v1beta1/monitoringuptimecheckconfig/tcpuptimecheckconfig/_http.log
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,314 @@ | ||
POST https://monitoring.googleapis.com/v3/projects/${projectId}/groups?alt=json | ||
Content-Type: application/json | ||
User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 | ||
|
||
{ | ||
"displayName": "sample-group", | ||
"filter": "resource.metadata.region=europe-west2", | ||
"isCluster": true | ||
} | ||
|
||
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 | ||
|
||
{ | ||
"displayName": "sample-group", | ||
"filter": "resource.metadata.region=europe-west2", | ||
"isCluster": true, | ||
"name": "projects/${projectId}/groups/1723315727009128224" | ||
} | ||
|
||
--- | ||
|
||
GET https://monitoring.googleapis.com/v3/projects/${projectId}/groups/1723315727009128224?alt=json | ||
Content-Type: application/json | ||
User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 | ||
|
||
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 | ||
|
||
{ | ||
"displayName": "sample-group", | ||
"filter": "resource.metadata.region=europe-west2", | ||
"isCluster": true, | ||
"name": "projects/${projectId}/groups/1723315727009128224" | ||
} | ||
|
||
--- | ||
|
||
POST https://monitoring.googleapis.com/v3/projects/${projectId}/uptimeCheckConfigs?alt=json | ||
Content-Type: application/json | ||
User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 | ||
|
||
{ | ||
"displayName": "tcp-uptime-check", | ||
"period": "60s", | ||
"resourceGroup": { | ||
"groupId": "1723315727009128224", | ||
"resourceType": "INSTANCE" | ||
}, | ||
"tcpCheck": { | ||
"port": 80 | ||
}, | ||
"timeout": "30s" | ||
} | ||
|
||
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 | ||
|
||
{ | ||
"checkerType": "STATIC_IP_CHECKERS", | ||
"displayName": "tcp-uptime-check", | ||
"name": "projects/${projectId}/uptimeCheckConfigs/${uptimeCheckConfigId}", | ||
"period": "60s", | ||
"resourceGroup": { | ||
"groupId": "1723315727009128224", | ||
"resourceType": "INSTANCE" | ||
}, | ||
"tcpCheck": { | ||
"port": 80 | ||
}, | ||
"timeout": "30s" | ||
} | ||
|
||
--- | ||
|
||
GET https://monitoring.googleapis.com/v3/projects/${projectId}/uptimeCheckConfigs/${uptimeCheckConfigId}?alt=json | ||
Content-Type: application/json | ||
User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 | ||
|
||
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 | ||
|
||
{ | ||
"checkerType": "STATIC_IP_CHECKERS", | ||
"displayName": "tcp-uptime-check", | ||
"name": "projects/${projectId}/uptimeCheckConfigs/${uptimeCheckConfigId}", | ||
"period": "60s", | ||
"resourceGroup": { | ||
"groupId": "1723315727009128224", | ||
"resourceType": "INSTANCE" | ||
}, | ||
"tcpCheck": { | ||
"port": 80 | ||
}, | ||
"timeout": "30s" | ||
} | ||
|
||
--- | ||
|
||
PATCH https://monitoring.googleapis.com/v3/projects/${projectId}/uptimeCheckConfigs/${uptimeCheckConfigId}?alt=json&updateMask=displayName%2Ctimeout | ||
Content-Type: application/json | ||
User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 | ||
|
||
{ | ||
"displayName": "updated-tcp-uptime-check", | ||
"name": "projects/projects/${projectId}/uptimeCheckConfigs/${uptimeCheckConfigId}", | ||
"period": "60s", | ||
"tcpCheck": { | ||
"port": 80 | ||
}, | ||
"timeout": "45s" | ||
} | ||
|
||
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 | ||
|
||
{ | ||
"checkerType": "STATIC_IP_CHECKERS", | ||
"displayName": "updated-tcp-uptime-check", | ||
"name": "projects/${projectId}/uptimeCheckConfigs/${uptimeCheckConfigId}", | ||
"period": "60s", | ||
"resourceGroup": { | ||
"groupId": "1723315727009128224", | ||
"resourceType": "INSTANCE" | ||
}, | ||
"tcpCheck": { | ||
"port": 80 | ||
}, | ||
"timeout": "45s" | ||
} | ||
|
||
--- | ||
|
||
GET https://monitoring.googleapis.com/v3/projects/${projectId}/uptimeCheckConfigs/${uptimeCheckConfigId}?alt=json | ||
Content-Type: application/json | ||
User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 | ||
|
||
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 | ||
|
||
{ | ||
"checkerType": "STATIC_IP_CHECKERS", | ||
"displayName": "updated-tcp-uptime-check", | ||
"name": "projects/${projectId}/uptimeCheckConfigs/${uptimeCheckConfigId}", | ||
"period": "60s", | ||
"resourceGroup": { | ||
"groupId": "1723315727009128224", | ||
"resourceType": "INSTANCE" | ||
}, | ||
"tcpCheck": { | ||
"port": 80 | ||
}, | ||
"timeout": "45s" | ||
} | ||
|
||
--- | ||
|
||
DELETE https://monitoring.googleapis.com/v3/projects/${projectId}/uptimeCheckConfigs/${uptimeCheckConfigId}?alt=json | ||
Content-Type: application/json | ||
User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 | ||
|
||
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 | ||
|
||
{} | ||
|
||
--- | ||
|
||
GET https://monitoring.googleapis.com/v3/projects/${projectId}/uptimeCheckConfigs/${uptimeCheckConfigId}?alt=json | ||
Content-Type: application/json | ||
User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 | ||
|
||
404 Not Found | ||
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 | ||
|
||
{ | ||
"error": { | ||
"code": 404, | ||
"message": "Config not found for check ${uptimeCheckConfigId} in project ${projectId}", | ||
"status": "NOT_FOUND" | ||
} | ||
} | ||
|
||
--- | ||
|
||
GET https://monitoring.googleapis.com/v3/projects/${projectId}/groups/1723315727009128224?alt=json | ||
Content-Type: application/json | ||
User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 | ||
|
||
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 | ||
|
||
{ | ||
"displayName": "sample-group", | ||
"filter": "resource.metadata.region=europe-west2", | ||
"isCluster": true, | ||
"name": "projects/${projectId}/groups/1723315727009128224" | ||
} | ||
|
||
--- | ||
|
||
DELETE https://monitoring.googleapis.com/v3/projects/${projectId}/groups/1723315727009128224?alt=json | ||
Content-Type: application/json | ||
User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 | ||
|
||
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 | ||
|
||
{} | ||
|
||
--- | ||
|
||
GET https://monitoring.googleapis.com/v3/projects/${projectId}/groups/1723315727009128224?alt=json | ||
Content-Type: application/json | ||
User-Agent: kcc/controller-manager DeclarativeClientLib/0.0.1 | ||
|
||
404 Not Found | ||
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 | ||
|
||
{ | ||
"error": { | ||
"code": 404, | ||
"message": "Could not find group definition for '1723315727009128224'.", | ||
"status": "NOT_FOUND" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters