mirror of
https://github.com/containers/podman.git
synced 2025-11-29 01:28:22 +08:00
Remove iptables references in system tests
Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
This commit is contained in:
@@ -320,7 +320,7 @@ load helpers.network
|
|||||||
run_podman 1 network rm $mynetname
|
run_podman 1 network rm $mynetname
|
||||||
}
|
}
|
||||||
|
|
||||||
# CANNOT BE PARALLELIZED due to iptables/nft commands
|
# CANNOT BE PARALLELIZED due to nft commands
|
||||||
@test "podman network reload" {
|
@test "podman network reload" {
|
||||||
skip_if_remote "podman network reload does not have remote support"
|
skip_if_remote "podman network reload does not have remote support"
|
||||||
|
|
||||||
@@ -356,12 +356,9 @@ load helpers.network
|
|||||||
# rootless cannot modify the host firewall
|
# rootless cannot modify the host firewall
|
||||||
if ! is_rootless; then
|
if ! is_rootless; then
|
||||||
# for debugging only
|
# for debugging only
|
||||||
iptables -t nat -nvL || true
|
|
||||||
nft list ruleset || true
|
nft list ruleset || true
|
||||||
|
|
||||||
# flush the firewall rule here to break port forwarding
|
# flush the firewall rule here to break port forwarding
|
||||||
# netavark can use either iptables or nftables, so try flushing both
|
|
||||||
iptables -t nat -F "NETAVARK-HOSTPORT-DNAT" || true
|
|
||||||
nft delete table inet netavark || true
|
nft delete table inet netavark || true
|
||||||
|
|
||||||
# check that we cannot curl (timeout after 1 sec)
|
# check that we cannot curl (timeout after 1 sec)
|
||||||
@@ -369,7 +366,7 @@ load helpers.network
|
|||||||
assert $status -eq 28 "curl did not time out"
|
assert $status -eq 28 "curl did not time out"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# reload the network to recreate the iptables rules
|
# reload the network to recreate the nftables rules
|
||||||
run_podman network reload $cid
|
run_podman network reload $cid
|
||||||
is "$output" "$cid" "Output does match container ID"
|
is "$output" "$cid" "Output does match container ID"
|
||||||
|
|
||||||
@@ -400,7 +397,7 @@ load helpers.network
|
|||||||
mac2="${lines[2]}"
|
mac2="${lines[2]}"
|
||||||
|
|
||||||
# make sure --all is working and that this
|
# make sure --all is working and that this
|
||||||
# cmd also works if the iptables still exists
|
# cmd also works if the nftables still exists
|
||||||
run_podman network reload --all
|
run_podman network reload --all
|
||||||
is "$output" "$cid" "Output does match container ID"
|
is "$output" "$cid" "Output does match container ID"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user