Skip to content

Commit

Permalink
adds back ip_allow_list & pg_config updates to test
Browse files Browse the repository at this point in the history
  • Loading branch information
shahadarsh committed Mar 14, 2024
1 parent 67f0f39 commit 199d779
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions internal/provider/instance_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ func TestTemboInstanceResource(t *testing.T) {
resource.TestCheckResourceAttr(resourceName, "storage", "10Gi"),
resource.TestCheckResourceAttrSet(resourceName, "instance_id"),
resource.TestCheckResourceAttrSet(resourceName, "last_updated"),
resource.TestCheckResourceAttr(resourceName, "ip_allow_list.#", "1"),
resource.TestCheckResourceAttr(resourceName, "postgres_configs.#", "1"),
resource.TestCheckResourceAttr(resourceName, "connection_pooler.enabled", "true"),
resource.TestCheckResourceAttr(resourceName, "connection_pooler.pooler.pool_mode", "transaction"),
Expand Down Expand Up @@ -65,11 +66,12 @@ func TestTemboInstanceResource(t *testing.T) {
resource.TestCheckResourceAttr(resourceName, "storage", "10Gi"),
resource.TestCheckResourceAttrSet(resourceName, "instance_id"),
resource.TestCheckResourceAttrSet(resourceName, "last_updated"),
resource.TestCheckResourceAttr(resourceName, "ip_allow_list.#", "2"),
resource.TestCheckResourceAttr(resourceName, "postgres_configs.#", "2"),
resource.TestCheckResourceAttr(resourceName, "connection_pooler.enabled", "true"),
resource.TestCheckResourceAttr(resourceName, "connection_pooler.pooler.pool_mode", "transaction"),
resource.TestCheckResourceAttr(resourceName, "connection_pooler.pooler.parameters.max_client_conn", "20"),
resource.TestCheckResourceAttr(resourceName, "connection_pooler.pooler.parameters.default_pool_size", "100"),
resource.TestCheckResourceAttr(resourceName, "connection_pooler.pooler.parameters.max_client_conn", "50"),
resource.TestCheckResourceAttr(resourceName, "connection_pooler.pooler.parameters.default_pool_size", "5000"),
),
},
// Delete testing automatically occurs in TestCase
Expand Down Expand Up @@ -115,6 +117,7 @@ resource "tembo_instance" "test" {
enabled = true
}]
}]
ip_allow_list = ["71.190.46.69"]
connection_pooler = {
enabled = true,
pooler = {
Expand Down Expand Up @@ -197,13 +200,14 @@ resource "tembo_instance" "test" {
}
]
}]
ip_allow_list = ["71.190.46.69", "71.190.46.70"]
connection_pooler = {
enabled = true,
pooler = {
pool_mode = "transaction",
parameters = {
max_client_conn = "20"
default_pool_size = "100"
max_client_conn = "50"
default_pool_size = "5000"
}
}
}
Expand Down

0 comments on commit 199d779

Please sign in to comment.