Skip to content

Fix IOS token version test under CI environment override - #132

Merged
Sripadvallabh merged 1 commit into
mainfrom
fix_ios_token_version_test_26_9
Oct 6, 2026
Merged

Sripadvallabh merged 1 commit into
mainfrom
fix_ios_token_version_test_26_9

Conversation

@Sripadvallabh

Copy link
Copy Markdown
Contributor

Description

Isolate TestAbstractTokenDiscoveryConnection.test_ios_learn_tokens_from_show_version from the global LEARN_OS_VERSION environment override.

The test expects the full IOS version 15.0(20100325:222114). If the runner sets LEARN_OS_VERSION=False, version learning is disabled and the discovered version remains 15.

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

  • Reviewed the diff and confirmed the patch matches the internal repository.
  • git diff --check passed.
  • Local tests have not been run for this follow-up; CI validation is pending.
  • Targeted check: run test_utils.py::TestAbstractTokenDiscoveryConnection::test_ios_learn_tokens_from_show_version with LEARN_OS_VERSION=False and with the variable unset.

Includes a test-fix changelog.

@Sripadvallabh
Sripadvallabh requested a review from a team as a code owner October 6, 2026 12:12
@Sripadvallabh

Copy link
Copy Markdown
Contributor Author

CI review before merging this follow-up test fix:

The failed PR job installs public unicon-26.8 and fails 12 existing connection-dialog tests that require Unicon 26.9 core methods and arguments. The push workflow reports the same failures. test_connection_dialog_override.py is unchanged by this PR; the PR updates environment isolation in the IOS version test in test_utils.py and adds its changelog.

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.

@Sripadvallabh
Sripadvallabh merged commit ec9a8e9 into main Oct 6, 2026
10 of 50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants