summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-08-18 09:54:21 +0200
committerChristian Poessinger <christian@poessinger.com>2021-08-18 09:54:21 +0200
commit8c1bc03f7088e49a7ca7b1dfc3612e4975c1371f (patch)
treefde651a70f0173e15fb613eec86e6a9ea13061f4
parentc788c26d5b7a1e175afc866a69fb720006a9dc1f (diff)
downloadvyos-1x-8c1bc03f7088e49a7ca7b1dfc3612e4975c1371f.tar.gz
vyos-1x-8c1bc03f7088e49a7ca7b1dfc3612e4975c1371f.zip
smoketest: ssh: migrate setUp -> setUpClass to run code only once
... minor change to speed-up test time
-rwxr-xr-xsmoketest/scripts/cli/test_service_ssh.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/smoketest/scripts/cli/test_service_ssh.py b/smoketest/scripts/cli/test_service_ssh.py
index c76f709b1..ded4d8301 100755
--- a/smoketest/scripts/cli/test_service_ssh.py
+++ b/smoketest/scripts/cli/test_service_ssh.py
@@ -41,10 +41,13 @@ def get_config_value(key):
return tmp
class TestServiceSSH(VyOSUnitTestSHIM.TestCase):
- def setUp(self):
+ @classmethod
+ def setUpClass(cls):
+ super(cls, cls).setUpClass()
+
# ensure we can also run this test on a live system - so lets clean
# out the current configuration :)
- self.cli_delete(base_path)
+ cls.cli_delete(cls, base_path)
def tearDown(self):
# delete testing SSH config