The smoketest framework heavily relies on deriving common code paths. The tearDownClass() is called when a testcase finishes and testcases like protocols BGP delete CLI nodes before calling the base class.
The base-class never calls commit() thus the deletions are discarded instead of committed.
test_protocols_bgp.py
@classmethod
def tearDownClass(cls):
cls.cli_delete(cls, ['policy', 'route-map'])
cls.cli_delete(cls, ['policy', 'prefix-list'])
cls.cli_delete(cls, ['policy', 'prefix-list6'])
super(TestProtocolsBGP, cls).tearDownClass()base class base_vyostest_shim.py
@classmethod
def tearDownClass(cls):
# discard any pending changes which might caused a messed up config
cls._session.discard()