Use this to replace ncat. ncat is flaky and harder to use and with
the latest version it seems they broke us in a way that makes the flags
we use incompatible[1].
As a nice benefit this makes the test code itself simpler and faster as
we get rid of the is port bound polling/sleeps.
[1] https://github.com/containers/netavark/pull/1282
Fixes: #1076
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
nc can be provided by several implementations. We depend on the nmap
version so make sure to use that.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Add bats tests for netavark. The test run netavark in completely
separate network namespaces to not leak any information on the host. The
test runs with the iptables driver but also with the firewalld driver
see test/020-firewalld.bats. This is important to cover all firewall
driver code paths.
You can run the tests with `sudo bats test/` or `podman unshare
--rootless-netns bats test/`. Note that the `--rootless-netns` flag is
called `--rootless-cni` for podman < v4.0.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>