From 68bffa2f4551158619610130b47c3f02a0a117b9 Mon Sep 17 00:00:00 2001 From: Ben Whaley <503816+bwhaley@users.noreply.github.com> Date: Wed, 18 Dec 2024 14:32:21 -0800 Subject: [PATCH] fix test --- test/alternat_test.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/test/alternat_test.go b/test/alternat_test.go index aa6f33d..937fcdb 100644 --- a/test/alternat_test.go +++ b/test/alternat_test.go @@ -137,12 +137,14 @@ func TestAlternat(t *testing.T) { retry.DoWithRetry(t, fmt.Sprintf("Check SSH connection to %s", ip), maxRetries, waitTime, func() (string, error) { return "", ssh.CheckSshConnectionE(t, natInstance) }) - command := "/usr/sbin/sysctl net.ipv4.ip_forward net.ipv4.conf.eth0.send_redirects net.ipv4.ip_local_port_range" + command := "/usr/sbin/nft list ruleset" - expectedText := `net.ipv4.ip_forward = 1 -net.ipv4.conf.eth0.send_redirects = 0 -net.ipv4.ip_local_port_range = 1024 65535 -` + expectedText := `table ip nat { + chain postrouting { + type nat hook postrouting priority srcnat; policy accept; + ip saddr 10.10.0.0/16 oif "ens5" masquerade + } +}` maxRetries = 1 waitTime = 10 * time.Second @@ -188,7 +190,7 @@ net.ipv4.ip_local_port_range = 1024 65535 return "All private route tables route through NAT Gateway", nil }) logger := logger.Logger{} - logger.Logf(t, output) + logger.Logf(t, output) updateEgress(t, ec2Client, sgId, false) }) }