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
12 changes: 8 additions & 4 deletions internal/services/ipam/ip_data_source_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package ipam_test

import (
"fmt"
"testing"

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
Expand Down Expand Up @@ -123,13 +124,16 @@ func TestAccDataSourceIPAMIP_InstanceLB(t *testing.T) {
func TestAccDataSourceIPAMIP_RDB(t *testing.T) {
tt := acctest.NewTestTools(t)
defer tt.Cleanup()

latestEngineVersion := rdbchecks.GetLatestEngineVersion(tt, "PostgreSQL")

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { acctest.PreCheck(t) },
ProviderFactories: tt.ProviderFactories,
CheckDestroy: rdbchecks.IsInstanceDestroyed(tt),
Steps: []resource.TestStep{
{
Config: `
Config: fmt.Sprintf(`
resource "scaleway_vpc" "main" {
name = "tf-tests-ipam-ip-datasource-rdb"
}
Expand All @@ -145,13 +149,13 @@ func TestAccDataSourceIPAMIP_RDB(t *testing.T) {
resource scaleway_rdb_instance main {
name = "test-ipam-ip-rdb"
node_type = "db-dev-s"
engine = "PostgreSQL-14"
engine = %q
is_ha_cluster = false
disable_backup = true
user_name = "my_initial_user"
password = "thiZ_is_v&ry_s3cret"
tags = [ "terraform-test", "scaleway_rdb_instance", "volume", "rdb_pn" ]
volume_type = "bssd"
volume_type = "sbs_5k"
volume_size_in_gb = 10
private_network {
pn_id = "${scaleway_vpc_private_network.main.id}"
Expand All @@ -166,7 +170,7 @@ func TestAccDataSourceIPAMIP_RDB(t *testing.T) {
}
type = "ipv4"
}
`,
`, latestEngineVersion),
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttrSet("data.scaleway_ipam_ip.main", "address"),
),
Expand Down
488 changes: 244 additions & 244 deletions internal/services/ipam/testdata/data-source-ipamiprdb.cassette.yaml

Large diffs are not rendered by default.

Loading