refactor(config): unify secrets in ~/.mytoolkit/config.json and migrate skill wrappers
This commit is contained in:
@@ -9,3 +9,4 @@ import os
|
||||
import tempfile
|
||||
|
||||
os.environ["MYTOOLKIT_HOME"] = tempfile.mkdtemp(prefix="mytoolkit-test-home-")
|
||||
os.environ["MYTOOLKIT_NO_EXTERNAL_MIGRATION"] = "1"
|
||||
|
||||
@@ -77,6 +77,6 @@ def test_legacy_env_merges_without_clobbering_existing_keys(fresh_home):
|
||||
json.dumps({"vars": {"apikey_ark": "sk-old", "extra": "e"}})
|
||||
)
|
||||
c = Config()
|
||||
# Legacy vars are merged in (documented behaviour: legacy wins on conflict).
|
||||
# Unknown legacy vars are merged in; known keys keep the existing mytoolkit value.
|
||||
assert c.get("extra") == "e"
|
||||
assert c.get("apikey_ark") == "sk-old"
|
||||
assert c.get("apikey_ark") == "sk-new"
|
||||
|
||||
Reference in New Issue
Block a user