fix: preserve http_auth in _safe_deepcopy_config for OpenSearch (#3580) (#4418)

Co-authored-by: utkarsh240799 <utkarsh240799@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Utkarsh
2026-03-19 16:37:56 +05:30
committed by GitHub
co-authored by utkarsh240799 Claude Opus 4.6
parent a029cc9d43
commit 46b4b2e9c8
3 changed files with 444 additions and 14 deletions
+6 -4
View File
@@ -299,11 +299,13 @@ def test_safe_deepcopy_config_handles_opensearch_auth(mock_sqlite, mock_llm_fact
config_with_auth = MockOpenSearchConfig(collection_name="opensearch_test", include_auth=True)
safe_config = _safe_deepcopy_config(config_with_auth)
assert safe_config.http_auth is None
assert safe_config.auth is None
# Runtime auth objects must be preserved (Issue #3580)
assert safe_config.http_auth is not None
assert safe_config.auth is not None
assert safe_config.connection_class is not None
# Credentials dict is a sensitive secret and should be redacted
assert safe_config.credentials is None
assert safe_config.connection_class is None
assert safe_config.collection_name == "opensearch_test"
assert safe_config.host == "localhost"