Skip to content

Commit 7a13745

Browse files
committed
Fix rebroadcast test in GitHub Actions
1 parent 37fb12f commit 7a13745

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/integration/test_snowsignal.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,11 +181,11 @@ async def test_fragments_rebroadcast(self, mock_datagram_received: unittest.mock
181181
# Start main. But first we need to determine if we're in the GitLab CI/CD environment. If we are then
182182
# for reasons that aren't clear to me we see only PACKET_OUTGOING and no PACKET_BROADCAST as we'd expect.
183183
# Outside of the GitLab CI/CD environment we can just use the usual default behaviour. In this case that's
184-
# to expect
185-
if os.environ.get("GITLAB_CI", False):
186-
packet_filter = 0x0003
184+
# to filter so we only see IP packets
185+
if os.environ.get("GITLAB_CI", False) or os.environ.get("GITHUB_ACTIONS", False):
186+
packet_filter = 0x0003 # ETH_P_ALL, i.e. all packets
187187
else:
188-
packet_filter = 0x0800
188+
packet_filter = 0x0800 # ETH_P_IP, i.e. IP packets
189189

190190
with patch("snowsignal.udp_relay_transmit.UDPRelayTransmit._packet_filter", packet_filter):
191191
main_task = asyncio.create_task(snowsignal.main("--target-interface=eth0 -ll=debug", loop_forever=True))

0 commit comments

Comments
 (0)