Fix another state bug in the uv auth tests (#17435)

This test was also order dependent; see also #17424

---------

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Zanie Blue
2026-01-12 19:35:31 -06:00
committed by GitHub
parent 69333ead26
commit 98d17fc4d2

View File

@@ -706,6 +706,11 @@ fn logout_native_auth() -> Result<()> {
.arg("public")
.env(EnvVars::UV_PREVIEW_FEATURES, "native-auth")
.status()?;
context
.auth_logout()
.arg("https://pypi-proxy.fly.dev/basic-auth/simple")
.env(EnvVars::UV_PREVIEW_FEATURES, "native-auth")
.status()?;
// Without a service name
uv_snapshot!(context.auth_logout(), @r"
@@ -726,12 +731,13 @@ fn logout_native_auth() -> Result<()> {
uv_snapshot!(context.auth_logout()
.arg("https://pypi-proxy.fly.dev/basic-auth/simple")
.env(EnvVars::UV_PREVIEW_FEATURES, "native-auth"), @r"
success: true
exit_code: 0
success: false
exit_code: 2
----- stdout -----
----- stderr -----
Removed credentials for https://pypi-proxy.fly.dev/basic-auth
error: Unable to remove credentials for https://pypi-proxy.fly.dev/basic-auth
Caused by: No matching entry found in secure storage
");
// Logout before logging in (with a username)