Skip to content

Commit 9c11d5d

Browse files
authored
testserver: populate new postgres short-ID fields (#5246)
SDK v0.132.0 added `project_id`, `branch_id`, and `endpoint_id` to the postgres `*Status` types — short identifiers parallel to the existing full resource names. The cloud API was already returning these; older SDK versions silently dropped them, so acceptance fixtures didn't record them. With the bumped SDK, the new fields surface in test output and diverge from what the testserver returns. Populate the IDs on resource creation so testserver responses match the cloud, and regenerate the affected postgres acceptance fixtures. Verified locally and against aws-prod-ucws — postgres acceptance tests pass in both engines.
1 parent 98fc791 commit 9c11d5d

18 files changed

Lines changed: 27 additions & 0 deletions

File tree

acceptance/bundle/resources/postgres_branches/basic/output.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Deployment complete!
3535
"name": "projects/test-pg-proj-[UNIQUE_NAME]/branches/main",
3636
"parent": "projects/test-pg-proj-[UNIQUE_NAME]",
3737
"status": {
38+
"branch_id": "main",
3839
"current_state": "READY",
3940
"default": false,
4041
"is_protected": false,

acceptance/bundle/resources/postgres_branches/recreate/out.get_branch.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "[MAIN_ID_2]",
33
"parent": "projects/test-pg-proj-[UNIQUE_NAME]",
44
"status": {
5+
"branch_id": "new-branch-[UNIQUE_NAME]",
56
"current_state": "READY",
67
"default": false,
78
"is_protected": false,

acceptance/bundle/resources/postgres_branches/update_protected/out.plan.no_change.direct.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"name": "[DEV_BRANCH_ID]",
1212
"parent": "projects/test-pg-proj-[UNIQUE_NAME]",
1313
"status": {
14+
"branch_id": "dev-branch",
1415
"current_state": "READY",
1516
"default": false,
1617
"is_protected": false,

acceptance/bundle/resources/postgres_branches/update_protected/out.plan.restore.direct.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"name": "[DEV_BRANCH_ID]",
2020
"parent": "projects/test-pg-proj-[UNIQUE_NAME]",
2121
"status": {
22+
"branch_id": "dev-branch",
2223
"current_state": "READY",
2324
"default": false,
2425
"is_protected": true,

acceptance/bundle/resources/postgres_branches/update_protected/out.plan.update.direct.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"name": "[DEV_BRANCH_ID]",
2020
"parent": "projects/test-pg-proj-[UNIQUE_NAME]",
2121
"status": {
22+
"branch_id": "dev-branch",
2223
"current_state": "READY",
2324
"default": false,
2425
"is_protected": false,

acceptance/bundle/resources/postgres_branches/update_protected/output.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Deployment complete!
3030
"name": "[DEV_BRANCH_ID]",
3131
"parent": "projects/test-pg-proj-[UNIQUE_NAME]",
3232
"status": {
33+
"branch_id": "dev-branch",
3334
"current_state": "READY",
3435
"default": false,
3536
"is_protected": false,
@@ -104,6 +105,7 @@ Deployment complete!
104105
"name": "[DEV_BRANCH_ID]",
105106
"parent": "projects/test-pg-proj-[UNIQUE_NAME]",
106107
"status": {
108+
"branch_id": "dev-branch",
107109
"current_state": "READY",
108110
"default": false,
109111
"is_protected": true,
@@ -138,6 +140,7 @@ Deployment complete!
138140
"name": "[DEV_BRANCH_ID]",
139141
"parent": "projects/test-pg-proj-[UNIQUE_NAME]",
140142
"status": {
143+
"branch_id": "dev-branch",
141144
"current_state": "READY",
142145
"default": false,
143146
"is_protected": false,

acceptance/bundle/resources/postgres_endpoints/basic/output.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ Deployment complete!
4343
"autoscaling_limit_min_cu": 0.5,
4444
"current_state": "ACTIVE",
4545
"disabled": false,
46+
"endpoint_id": "custom",
4647
"endpoint_type": "ENDPOINT_TYPE_READ_ONLY",
4748
"group": {
4849
"enable_readable_secondaries": true,

acceptance/bundle/resources/postgres_endpoints/update_autoscaling/out.plan.no_change.direct.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"autoscaling_limit_min_cu": 0.5,
1616
"current_state": "ACTIVE",
1717
"disabled": false,
18+
"endpoint_id": "my-endpoint",
1819
"endpoint_type": "ENDPOINT_TYPE_READ_ONLY",
1920
"group": {
2021
"enable_readable_secondaries": true,

acceptance/bundle/resources/postgres_endpoints/update_autoscaling/out.plan.restore.direct.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"autoscaling_limit_min_cu": 0.5,
2626
"current_state": "ACTIVE",
2727
"disabled": false,
28+
"endpoint_id": "my-endpoint",
2829
"endpoint_type": "ENDPOINT_TYPE_READ_ONLY",
2930
"group": {
3031
"enable_readable_secondaries": true,

acceptance/bundle/resources/postgres_endpoints/update_autoscaling/out.plan.update.direct.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"autoscaling_limit_min_cu": 0.5,
2626
"current_state": "ACTIVE",
2727
"disabled": false,
28+
"endpoint_id": "my-endpoint",
2829
"endpoint_type": "ENDPOINT_TYPE_READ_ONLY",
2930
"group": {
3031
"enable_readable_secondaries": true,

0 commit comments

Comments
 (0)