Skip to content

Commit

Permalink
tests: Remove depends_on from network_peer tests
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas Cusson <[email protected]>
  • Loading branch information
Unitiser committed Dec 10, 2024
1 parent bd990e5 commit fda66d3
Showing 1 changed file with 14 additions and 26 deletions.
40 changes: 14 additions & 26 deletions internal/network/resource_network_peer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,14 @@ func testAccNetworkPeer_basic() string {
resource "incus_network_peer" "lan0_lan1"{
name = "lab0-lan1"
network = "lan0"
target_network = "lan1"
depends_on = ["incus_network.lan0", "incus_network.lan1"]
network = incus_network.lan0.name
target_network = incus_network.lan1.name
}
resource "incus_network_peer" "lan1_lan0"{
name = "lab1-lan0"
network = "lan1"
target_network = "lan0"
depends_on = ["incus_network.lan0", "incus_network.lan1"]
network = incus_network.lan1.name
target_network = incus_network.lan0.name
}
`,
testAccNetworkPeer_ovnbr(),
Expand Down Expand Up @@ -103,22 +99,18 @@ func testAccNetworkPeer_acrossProjects() string {
resource "incus_network_peer" "lan0_lan1"{
name = "lab0-lan1"
project = "projectA"
network = "lan0"
target_project = "projectB"
target_network = "lan1"
depends_on = ["incus_network.projectA_lan0", "incus_network.projectB_lan1"]
project = incus_project.projectA.name
network = incus_network.projectA_lan0.name
target_project = incus_project.projectB.name
target_network = incus_network.projectB_lan1.name
}
resource "incus_network_peer" "lan1_lan0"{
name = "lab1-lan0"
project = "projectB"
network = "lan1"
target_project = "projectA"
target_network = "lan0"
depends_on = ["incus_network.projectA_lan0", "incus_network.projectB_lan1"]
project = incus_project.projectB.name
network = incus_network.projectB_lan1.name
target_project = incus_project.projectA.name
target_network = incus_network.projectA_lan0.name
}
`,
testAccNetworkPeer_ovnbr(),
Expand Down Expand Up @@ -170,8 +162,6 @@ resource "incus_network" "%s" {
"ipv6.nat" = "false"
"network" = incus_network.ovnbr.name
}
depends_on = ["incus_network.ovnbr"]
}
`, network, network, ipv4)
}
Expand All @@ -181,7 +171,7 @@ func testAccNetworkPeer_projectNetwork(project string, network string, ipv4 stri
resource "incus_network" "%s_%s" {
name = "%s"
type = "ovn"
project = "%s"
project = incus_project.%s.name
config = {
"ipv4.address" = "%s/24"
Expand All @@ -190,8 +180,6 @@ resource "incus_network" "%s_%s" {
"ipv6.nat" = "false"
"network" = incus_network.ovnbr.name
}
depends_on = ["incus_network.ovnbr", "incus_project.%s"]
}
`, project, network, network, project, ipv4, project)
`, project, network, network, project, ipv4)
}

0 comments on commit fda66d3

Please sign in to comment.