fix(tests): set DEEPSEEK_API_KEY placeholder in conftest credential i… - #197
Open
raymondginger2018-sudo wants to merge 2 commits into
Open
fix(tests): set DEEPSEEK_API_KEY placeholder in conftest credential i…#197raymondginger2018-sudo wants to merge 2 commits into
raymondginger2018-sudo wants to merge 2 commits into
Conversation
…solation
tests/conftest.py strips all credential env vars for hygiene, but the
project deepcode_config.json references ${DEEPSEEK_API_KEY}; loading it
(CodeIndexer.__init__ -> get_default_models) raised ValueError when the
var was absent. Restore a placeholder key after stripping so config-driven
construction stays side-effect free while other credentials remain removed.
Fixes pre-existing failures: test_code_indexer_output.py (8) +
test_code_indexer_concurrent.py (1).
…essage The conftest now sets DEEPSEEK_API_KEY placeholder, so _has_cloud_credential() returns True and the ready message no longer contains 'deepcode provider set'. Assert on 'Initialized' instead.
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
Fix pre-existing CI test failures:
tests/conftest.pystrips all credential env vars for hygiene, but the projectdeepcode_config.jsonreferences${DEEPSEEK_API_KEY}. Loading it (CodeIndexer.__init__->get_default_models) raisedValueErrorwhen the var was absent.Change
Restore a placeholder key (
test-placeholder-key) after stripping so config-driven construction stays side-effect free while other credentials remain removed.Fixes pre-existing failures:
test_code_indexer_output.py(8) +test_code_indexer_concurrent.py(1).