Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Deployment complete!
"name": "projects/test-pg-proj-[UNIQUE_NAME]/branches/main",
"parent": "projects/test-pg-proj-[UNIQUE_NAME]",
"status": {
"branch_id": "main",
"current_state": "READY",
"default": false,
"is_protected": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "[MAIN_ID_2]",
"parent": "projects/test-pg-proj-[UNIQUE_NAME]",
"status": {
"branch_id": "new-branch-[UNIQUE_NAME]",
"current_state": "READY",
"default": false,
"is_protected": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"name": "[DEV_BRANCH_ID]",
"parent": "projects/test-pg-proj-[UNIQUE_NAME]",
"status": {
"branch_id": "dev-branch",
"current_state": "READY",
"default": false,
"is_protected": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"name": "[DEV_BRANCH_ID]",
"parent": "projects/test-pg-proj-[UNIQUE_NAME]",
"status": {
"branch_id": "dev-branch",
"current_state": "READY",
"default": false,
"is_protected": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"name": "[DEV_BRANCH_ID]",
"parent": "projects/test-pg-proj-[UNIQUE_NAME]",
"status": {
"branch_id": "dev-branch",
"current_state": "READY",
"default": false,
"is_protected": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Deployment complete!
"name": "[DEV_BRANCH_ID]",
"parent": "projects/test-pg-proj-[UNIQUE_NAME]",
"status": {
"branch_id": "dev-branch",
"current_state": "READY",
"default": false,
"is_protected": false,
Expand Down Expand Up @@ -104,6 +105,7 @@ Deployment complete!
"name": "[DEV_BRANCH_ID]",
"parent": "projects/test-pg-proj-[UNIQUE_NAME]",
"status": {
"branch_id": "dev-branch",
"current_state": "READY",
"default": false,
"is_protected": true,
Expand Down Expand Up @@ -138,6 +140,7 @@ Deployment complete!
"name": "[DEV_BRANCH_ID]",
"parent": "projects/test-pg-proj-[UNIQUE_NAME]",
"status": {
"branch_id": "dev-branch",
"current_state": "READY",
"default": false,
"is_protected": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Deployment complete!
"autoscaling_limit_min_cu": 0.5,
"current_state": "ACTIVE",
"disabled": false,
"endpoint_id": "custom",
"endpoint_type": "ENDPOINT_TYPE_READ_ONLY",
"group": {
"enable_readable_secondaries": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"autoscaling_limit_min_cu": 0.5,
"current_state": "ACTIVE",
"disabled": false,
"endpoint_id": "my-endpoint",
"endpoint_type": "ENDPOINT_TYPE_READ_ONLY",
"group": {
"enable_readable_secondaries": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"autoscaling_limit_min_cu": 0.5,
"current_state": "ACTIVE",
"disabled": false,
"endpoint_id": "my-endpoint",
"endpoint_type": "ENDPOINT_TYPE_READ_ONLY",
"group": {
"enable_readable_secondaries": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"autoscaling_limit_min_cu": 0.5,
"current_state": "ACTIVE",
"disabled": false,
"endpoint_id": "my-endpoint",
"endpoint_type": "ENDPOINT_TYPE_READ_ONLY",
"group": {
"enable_readable_secondaries": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Deployment complete!
"autoscaling_limit_min_cu": 0.5,
"current_state": "ACTIVE",
"disabled": false,
"endpoint_id": "my-endpoint",
"endpoint_type": "ENDPOINT_TYPE_READ_ONLY",
"group": {
"enable_readable_secondaries": true,
Expand Down Expand Up @@ -122,6 +123,7 @@ Deployment complete!
"autoscaling_limit_min_cu": 0.5,
"current_state": "ACTIVE",
"disabled": false,
"endpoint_id": "my-endpoint",
"endpoint_type": "ENDPOINT_TYPE_READ_ONLY",
"group": {
"enable_readable_secondaries": true,
Expand Down Expand Up @@ -165,6 +167,7 @@ Deployment complete!
"autoscaling_limit_min_cu": 0.5,
"current_state": "ACTIVE",
"disabled": false,
"endpoint_id": "my-endpoint",
"endpoint_type": "ENDPOINT_TYPE_READ_ONLY",
"group": {
"enable_readable_secondaries": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Deployment complete!
"history_retention_duration": "604800s",
"owner": "[USERNAME]",
"pg_version": 16,
"project_id": "test-pg-proj-[UNIQUE_NAME]",
"synthetic_storage_size_bytes": 0
},
"uid": "[UUID]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"history_retention_duration": "604800s",
"owner": "[USERNAME]",
"pg_version": 16,
"project_id": "test-pg-new-[UNIQUE_NAME]",
"synthetic_storage_size_bytes": 0
},
"uid": "[UUID]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"history_retention_duration": "604800s",
"owner": "[USERNAME]",
"pg_version": 16,
"project_id": "test-pg-proj-[UNIQUE_NAME]",
"synthetic_storage_size_bytes": 0
},
"uid": "[UUID]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"history_retention_duration": "604800s",
"owner": "[USERNAME]",
"pg_version": 16,
"project_id": "test-pg-proj-[UNIQUE_NAME]",
"synthetic_storage_size_bytes": 0
},
"uid": "[UUID]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"history_retention_duration": "604800s",
"owner": "[USERNAME]",
"pg_version": 16,
"project_id": "test-pg-proj-[UNIQUE_NAME]",
"synthetic_storage_size_bytes": 0
},
"uid": "[UUID]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Deployment complete!
"history_retention_duration": "604800s",
"owner": "[USERNAME]",
"pg_version": 16,
"project_id": "test-pg-proj-[UNIQUE_NAME]",
"synthetic_storage_size_bytes": 0
},
"uid": "[UUID]"
Expand Down Expand Up @@ -112,6 +113,7 @@ Deployment complete!
"history_retention_duration": "604800s",
"owner": "[USERNAME]",
"pg_version": 16,
"project_id": "test-pg-proj-[UNIQUE_NAME]",
"synthetic_storage_size_bytes": 0
},
"uid": "[UUID]"
Expand Down Expand Up @@ -151,6 +153,7 @@ Deployment complete!
"history_retention_duration": "604800s",
"owner": "[USERNAME]",
"pg_version": 16,
"project_id": "test-pg-proj-[UNIQUE_NAME]",
"synthetic_storage_size_bytes": 0
},
"uid": "[UUID]"
Expand Down
4 changes: 4 additions & 0 deletions libs/testserver/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ func (s *FakeWorkspace) PostgresProjectCreate(req Request, projectID string) Res
// Copy spec fields to status (API returns status as materialized view)
if project.Spec != nil {
project.Status = &postgres.ProjectStatus{
ProjectId: projectID,
DefaultBranch: name + "/branches/production",
DisplayName: project.Spec.DisplayName,
PgVersion: project.Spec.PgVersion,
Expand Down Expand Up @@ -248,6 +249,7 @@ func (s *FakeWorkspace) PostgresBranchCreate(req Request, parent, branchID strin

// Initialize status with all required fields
branch.Status = &postgres.BranchStatus{
BranchId: branchID,
CurrentState: postgres.BranchStatusStateReady,
StateChangeTime: now,
Default: false,
Expand Down Expand Up @@ -425,6 +427,7 @@ func (s *FakeWorkspace) PostgresEndpointCreate(req Request, parent, endpointID s

// Initialize status with all required fields
endpoint.Status = &postgres.EndpointStatus{
EndpointId: endpointID,
CurrentState: postgres.EndpointStatusStateActive,
Disabled: false,
Settings: &postgres.EndpointSettings{},
Expand Down Expand Up @@ -642,6 +645,7 @@ func (s *FakeWorkspace) createDefaultBranchLocked(projectName string) {
CreateTime: now,
UpdateTime: now,
Status: &postgres.BranchStatus{
BranchId: "production",
CurrentState: postgres.BranchStatusStateReady,
StateChangeTime: now,
Default: true,
Expand Down
Loading