Skip to content

Commit c769aa5

Browse files
authored
fix: reduce number of replicas in postgres-ha test (#539)
1 parent f04d617 commit c769aa5

File tree

2 files changed

+1
-29
lines changed

2 files changed

+1
-29
lines changed

examples/postgresql-ha/main.tf

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -94,34 +94,6 @@ module "pg" {
9494
user_labels = { bar = "baz" }
9595
encryption_key_name = null
9696
},
97-
{
98-
name = "1"
99-
zone = "us-central1-b"
100-
availability_type = "REGIONAL"
101-
tier = "db-custom-1-3840"
102-
ip_configuration = local.read_replica_ip_configuration
103-
database_flags = [{ name = "autovacuum", value = "off" }]
104-
disk_autoresize = null
105-
disk_autoresize_limit = null
106-
disk_size = null
107-
disk_type = "PD_HDD"
108-
user_labels = { bar = "baz" }
109-
encryption_key_name = null
110-
},
111-
{
112-
name = "2"
113-
zone = "us-central1-c"
114-
availability_type = "REGIONAL"
115-
tier = "db-custom-1-3840"
116-
ip_configuration = local.read_replica_ip_configuration
117-
database_flags = [{ name = "autovacuum", value = "off" }]
118-
disk_autoresize = null
119-
disk_autoresize_limit = null
120-
disk_size = null
121-
disk_type = "PD_HDD"
122-
user_labels = { bar = "baz" }
123-
encryption_key_name = null
124-
},
12597
]
12698

12799
db_name = var.pg_ha_name

test/integration/postgresql-ha/postgresql_ha_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func TestPostgreSqlHaModule(t *testing.T) {
3232

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

3838
for _, instance := range instaceNames {

0 commit comments

Comments
 (0)