diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-08-18 09:53:40 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-08-18 09:53:40 +0200 |
commit | c788c26d5b7a1e175afc866a69fb720006a9dc1f (patch) | |
tree | 931403dd35b07b5e1d876f74eb8d2ed3365420f8 | |
parent | 2606f95cb07f55716f4b205a0e88be259936703e (diff) | |
download | vyos-1x-c788c26d5b7a1e175afc866a69fb720006a9dc1f.tar.gz vyos-1x-c788c26d5b7a1e175afc866a69fb720006a9dc1f.zip |
smoketest: nat66: migrate setUp -> setUpClass to run code only once
... minor change to speed-up test time
-rwxr-xr-x | smoketest/scripts/cli/test_nat66.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/smoketest/scripts/cli/test_nat66.py b/smoketest/scripts/cli/test_nat66.py index dca92c97d..7721105e0 100755 --- a/smoketest/scripts/cli/test_nat66.py +++ b/smoketest/scripts/cli/test_nat66.py @@ -31,10 +31,13 @@ src_path = base_path + ['source'] dst_path = base_path + ['destination'] class TestNAT66(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): self.cli_delete(base_path) @@ -183,4 +186,4 @@ class TestNAT66(VyOSUnitTestSHIM.TestCase): self.cli_commit() if __name__ == '__main__': - unittest.main(verbosity=2) + unittest.main(verbosity=2, failfast=True) |