Page MenuHomeVyOS Platform

smoketests: missing base-class call to commit() in tearDownClass()
Closed, ResolvedPublicBUG

Description

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()

Details

Version
2026.05.09-0042-rolling
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)