Repository navigation
Fix IOS token version test under CI environment override - #132
Conversation
|
CI review before merging this follow-up test fix: The failed PR job installs public The identical internal test fix is merged, and all its reported CI checks passed. The external failure is the existing prepublication dependency mismatch, not a failure in the code changed by this follow-up PR. Other external matrix cancellations are fail-fast cancellations and are not being described as passing tests. The release lead explicitly authorized merging this external PR with the documented dependency exception. Matching Unicon 26.9 dependencies are required to validate the full external suite. |
Description
Isolate
TestAbstractTokenDiscoveryConnection.test_ios_learn_tokens_from_show_versionfrom the globalLEARN_OS_VERSIONenvironment override.The test expects the full IOS version
15.0(20100325:222114). If the runner setsLEARN_OS_VERSION=False, version learning is disabled and the discovered version remains15.Use
patch.dict(os.environ)to temporarily remove the override during the connection and assertions, then restore the original environment automatically. This follows the existing IOS and IOS XE version-learning test pattern and preserves the full-version assertion.Validation
git diff --checkpassed.test_utils.py::TestAbstractTokenDiscoveryConnection::test_ios_learn_tokens_from_show_versionwithLEARN_OS_VERSION=Falseand with the variable unset.Includes a test-fix changelog.