mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-07-25 12:01:04 +02:00
Fix short masked key preservation
This commit is contained in:
parent
01d4d07638
commit
6a6d1d7755
6 changed files with 257 additions and 10 deletions
|
|
@ -563,6 +563,24 @@ class TestWorkflowConfigurationSecrets:
|
|||
assert merged["model_overrides"]["tts"]["voice"] == "Bella"
|
||||
assert incoming["model_overrides"]["tts"]["api_key"] != "el-real-tts-key"
|
||||
|
||||
def test_restores_short_masked_model_override_secret_from_existing_config(self):
|
||||
existing = {
|
||||
"model_overrides": {
|
||||
"llm": {
|
||||
"provider": "openai",
|
||||
"api_key": "SECRET",
|
||||
"model": "gpt-4.1-mini",
|
||||
}
|
||||
}
|
||||
}
|
||||
incoming = mask_workflow_configurations(existing)
|
||||
|
||||
assert incoming["model_overrides"]["llm"]["api_key"] == "**CRET"
|
||||
|
||||
merged = merge_workflow_configuration_secrets(incoming, existing)
|
||||
|
||||
assert merged["model_overrides"]["llm"]["api_key"] == "SECRET"
|
||||
|
||||
def test_single_masked_key_preserves_existing_multi_key_override(self):
|
||||
existing = {
|
||||
"model_overrides": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue