Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clearFWStep step in tests not clearing states #248

Closed
ol-imorozko opened this issue Sep 18, 2024 · 0 comments · Fixed by #250
Closed

clearFWStep step in tests not clearing states #248

ol-imorozko opened this issue Sep 18, 2024 · 0 comments · Fixed by #250

Comments

@ol-imorozko
Copy link
Collaborator

ol-imorozko commented Sep 18, 2024

Steps to reproduce

  • Compile autotests
  • Modify autotest.yaml in 045_firewall_out test (sleep 10 to be sure)
diff --git a/autotest/units/001_one_port/045_firewall_out/autotest.yaml b/autotest/units/001_one_port/045_firewall_out/autotest.yaml
index 876f0f2..2bafda6 100644
--- a/autotest/units/001_one_port/045_firewall_out/autotest.yaml
+++ b/autotest/units/001_one_port/045_firewall_out/autotest.yaml
@@ -9,4 +9,7 @@ steps:
   - port: kni0
     send: 001-send.pcap
     expect: 001-expect.pcap
+
 - clearFWState: 1
+- sleep: 10
+- cli: 'fw list states'
  • Run ./autotest/yanet-autotest-run.py --prefix=build_autotest autotest/units/001_one_port autotest/units/001_one_port/045_firewall_out/

  • Log will contain:

[DEBUG] 1726660834.255800 ../autotest/autotest.cpp:1369: step: ipv4Update
[DEBUG] 1726660835.189807 ../autotest/autotest.cpp:1393: step: ipv6Update
[DEBUG] 1726660835.204893 ../autotest/autotest.cpp:1369: step: ipv4Update
[DEBUG] 1726660835.227646 ../autotest/autotest.cpp:1393: step: ipv6Update
[DEBUG] 1726660835.237710 ../autotest/autotest.cpp:1369: step: ipv4Update
[DEBUG] 1726660835.257809 ../autotest/autotest.cpp:1393: step: ipv6Update
[DEBUG] 1726660835.267955 ../autotest/autotest.cpp:1411: step: sendPackets
[DEBUG] 1726660835.268246 ../autotest/autotest.cpp:281: send 19 packets
[DEBUG] 1726660837.269970 ../autotest/autotest.cpp:731: recv 12 packets
[DEBUG] 1726660837.270288 ../autotest/autotest.cpp:1448: step: clearFWState
[DEBUG] 1726660837.270637 ../autotest/autotest.cpp:1418: step: sleep
[DEBUG] 1726660847.270856 ../autotest/autotest.cpp:1442: step: cli
[DEBUG] 1726660847.270871 ../autotest/autotest.cpp:1659: yanet-cli fw list states
id        ruleno    label  rule
--------  --------  -----  --------------------------------------------------------------------------------------------------------------------------
16777215  16777215         allow tcp from 2222:898:bf00:400::2 443 to 2222:898:c00:1:0:f805:1:3 12345 [own, last seen: 2s ago flags S:][packets: 0/0]
done 'autotest/units/001_one_port/045_firewall_out/'

Expected result

clearFWState should clear states and we should see no entries in yanet-cli fw list states

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant