From d8fa257b96423271ede13cfb6255f23687c5bb7a Mon Sep 17 00:00:00 2001 From: Richard Freitag Date: Thu, 29 Aug 2024 14:45:48 +0100 Subject: [PATCH] Status test: Do not test other nodes if only one node should be tested --- test_status_cli.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/test_status_cli.py b/test_status_cli.py index 3ee37b1..aade682 100644 --- a/test_status_cli.py +++ b/test_status_cli.py @@ -305,10 +305,11 @@ def test_frontend_statusinfo(self): def test_node_statusinfo(self): drv = sunetnextcloud.TestTarget() for node in expectedResults['global']['redundantnodes']: - with self.subTest(myurl=node): - logger.info(f'TestID: {node}') - statusInfoThread = NodeStatusInfo(node, self) - statusInfoThread.start() + if node in drv.allnodes: + with self.subTest(myurl=node): + logger.info(f'TestID: {node}') + statusInfoThread = NodeStatusInfo(node, self) + statusInfoThread.start() while(testThreadsRunning > 0): time.sleep(1) @@ -323,10 +324,11 @@ def test_node_statusinfo(self): def test_statusinfo(self): drv = sunetnextcloud.TestTarget() for node in expectedResults['global']['allnodes']: - with self.subTest(myurl=node): - logger.info(f'TestID: {node}') - statusInfoThread = StatusInfo(node, self) - statusInfoThread.start() + if node in drv.allnodes: + with self.subTest(myurl=node): + logger.info(f'TestID: {node}') + statusInfoThread = StatusInfo(node, self) + statusInfoThread.start() while(testThreadsRunning > 0): time.sleep(1)