From 6f242298fed45574cd896290af341e23f1db8b88 Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Mon, 17 Aug 2020 19:02:24 -0500 Subject: [PATCH] Don't run LAN unittests on QubesOS --- tests/test_lan_learn.py | 5 +++++ tests/test_lan_publsh.py | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/tests/test_lan_learn.py b/tests/test_lan_learn.py index ed548ecc..4b21052b 100644 --- a/tests/test_lan_learn.py +++ b/tests/test_lan_learn.py @@ -17,12 +17,17 @@ from utils import bettersleep from lan.discover import lan_ips, MCAST_GRP, MCAST_PORT from lan.discover import learn_services, advertise_service import socket +import logger from socket import SHUT_RDWR +from etc import onionrvalues lan_ips = [''] class TestLanLearn(unittest.TestCase): def test_lan_learn(self): + if onionrvalues.IS_QUBES: + logger.info('Cannot run LAN tests on Qubes') + return test_ip = '192.168.1.30' def multicast(): port = 1349 diff --git a/tests/test_lan_publsh.py b/tests/test_lan_publsh.py index d003eeee..b54ddfd2 100644 --- a/tests/test_lan_publsh.py +++ b/tests/test_lan_publsh.py @@ -19,11 +19,16 @@ from lan.discover import lan_ips, MCAST_GRP, MCAST_PORT, IS_ALL_GROUPS from lan.discover import advertise_service import socket from socket import SHUT_RDWR +import logger +from etc import onionrvalues class TestLanLearn(unittest.TestCase): def test_lan_broadcast(self): test_ip = '192.168.1.30' + if onionrvalues.IS_QUBES: + logger.info('Cannot run LAN tests on Qubes') + return def multicast(): sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP) sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)