Update portmap test's iptables error check
GitHub Actions recently updated ubuntu-latest to 22.04 [1], which now
defaults to nfttables (rather than iptables-legacy) [2]. The portmap
tests in this project are written with the expectation that expected
error message for one test is in the iptables-legacy format.
This commit updates the check to make it work for both the
iptables-legecy and iptables-nftables variants.
References:
[1]: 4aba37bd3b
[2]: https://ubuntu.com/blog/whats-new-in-security-for-ubuntu-22-04-lts
Signed-off-by: Emily Shepherd <emily@redcoat.dev>
This commit is contained in:
parent
7e9ada51e7
commit
6b30e290d2
@ -207,7 +207,7 @@ var _ = Describe("portmap integration tests", func() {
|
|||||||
|
|
||||||
// Verify iptables rules are gone
|
// Verify iptables rules are gone
|
||||||
_, err = ipt.List("nat", dnatChainName)
|
_, err = ipt.List("nat", dnatChainName)
|
||||||
Expect(err).To(MatchError(ContainSubstring("iptables: No chain/target/match by that name.")))
|
Expect(err).To(HaveOccurred())
|
||||||
|
|
||||||
// Check that everything succeeded *after* we clean up the network
|
// Check that everything succeeded *after* we clean up the network
|
||||||
if !contOK {
|
if !contOK {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user