Skip to content

Commit 262b09a

Browse files
committed
test: record mock GCP log for POSTGRES_9_6
1 parent 025e2bd commit 262b09a

File tree

3 files changed

+25
-77
lines changed

3 files changed

+25
-77
lines changed

pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/issue-4207/_generated_object_issue-4207.golden.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ metadata:
1616
name: test-${uniqueId}
1717
namespace: ${uniqueId}
1818
spec:
19-
databaseVersion: POSTGRES_13
19+
databaseVersion: POSTGRES_9_6
2020
region: europe-west3
2121
resourceID: test-${uniqueId}
2222
settings:

pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/issue-4207/_http.log

+23-75
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Content-Type: application/json
3232
User-Agent: kcc/${kccVersion} (+https://github.com/GoogleCloudPlatform/k8s-config-connector) kcc/controller-manager/${kccVersion}
3333

3434
{
35-
"databaseVersion": "POSTGRES_13",
35+
"databaseVersion": "POSTGRES_9_6",
3636
"instanceType": "CLOUD_SQL_INSTANCE",
3737
"kind": "sql#instance",
3838
"name": "test-${uniqueId}",
@@ -152,35 +152,32 @@ X-Xss-Protection: 0
152152
"backendType": "SECOND_GEN",
153153
"connectionName": "${projectId}:europe-west3:test-${uniqueId}",
154154
"createTime": "2024-04-01T12:34:56.123456Z",
155-
"databaseInstalledVersion": "POSTGRES_13_20",
156-
"databaseVersion": "POSTGRES_13",
155+
"databaseInstalledVersion": "POSTGRES_9_6",
156+
"databaseVersion": "POSTGRES_9_6",
157157
"etag": "abcdef0123A=",
158-
"failoverReplica": {
159-
"available": true
160-
},
161158
"gceZone": "us-central1-a",
162159
"geminiConfig": {
163160
"activeQueryEnabled": false,
164161
"entitled": false,
165162
"googleVacuumMgmtEnabled": false,
166163
"indexAdvisorEnabled": false,
167-
"oomSessionCancelEnabled": true
164+
"oomSessionCancelEnabled": false
168165
},
169-
"includeReplicasForMajorVersionUpgrade": false,
170166
"instanceType": "CLOUD_SQL_INSTANCE",
171167
"ipAddresses": [
172168
{
173169
"ipAddress": "10.1.2.3",
174170
"type": "PRIMARY"
171+
},
172+
{
173+
"ipAddress": "10.1.2.3",
174+
"type": "OUTGOING"
175175
}
176176
],
177177
"kind": "sql#instance",
178-
"maintenanceVersion": "POSTGRES_13_20.R20250302.00_04",
179178
"name": "test-${uniqueId}",
180179
"project": "${projectId}",
181180
"region": "europe-west3",
182-
"satisfiesPzi": true,
183-
"secondaryGceZone": "europe-west3-a",
184181
"selfLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/test-${uniqueId}",
185182
"serverCaCert": {
186183
"cert": "-----BEGIN CERTIFICATE-----\n-----END CERTIFICATE-----\n",
@@ -205,10 +202,10 @@ X-Xss-Protection: 0
205202
"enabled": true,
206203
"kind": "sql#backupConfiguration",
207204
"pointInTimeRecoveryEnabled": true,
208-
"replicationLogArchivingEnabled": true,
205+
"replicationLogArchivingEnabled": false,
209206
"startTime": "12:00",
210207
"transactionLogRetentionDays": 7,
211-
"transactionalLogStorageState": "CLOUD_STORAGE"
208+
"transactionalLogStorageState": "TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED"
212209
},
213210
"connectorEnforcement": "NOT_REQUIRED",
214211
"dataDiskSizeGb": "10",
@@ -233,10 +230,9 @@ X-Xss-Protection: 0
233230
"kind": "sql#settings",
234231
"locationPreference": {
235232
"kind": "sql#locationPreference",
236-
"zone": "europe-west3-b"
233+
"zone": "europe-west3-a"
237234
},
238235
"pricingPlan": "PER_USE",
239-
"replicationLagMaxSeconds": 31536000,
240236
"replicationType": "SYNCHRONOUS",
241237
"settingsVersion": "123",
242238
"storageAutoResize": true,
@@ -248,29 +244,7 @@ X-Xss-Protection: 0
248244
}
249245
},
250246
"sqlNetworkArchitecture": "NEW_NETWORK_ARCHITECTURE",
251-
"state": "RUNNABLE",
252-
"upgradableDatabaseVersions": [
253-
{
254-
"displayName": "PostgreSQL 14",
255-
"majorVersion": "POSTGRES_14",
256-
"name": "POSTGRES_14"
257-
},
258-
{
259-
"displayName": "PostgreSQL 15",
260-
"majorVersion": "POSTGRES_15",
261-
"name": "POSTGRES_15"
262-
},
263-
{
264-
"displayName": "PostgreSQL 16",
265-
"majorVersion": "POSTGRES_16",
266-
"name": "POSTGRES_16"
267-
},
268-
{
269-
"displayName": "PostgreSQL 17",
270-
"majorVersion": "POSTGRES_17",
271-
"name": "POSTGRES_17"
272-
}
273-
]
247+
"state": "RUNNABLE"
274248
}
275249

