Skip to content

Commit

Permalink
fix: reduce number of replicas in postgres-ha test (#539)
Browse files Browse the repository at this point in the history
  • Loading branch information
imrannayer authored Nov 9, 2023
1 parent f04d617 commit c769aa5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 29 deletions.
28 changes: 0 additions & 28 deletions examples/postgresql-ha/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -94,34 +94,6 @@ module "pg" {
user_labels = { bar = "baz" }
encryption_key_name = null
},
{
name = "1"
zone = "us-central1-b"
availability_type = "REGIONAL"
tier = "db-custom-1-3840"
ip_configuration = local.read_replica_ip_configuration
database_flags = [{ name = "autovacuum", value = "off" }]
disk_autoresize = null
disk_autoresize_limit = null
disk_size = null
disk_type = "PD_HDD"
user_labels = { bar = "baz" }
encryption_key_name = null
},
{
name = "2"
zone = "us-central1-c"
availability_type = "REGIONAL"
tier = "db-custom-1-3840"
ip_configuration = local.read_replica_ip_configuration
database_flags = [{ name = "autovacuum", value = "off" }]
disk_autoresize = null
disk_autoresize_limit = null
disk_size = null
disk_type = "PD_HDD"
user_labels = { bar = "baz" }
encryption_key_name = null
},
]

db_name = var.pg_ha_name
Expand Down
2 changes: 1 addition & 1 deletion test/integration/postgresql-ha/postgresql_ha_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func TestPostgreSqlHaModule(t *testing.T) {

instaceNames := []string{pSql.GetStringOutput("name")}
op := gcloud.Run(t, fmt.Sprintf("sql instances describe %s --project %s", instaceNames[0], pSql.GetStringOutput("project_id")))
assert.Equal(3, len(op.Get("replicaNames").Array()), "Expected 3 replicas")
assert.Equal(1, len(op.Get("replicaNames").Array()), "Expected 1 replicas")
instaceNames = append(instaceNames, utils.GetResultStrSlice(op.Get("replicaNames").Array())...)

for _, instance := range instaceNames {
Expand Down

0 comments on commit c769aa5

Please sign in to comment.