Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Kämmerling <lukas.kaemmerling@hetzner-cloud.de>
  • Loading branch information
LKaemmerling committed Jun 19, 2021
1 parent 449710e commit 993b3cd
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions internal/e2etests/firewall/resource_test.go
Expand Up @@ -32,10 +32,10 @@ func TestFirewallResource_Basic(t *testing.T) {
Port: "80",
},
{
Direction: "in",
Protocol: "udp",
DestinationIPs: []string{"0.0.0.0/0", "::/0"},
Port: "any",
Direction: "in",
Protocol: "udp",
SourceIPs: []string{"0.0.0.0/0", "::/0"},
Port: "any",
},
})

Expand All @@ -53,10 +53,10 @@ func TestFirewallResource_Basic(t *testing.T) {
Port: "443",
},
{
Direction: "in",
Protocol: "udp",
DestinationIPs: []string{"0.0.0.0/0", "::/0"},
Port: "any",
Direction: "in",
Protocol: "udp",
SourceIPs: []string{"0.0.0.0/0", "::/0"},
Port: "any",
},
})
updated.SetRName(res.RName())
Expand All @@ -74,7 +74,7 @@ func TestFirewallResource_Basic(t *testing.T) {
testsupport.CheckResourceExists(res.TFID(), firewall.ByID(t, &f)),
resource.TestCheckResourceAttr(res.TFID(), "name",
fmt.Sprintf("basic-firewall--%d", tmplMan.RandInt)),
resource.TestCheckResourceAttr(res.TFID(), "rule.#", "2"),
resource.TestCheckResourceAttr(res.TFID(), "rule.#", "3"),
testsupport.LiftTCF(hasFirewallRule(t, &f, "in", "80", "tcp", []string{"0.0.0.0/0", "::/0"}, []string{})),
testsupport.LiftTCF(hasFirewallRule(t, &f, "out", "80", "tcp", []string{}, []string{"0.0.0.0/0", "::/0"})),
),
Expand All @@ -93,7 +93,7 @@ func TestFirewallResource_Basic(t *testing.T) {
testsupport.CheckResourceExists(res.TFID(), firewall.ByID(t, &f)),
resource.TestCheckResourceAttr(res.TFID(), "name",
fmt.Sprintf("basic-firewall--%d", tmplMan.RandInt)),
resource.TestCheckResourceAttr(res.TFID(), "rule.#", "2"),
resource.TestCheckResourceAttr(res.TFID(), "rule.#", "3"),
testsupport.LiftTCF(hasFirewallRule(t, &f, "in", "443", "tcp", []string{"0.0.0.0/0", "::/0"}, []string{})),
testsupport.LiftTCF(hasFirewallRule(t, &f, "out", "443", "tcp", []string{}, []string{"0.0.0.0/0", "::/0"})),
),
Expand Down

0 comments on commit 993b3cd

Please sign in to comment.