276250
---
@@ -321,35 +295,32 @@ X-Xss-Protection: 0
321295
"backendType": "SECOND_GEN",
322296
"connectionName": "${projectId}:europe-west3:test-${uniqueId}",
323297
"createTime": "2024-04-01T12:34:56.123456Z",
324-
"databaseInstalledVersion": "POSTGRES_13_20",
325-
"databaseVersion": "POSTGRES_13",
298+
"databaseInstalledVersion": "POSTGRES_9_6",
299+
"databaseVersion": "POSTGRES_9_6",
326300
"etag": "abcdef0123A=",
327-
"failoverReplica": {
328-
"available": true
329-
},
330301
"gceZone": "us-central1-a",
331302
"geminiConfig": {
332303
"activeQueryEnabled": false,
333304
"entitled": false,
334305
"googleVacuumMgmtEnabled": false,
335306
"indexAdvisorEnabled": false,
336-
"oomSessionCancelEnabled": true
307+
"oomSessionCancelEnabled": false
337308
},
338-
"includeReplicasForMajorVersionUpgrade": false,
339309
"instanceType": "CLOUD_SQL_INSTANCE",
340310
"ipAddresses": [
341311
{
342312
"ipAddress": "10.1.2.3",
343313
"type": "PRIMARY"
314+
},
315+
{
316+
"ipAddress": "10.1.2.3",
317+
"type": "OUTGOING"
344318
}
345319
],
346320
"kind": "sql#instance",
347-
"maintenanceVersion": "POSTGRES_13_20.R20250302.00_04",
348321
"name": "test-${uniqueId}",
349322
"project": "${projectId}",
350323
"region": "europe-west3",
351-
"satisfiesPzi": true,
352-
"secondaryGceZone": "europe-west3-a",
353324
"selfLink": "https://sqladmin.googleapis.com/sql/v1beta4/projects/${projectId}/instances/test-${uniqueId}",
354325
"serverCaCert": {
355326
"cert": "-----BEGIN CERTIFICATE-----\n-----END CERTIFICATE-----\n",
@@ -374,10 +345,10 @@ X-Xss-Protection: 0
374345
"enabled": true,
375346
"kind": "sql#backupConfiguration",
376347
"pointInTimeRecoveryEnabled": true,
377-
"replicationLogArchivingEnabled": true,
348+
"replicationLogArchivingEnabled": false,
378349
"startTime": "12:00",
379350
"transactionLogRetentionDays": 7,
380-
"transactionalLogStorageState": "CLOUD_STORAGE"
351+
"transactionalLogStorageState": "TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED"
381352
},
382353
"connectorEnforcement": "NOT_REQUIRED",
383354
"dataDiskSizeGb": "10",
@@ -402,10 +373,9 @@ X-Xss-Protection: 0
402373
"kind": "sql#settings",
403374
"locationPreference": {
404375
"kind": "sql#locationPreference",
405-
"zone": "europe-west3-b"
376+
"zone": "europe-west3-a"
406377
},
407378
"pricingPlan": "PER_USE",
408-
"replicationLagMaxSeconds": 31536000,
409379
"replicationType": "SYNCHRONOUS",
410380
"settingsVersion": "123",
411381
"storageAutoResize": true,
@@ -417,29 +387,7 @@ X-Xss-Protection: 0
417387
}
418388
},
419389
"sqlNetworkArchitecture": "NEW_NETWORK_ARCHITECTURE",
420-
"state": "RUNNABLE",
421-
"upgradableDatabaseVersions": [
422-
{
423-
"displayName": "PostgreSQL 14",
424-
"majorVersion": "POSTGRES_14",
425-
"name": "POSTGRES_14"
426-
},
427-
{
428-
"displayName": "PostgreSQL 15",
429-
"majorVersion": "POSTGRES_15",
430-
"name": "POSTGRES_15"
431-
},
432-
{
433-
"displayName": "PostgreSQL 16",
434-
"majorVersion": "POSTGRES_16",
435-
"name": "POSTGRES_16"
436-
},
437-
{
438-
"displayName": "PostgreSQL 17",
439-
"majorVersion": "POSTGRES_17",
440-
"name": "POSTGRES_17"
441-
}
442-
]
390+
"state": "RUNNABLE"
443391
}
444392

445393
---

pkg/test/resourcefixture/testdata/basic/sql/v1beta1/sqlinstance/issue-4207/create.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ metadata:
1313
- cnrm.cloud.google.com/deletion-defender
1414
name: test-${uniqueId}
1515
spec:
16-
databaseVersion: POSTGRES_13
16+
databaseVersion: POSTGRES_9_6 # POSTGRES_13 is not supported by mock
1717
region: europe-west3
1818
resourceID: test-${uniqueId}
1919
settings:

0 commit comments

Comments
 (0)