diff --git a/integration/nats_firewall_test.go b/integration/nats_firewall_test.go index 6e7fe1707..f571544b7 100644 --- a/integration/nats_firewall_test.go +++ b/integration/nats_firewall_test.go @@ -77,10 +77,10 @@ var _ = Describe("nats firewall", func() { AfterEach(func() { err := testEnvironment.DetachDevice("/dev/sdh") Expect(err).ToNot(HaveOccurred()) - _, err = testEnvironment.RunCommand("sudo ip6tables -t mangle -D POSTROUTING -d 2001:db8::1 -p tcp --dport 8080 -m cgroup --cgroup 2958295042 -j ACCEPT --wait") - Expect(err).To(BeNil()) - _, err = testEnvironment.RunCommand("sudo ip6tables -t mangle -D POSTROUTING -d 2001:db8::1 -p tcp --dport 8080 -j DROP --wait") - Expect(err).To(BeNil()) + _, err = testEnvironment.RunCommand("sudo ip6tables -t mangle -D POSTROUTING -d 2001:db8::1 -p tcp --dport 4222 -m cgroup --cgroup 2958295042 -j ACCEPT --wait") + Expect(err).ToNot(HaveOccurred()) + _, err = testEnvironment.RunCommand("sudo ip6tables -t mangle -D POSTROUTING -d 2001:db8::1 -p tcp --dport 4222 -j DROP --wait") + Expect(err).ToNot(HaveOccurred()) }) It("sets up the outgoing nats for firewall ipv6", func() { @@ -96,8 +96,8 @@ var _ = Describe("nats firewall", func() { Expect(err).To(BeNil()) // Check iptables for inclusion of the nats_cgroup_id - Expect(output).To(MatchRegexp("ACCEPT *tcp *anywhere *2001:db8::1 *tcp dpt:http-alt cgroup 2958295042")) - Expect(output).To(MatchRegexp("DROP *tcp *anywhere *2001:db8::1 *tcp dpt:http-alt")) + Expect(output).To(MatchRegexp("ACCEPT *tcp *anywhere *2001:db8::1 *tcp dpt:4222 cgroup 2958295042")) + Expect(output).To(MatchRegexp("DROP *tcp *anywhere *2001:db8::1 *tcp dpt:4222")) Expect(output).To(MatchRegexp("2001:db8::1")) })