Skip to content

Commit 66308ff

Browse files
committed
fix wrong network hash in iptables test
Signed-off-by: lto-dev <[email protected]>
1 parent 9645631 commit 66308ff

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

test/100-bridge-iptables.bats

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1097,13 +1097,13 @@ function check_simple_bridge_iptables() {
10971097
run_netavark --file ${TESTSDIR}/testfiles/bridge-outbound-addr.json setup $(get_container_netns_path)
10981098

10991099
# Check that the iptables rules were created with SNAT
1100-
run_in_host_netns iptables -t nat -S NETAVARK-2F259BAB93AAAAA
1101-
assert "${lines[2]}" == "-A NETAVARK-2F259BAB93AAAAA ! -d 224.0.0.0/4 -j SNAT --to-source 100.1.100.1" "SNAT rule with outbound address"
1100+
run_in_host_netns iptables -t nat -S NETAVARK-F11DC6A6D09CF
1101+
assert "${lines[2]}" == "-A NETAVARK-F11DC6A6D09CF ! -d 224.0.0.0/4 -j SNAT --to-source 100.1.100.1"
11021102

11031103
run_netavark --file ${TESTSDIR}/testfiles/bridge-outbound-addr.json teardown $(get_container_netns_path)
11041104

11051105
# Check that the chain is removed
1106-
expected_rc=1 run_in_host_netns iptables -t nat -nvL NETAVARK-2F259BAB93AAAAA
1106+
expected_rc=1 run_in_host_netns iptables -t nat -nvL NETAVARK-F11DC6A6D09CF
11071107
}
11081108

11091109
@test "$fw_driver - aardvark-dns error cleanup" {

test/250-bridge-nftables.bats

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1037,7 +1037,7 @@ function check_simple_bridge_nftables() {
10371037

10381038
# Check that the nftables rules were created with SNAT
10391039
run_in_host_netns nft list chain inet netavark nv_2f259bab_10_89_0_0_nm24
1040-
assert "${lines[3]}" =~ "ip daddr != 224.0.0.0/4 snat ip to 100.1.100.1" "SNAT rule with outbound address"
1040+
assert "${lines[3]}" =~ "ip daddr != 224.0.0.0/4 snat ip to 100.1.100.1"
10411041

10421042
run_netavark --file ${TESTSDIR}/testfiles/bridge-outbound-addr.json teardown $(get_container_netns_path)
10431043

test/testfiles/bridge-outbound-addr.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"interface_name": "eth0",
77
"static_ips": [
88
"10.89.0.2"
9-
]
9+
]
1010
}
1111
},
1212
"network_info": {

0 commit comments

Comments
 (0)