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

Fix flapping of state timeout tests #261

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 3 additions & 16 deletions autotest/units/001_one_port/077_state_timeout/autotest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@ steps:
send: 001-send.pcap
expect: 001-expect.pcap

- cli_check: |
fw list states
id ruleno label rule
-------- -------- ----- --------------------------------------------------------------------------------------------
16777215 16777215 allow tcp from 10.0.0.1 80 to 10.0.0.2 12345 [own, last seen: 2s ago flags S:][packets: 0/0]
- cli: fw list states | grep -q "allow tcp from 10.0.0.1 80 to 10.0.0.2 12345"

- sleep: 6 # Wait for state to expire

Expand All @@ -26,20 +22,11 @@ steps:
send: 001-send.pcap
expect: 001-expect.pcap

- cli_check: |
fw list states
id ruleno label rule
-------- -------- ----- --------------------------------------------------------------------------------------------
16777215 16777215 allow tcp from 10.0.0.1 80 to 10.0.0.2 12345 [own, last seen: 2s ago flags S:][packets: 0/0]
- cli: fw list states | grep -q "allow tcp from 10.0.0.1 80 to 10.0.0.2 12345"

- sleep: 3 # Wait but state should still be present

# note that last seen value changes
- cli_check: |
fw list states
id ruleno label rule
-------- -------- ----- --------------------------------------------------------------------------------------------
16777215 16777215 allow tcp from 10.0.0.1 80 to 10.0.0.2 12345 [own, last seen: 5s ago flags S:][packets: 0/0]
- cli: fw list states | grep -q "allow tcp from 10.0.0.1 80 to 10.0.0.2 12345"

- sleep: 3 # Wait for state to expire

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,11 @@ steps:
- ringTag: shm_2_0
expect: 001-expect-dump-ring1.pcap

- cli_check: |
fw list states
id ruleno label rule
-------- -------- ----- -------------------------------------------------------------------------------------------
16777215 16777215 allow udp from 10.0.0.1 53 to 10.0.0.10 1024 [own, last seen: 2s ago flags :][packets: 0/0]
- cli: fw list states | grep -q "allow udp from 10.0.0.1 53 to 10.0.0.10 1024"

- sleep: 3 # Wait, state should still be present

- cli_check: |
fw list states
id ruleno label rule
-------- -------- ----- -------------------------------------------------------------------------------------------
16777215 16777215 allow udp from 10.0.0.1 53 to 10.0.0.10 1024 [own, last seen: 5s ago flags :][packets: 0/0]
- cli: fw list states | grep -q "allow udp from 10.0.0.1 53 to 10.0.0.10 1024"

- sleep: 3 # Wait for state to expire (total sleep 6s)

Expand All @@ -40,19 +32,11 @@ steps:
- ringTag: shm_2_0
expect: 002-expect-dump-ring1.pcap

- cli_check: |
fw list states
id ruleno label rule
-------- -------- ----- -------------------------------------------------------------------------------------------
16777215 16777215 allow udp from 10.0.0.1 53 to 10.0.0.10 1024 [own, last seen: 2s ago flags :][packets: 0/0]
- cli: fw list states | grep -q "allow udp from 10.0.0.1 53 to 10.0.0.10 1024"

- sleep: 3 # Wait, state should still be present

- cli_check: |
fw list states
id ruleno label rule
-------- -------- ----- -------------------------------------------------------------------------------------------
16777215 16777215 allow udp from 10.0.0.1 53 to 10.0.0.10 1024 [own, last seen: 5s ago flags :][packets: 0/0]
- cli: fw list states | grep -q "allow udp from 10.0.0.1 53 to 10.0.0.10 1024"

- sleep: 3 # Wait for state to expire (total sleep 6s)

Expand Down
Loading