litellm/tests/test_litellm/proxy/client
mateo-berri 3c73a39877 fix(cli): verify every credential store transition before reporting it done
A keyring backend can accept a write and keep nothing. That is exactly what
`keyring --disable` and PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
select, and it raises nothing to distinguish itself, so `lite login` was
handing the credential to a black hole, scrubbing its own copy from
token.json, and printing a success message over a login that no longer
worked. Reading the value back is the only way to tell that backend apart
from a keychain that really stored the secret.

The same rule closes the rest of the gaps. A credential the token file will
not record is taken back out of the keychain instead of being left live on a
machine with no record of it, and is reported rather than raised. The
migration stages its scrubbed file before the keychain is handed anything,
so a directory that will not accept the rewrite stops the move rather than
leaving the secret in two places. Logout no longer reads a key in the file
as proof that the keychain is clear, which was never sound across two
separate runs, and only draws that conclusion when the `keyring` package is
missing outright, where nothing could have reached a keychain at all.
2026-08-19 21:10:59 -07:00
..
cli fix(cli): verify every credential store transition before reporting it done 2026-08-19 21:10:59 -07:00
test_chat.py build: migrate packaging, CI, and Docker from Poetry to uv (#25007) 2026-04-09 11:46:23 -07:00
test_client.py test: rename tests that a later definition shadowed 2026-08-12 11:15:54 -07:00
test_credentials.py Change credential encryption to only affect db credentials 2025-12-09 13:36:40 -08:00
test_http_client.py fix delete callbacks 2025-11-06 17:06:34 -08:00
test_http_commands.py fix delete callbacks 2025-11-06 17:06:34 -08:00
test_keys.py fix(proxy/client): redact api key from key/info client error messages (#31342) 2026-06-25 17:35:15 -07:00
test_model_groups.py fix delete callbacks 2025-11-06 17:06:34 -08:00
test_models.py test: rename tests that a later definition shadowed 2026-08-12 11:15:54 -07:00
test_users.py sys.path.insert for cli tests 2025-07-03 15:58:49 -07:00