Skip to content

Commit 711e277

Browse files
authored
test(vpcgw_dhcp_reservation): split data source basic test in steps (#1440)
1 parent 113b986 commit 711e277

File tree

2 files changed

+2584
-1751
lines changed

2 files changed

+2584
-1751
lines changed

scaleway/data_source_vpc_public_gateway_dhcp_reservation_test.go

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,45 @@ func TestAccScalewayDataSourceVPCPublicGatewayDHCPReservation_Basic(t *testing.T
1717
CheckDestroy: testAccCheckScalewayVPCPublicGatewayDHCPDestroy(tt),
1818

1919
Steps: []resource.TestStep{
20+
{
21+
Config: fmt.Sprintf(`
22+
resource scaleway_vpc_private_network main {
23+
name = "%s"
24+
}
25+
26+
resource "scaleway_instance_server" "main" {
27+
image = "ubuntu_focal"
28+
type = "DEV1-S"
29+
zone = "fr-par-1"
30+
31+
private_network {
32+
pn_id = scaleway_vpc_private_network.main.id
33+
}
34+
}
35+
36+
resource scaleway_vpc_public_gateway_ip main {
37+
}
38+
39+
resource scaleway_vpc_public_gateway_dhcp main {
40+
subnet = "192.168.1.0/24"
41+
}
42+
43+
resource scaleway_vpc_public_gateway main {
44+
name = "foobar"
45+
type = "VPC-GW-S"
46+
ip_id = scaleway_vpc_public_gateway_ip.main.id
47+
}
48+
49+
resource scaleway_vpc_gateway_network main {
50+
gateway_id = scaleway_vpc_public_gateway.main.id
51+
private_network_id = scaleway_vpc_private_network.main.id
52+
dhcp_id = scaleway_vpc_public_gateway_dhcp.main.id
53+
cleanup_dhcp = true
54+
enable_masquerade = true
55+
depends_on = [scaleway_vpc_public_gateway_ip.main, scaleway_vpc_private_network.main]
56+
}
57+
`, pnName),
58+
},
2059
{
2160
Config: fmt.Sprintf(`
2261
resource scaleway_vpc_private_network main {

0 commit comments

Comments
 (0)