Skip to content

Commit d48c805

Browse files
authored
tests(ipam): replace deprecated rdb volume type (#3079)
1 parent 8801985 commit d48c805

File tree

2 files changed

+252
-248
lines changed

2 files changed

+252
-248
lines changed

internal/services/ipam/ip_data_source_test.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package ipam_test
22

33
import (
4+
"fmt"
45
"testing"
56

67
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
@@ -123,13 +124,16 @@ func TestAccDataSourceIPAMIP_InstanceLB(t *testing.T) {
123124
func TestAccDataSourceIPAMIP_RDB(t *testing.T) {
124125
tt := acctest.NewTestTools(t)
125126
defer tt.Cleanup()
127+
128+
latestEngineVersion := rdbchecks.GetLatestEngineVersion(tt, "PostgreSQL")
129+
126130
resource.ParallelTest(t, resource.TestCase{
127131
PreCheck: func() { acctest.PreCheck(t) },
128132
ProviderFactories: tt.ProviderFactories,
129133
CheckDestroy: rdbchecks.IsInstanceDestroyed(tt),
130134
Steps: []resource.TestStep{
131135
{
132-
Config: `
136+
Config: fmt.Sprintf(`
133137
resource "scaleway_vpc" "main" {
134138
name = "tf-tests-ipam-ip-datasource-rdb"
135139
}
@@ -145,13 +149,13 @@ func TestAccDataSourceIPAMIP_RDB(t *testing.T) {
145149
resource scaleway_rdb_instance main {
146150
name = "test-ipam-ip-rdb"
147151
node_type = "db-dev-s"
148-
engine = "PostgreSQL-14"
152+
engine = %q
149153
is_ha_cluster = false
150154
disable_backup = true
151155
user_name = "my_initial_user"
152156
password = "thiZ_is_v&ry_s3cret"
153157
tags = [ "terraform-test", "scaleway_rdb_instance", "volume", "rdb_pn" ]
154-
volume_type = "bssd"
158+
volume_type = "sbs_5k"
155159
volume_size_in_gb = 10
156160
private_network {
157161
pn_id = "${scaleway_vpc_private_network.main.id}"
@@ -166,7 +170,7 @@ func TestAccDataSourceIPAMIP_RDB(t *testing.T) {
166170
}
167171
type = "ipv4"
168172
}
169-
`,
173+
`, latestEngineVersion),
170174
Check: resource.ComposeTestCheckFunc(
171175
resource.TestCheckResourceAttrSet("data.scaleway_ipam_ip.main", "address"),
172176
),

internal/services/ipam/testdata/data-source-ipamiprdb.cassette.yaml

Lines changed: 244 additions & 244 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)