(cls)
| 21 | |
| 22 | @classmethod |
| 23 | def setUpClass(cls): |
| 24 | super(TestProm, cls).setUpClass() |
| 25 | |
| 26 | cls.ns_history_name = ( |
| 27 | f"{config.tmp_dir}/{get_testcase_dirname(cls.__name__)}/history_ns.txt" |
| 28 | ) |
| 29 | cls.if_history_name = ( |
| 30 | f"{config.tmp_dir}/{get_testcase_dirname(cls.__name__)}/history_if.txt" |
| 31 | ) |
| 32 | |
| 33 | try: |
| 34 | # CleanUp |
| 35 | delete_all_namespaces(cls.ns_history_name) |
| 36 | delete_all_host_interfaces(cls.if_history_name) |
| 37 | |
| 38 | cls.ns_name = create_namespace(cls.ns_history_name) |
| 39 | |
| 40 | cls.host_if_name, cls.vpp_if_name = create_host_interface( |
| 41 | cls.if_history_name, cls.ns_name, "10.10.1.1/24" |
| 42 | ) |
| 43 | except Exception as e: |
| 44 | cls.logger.warning(f"Unable to complete setup: {e}") |
| 45 | raise unittest.SkipTest("Skipping tests due to setup failure.") |
| 46 | |
| 47 | cls.vapi.cli(f"create host-interface name {cls.vpp_if_name}") |
| 48 | cls.vapi.cli(f"set int state host-{cls.vpp_if_name} up") |
| 49 | cls.vapi.cli(f"set int ip address host-{cls.vpp_if_name} 10.10.1.2/24") |
| 50 | |
| 51 | @classmethod |
| 52 | def tearDownClass(cls): |
nothing calls this directly
no test coverage detected