Closed jwhb closed 1 month ago
A test runner can be set with cargo --config "target.'cfg(target_os = \"linux\")'.runner = 'unshare -rn'" test
.
Ideally we could mark the tests that require a netns and have cargo use the runner only for the marked tests, but this does not seem to be supported yet.
18 introduced running tests against
nft
inside network namespaces with a script that manually manages a network namespace to executecargo test
.The
helper_tests
could be improved such that each test callsunshare -rn nft
asprogram
arg for apply and get ruleset functions.