Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bartoszWojciechO committed Oct 16, 2024
1 parent 0f8e6bf commit d176dca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/qa/test_fileshare.py
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,7 @@ def test_clear():
def test_fileshare_process_monitoring():
# port is open when fileshare is running
rules = os.popen("sudo iptables -S").read()
assert "49111 -m comment --comment nordvpn -j ACCEPT" in rules
assert "49111 -m comment --comment nordvpn-meshnet -j ACCEPT" in rules

sh.pkill("-SIGKILL", "nordfileshare")
# at the time of writing, the monitoring job is executed periodically every 5 seconds,
Expand All @@ -922,11 +922,11 @@ def test_fileshare_process_monitoring():

# port is not allowed when fileshare is down
rules = os.popen("sudo iptables -S").read()
assert "49111 -m comment --comment nordvpn -j ACCEPT" not in rules
assert "49111 -m comment --comment nordvpn-meshnet -j ACCEPT" not in rules

os.popen("/usr/lib/nordvpn/nordfileshare &")
time.sleep(10)

# port is allowed again when fileshare process is up
rules = os.popen("sudo iptables -S").read()
assert "49111 -m comment --comment nordvpn -j ACCEPT" in rules
assert "49111 -m comment --comment nordvpn-meshnet -j ACCEPT" in rules

0 comments on commit d176dca

Please sign in to comment.