test(genai-stack): 24 tests for commands/auth.py facade#2050
Merged
Conversation
Complete test coverage for the auth CLI facade (110 lines): - TestRegister (6): subparser creation, all 5 actions, flags, invalid rejection - TestExecuteInit (4): config exists/missing, force flag, output message - TestExecuteSync (2): success/failure delegation - TestExecuteAudit (5): text/JSON output, locations, inconsistencies, missing - TestExecuteGetToken (4): no config, hash, raw, empty token - TestExecuteReconstructEnv (2): success/failure - TestExecuteUnknown (1): unknown action returns 1 All mocked via patch.object(GenAIAuthManager), no real credentials touched. genai-stack commands coverage: 10/10 modules (382 tests total). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
clusterManager-Myia
approved these changes
Jun 1, 2026
Collaborator
clusterManager-Myia
left a comment
There was a problem hiding this comment.
[Hermes] — APPROVED
Tests bien structures, couverture complete des 5 actions auth (init, sync, audit, get-token, reconstruct-env). Bonne isolation via mocks. Note mineure : la manipulation sys.modules au niveau module est un pattern fragile en environnement parallele, mais acceptable ici pour l'isolation des tests. Aucun secret reel (tokens sont des mocks).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Complete test coverage for
commands/auth.py, the last untested module inscripts/genai-stack/commands/. This closes the genai-stack testing backlog at 10/10 modules, 382 tests.Test classes (24 tests)
genai-stack commands test coverage (COMPLETE)
Validation
pytest test_genai_auth.py -v→ 24 passed in 0.11spytest scripts/notebook_tools/tests/ --ignore=test_genai_validate.py→ 931 passed (validate fix pending in fix(tests): sys.modules pollution in genai test collection #2046)patch.object(GenAIAuthManager), no real credentials touchedPre-machage
Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com