diff --git a/acceptance/bundle/resources/postgres_branches/basic/output.txt b/acceptance/bundle/resources/postgres_branches/basic/output.txt index de26b7f0e7..ae9053d377 100644 --- a/acceptance/bundle/resources/postgres_branches/basic/output.txt +++ b/acceptance/bundle/resources/postgres_branches/basic/output.txt @@ -38,7 +38,7 @@ Deployment complete! "current_state": "READY", "default": false, "is_protected": false, - "source_branch": "projects/test-pg-proj-[UNIQUE_NAME]/branches/[BRANCH_UID]", + "source_branch": "projects/test-pg-proj-[UNIQUE_NAME]/branches/production", "source_branch_lsn": "[LSN]", "source_branch_time": "[TIMESTAMP]", "state_change_time": "[TIMESTAMP]" diff --git a/acceptance/bundle/resources/postgres_branches/recreate/out.get_branch.txt b/acceptance/bundle/resources/postgres_branches/recreate/out.get_branch.txt index b67568fe15..46df988170 100644 --- a/acceptance/bundle/resources/postgres_branches/recreate/out.get_branch.txt +++ b/acceptance/bundle/resources/postgres_branches/recreate/out.get_branch.txt @@ -5,7 +5,7 @@ "current_state": "READY", "default": false, "is_protected": false, - "source_branch": "projects/test-pg-proj-[UNIQUE_NAME]/branches/[BRANCH_UID]", + "source_branch": "projects/test-pg-proj-[UNIQUE_NAME]/branches/production", "source_branch_lsn": "[LSN]", "source_branch_time": "[TIMESTAMP]", "state_change_time": "[TIMESTAMP]" diff --git a/acceptance/bundle/resources/postgres_branches/update_protected/out.plan.no_change.direct.json b/acceptance/bundle/resources/postgres_branches/update_protected/out.plan.no_change.direct.json index 99377fbc4c..32120ec36e 100644 --- a/acceptance/bundle/resources/postgres_branches/update_protected/out.plan.no_change.direct.json +++ b/acceptance/bundle/resources/postgres_branches/update_protected/out.plan.no_change.direct.json @@ -14,7 +14,7 @@ "current_state": "READY", "default": false, "is_protected": false, - "source_branch": "projects/test-pg-proj-[UNIQUE_NAME]/branches/[BRANCH_UID]", + "source_branch": "projects/test-pg-proj-[UNIQUE_NAME]/branches/production", "source_branch_lsn": "[LSN]", "source_branch_time": "[TIMESTAMP]", "state_change_time": "[TIMESTAMP]" diff --git a/acceptance/bundle/resources/postgres_branches/update_protected/out.plan.restore.direct.json b/acceptance/bundle/resources/postgres_branches/update_protected/out.plan.restore.direct.json index 55de1ec12d..110fb1aea0 100644 --- a/acceptance/bundle/resources/postgres_branches/update_protected/out.plan.restore.direct.json +++ b/acceptance/bundle/resources/postgres_branches/update_protected/out.plan.restore.direct.json @@ -22,7 +22,7 @@ "current_state": "READY", "default": false, "is_protected": true, - "source_branch": "projects/test-pg-proj-[UNIQUE_NAME]/branches/[BRANCH_UID]", + "source_branch": "projects/test-pg-proj-[UNIQUE_NAME]/branches/production", "source_branch_lsn": "[LSN]", "source_branch_time": "[TIMESTAMP]", "state_change_time": "[TIMESTAMP]" diff --git a/acceptance/bundle/resources/postgres_branches/update_protected/out.plan.update.direct.json b/acceptance/bundle/resources/postgres_branches/update_protected/out.plan.update.direct.json index c466b27a61..58169e75a3 100644 --- a/acceptance/bundle/resources/postgres_branches/update_protected/out.plan.update.direct.json +++ b/acceptance/bundle/resources/postgres_branches/update_protected/out.plan.update.direct.json @@ -22,7 +22,7 @@ "current_state": "READY", "default": false, "is_protected": false, - "source_branch": "projects/test-pg-proj-[UNIQUE_NAME]/branches/[BRANCH_UID]", + "source_branch": "projects/test-pg-proj-[UNIQUE_NAME]/branches/production", "source_branch_lsn": "[LSN]", "source_branch_time": "[TIMESTAMP]", "state_change_time": "[TIMESTAMP]" diff --git a/acceptance/bundle/resources/postgres_branches/update_protected/output.txt b/acceptance/bundle/resources/postgres_branches/update_protected/output.txt index 343f8257f4..b32d48a909 100644 --- a/acceptance/bundle/resources/postgres_branches/update_protected/output.txt +++ b/acceptance/bundle/resources/postgres_branches/update_protected/output.txt @@ -33,7 +33,7 @@ Deployment complete! "current_state": "READY", "default": false, "is_protected": false, - "source_branch": "projects/test-pg-proj-[UNIQUE_NAME]/branches/[BRANCH_UID]", + "source_branch": "projects/test-pg-proj-[UNIQUE_NAME]/branches/production", "source_branch_lsn": "[LSN]", "source_branch_time": "[TIMESTAMP]", "state_change_time": "[TIMESTAMP]" @@ -107,7 +107,7 @@ Deployment complete! "current_state": "READY", "default": false, "is_protected": true, - "source_branch": "projects/test-pg-proj-[UNIQUE_NAME]/branches/[BRANCH_UID]", + "source_branch": "projects/test-pg-proj-[UNIQUE_NAME]/branches/production", "source_branch_lsn": "[LSN]", "source_branch_time": "[TIMESTAMP]", "state_change_time": "[TIMESTAMP]" @@ -141,7 +141,7 @@ Deployment complete! "current_state": "READY", "default": false, "is_protected": false, - "source_branch": "projects/test-pg-proj-[UNIQUE_NAME]/branches/[BRANCH_UID]", + "source_branch": "projects/test-pg-proj-[UNIQUE_NAME]/branches/production", "source_branch_lsn": "[LSN]", "source_branch_time": "[TIMESTAMP]", "state_change_time": "[TIMESTAMP]" diff --git a/libs/testserver/postgres.go b/libs/testserver/postgres.go index 3ff865d4d9..5961b2f7e3 100644 --- a/libs/testserver/postgres.go +++ b/libs/testserver/postgres.go @@ -618,10 +618,11 @@ func (s *FakeWorkspace) createOperationLocked(resourceName string, response any) } // createDefaultBranchLocked creates a default branch for a project (caller must hold lock). +// The default branch is named "production" to match cloud API behavior. func (s *FakeWorkspace) createDefaultBranchLocked(projectName string) { now := nowTime() branchUID := "br-" + nextUUID()[:20] - branchName := projectName + "/branches/" + branchUID + branchName := projectName + "/branches/production" defaultBranch := postgres.Branch{ Name: branchName,