pasta: Test handling of unknown protocols

Test that pasta generates a sensible error message if asked to forward a
protocol it doesn't understand.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
Stefano Brivio
2023-06-05 12:43:27 +10:00
committed by David Gibson
parent b2c0006706
commit cf9bc25bbc

View File

@ -681,3 +681,11 @@ function teardown() {
sleep 1 sleep 1
! ps -p $(cat "${pidfile}") && rm "${pidfile}" ! ps -p $(cat "${pidfile}") && rm "${pidfile}"
} }
### Options ####################################################################
@test "podman networking with pasta(1) - Unsupported protocol in port forwarding" {
local port=$(random_free_port "" "" tcp)
run_podman 126 run --net=pasta -p "${port}:${port}/sctp" $IMAGE true
is "$output" "Error: .*can't forward protocol: sctp"
}