Skip to content

Commit 2c2fa20

Browse files
authored
tests(instance_server): use sbs and b_ssd together (#2768)
1 parent 4204b3a commit 2c2fa20

File tree

2 files changed

+1866
-699
lines changed

2 files changed

+1866
-699
lines changed

internal/services/instance/server_test.go

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1695,6 +1695,30 @@ func TestAccServer_BlockExternal(t *testing.T) {
16951695
resource.TestCheckResourceAttrPair("scaleway_instance_server.main", "additional_volume_ids.0", "scaleway_block_volume.volume", "id"),
16961696
),
16971697
},
1698+
{
1699+
Config: `
1700+
resource "scaleway_block_volume" "volume" {
1701+
iops = 5000
1702+
size_in_gb = 10
1703+
}
1704+
1705+
resource "scaleway_instance_volume" "volume" {
1706+
type = "b_ssd"
1707+
size_in_gb = 10
1708+
}
1709+
1710+
resource "scaleway_instance_server" "main" {
1711+
image = "ubuntu_jammy"
1712+
type = "PLAY2-PICO"
1713+
additional_volume_ids = [scaleway_block_volume.volume.id, scaleway_instance_volume.volume.id]
1714+
}`,
1715+
Check: resource.ComposeTestCheckFunc(
1716+
resource.TestCheckResourceAttr("scaleway_instance_server.main", "type", "PLAY2-PICO"),
1717+
resource.TestCheckResourceAttr("scaleway_instance_server.main", "additional_volume_ids.#", "2"),
1718+
resource.TestCheckResourceAttrPair("scaleway_instance_server.main", "additional_volume_ids.0", "scaleway_block_volume.volume", "id"),
1719+
resource.TestCheckResourceAttrPair("scaleway_instance_server.main", "additional_volume_ids.1", "scaleway_instance_volume.volume", "id"),
1720+
),
1721+
},
16981722
},
16991723
})
17001724
}

0 commit comments

Comments
 (0)