From 09cd4f0cbccfa1187bb297072444305c7d0a3160 Mon Sep 17 00:00:00 2001 From: konstin Date: Tue, 24 Sep 2024 15:58:50 +0200 Subject: [PATCH] Use testpypi for tests --- crates/uv/tests/publish.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/crates/uv/tests/publish.rs b/crates/uv/tests/publish.rs index 966a1c437ade0..6de1a85e21299 100644 --- a/crates/uv/tests/publish.rs +++ b/crates/uv/tests/publish.rs @@ -13,6 +13,8 @@ fn username_password_no_longer_supported() { .arg("dummy") .arg("-p") .arg("dummy") + .arg("--publish-url") + .arg("https://test.pypi.org/legacy") .arg("../../scripts/links/ok-1.0.0-py3-none-any.whl"), @r###" success: false exit_code: 2 @@ -22,7 +24,7 @@ fn username_password_no_longer_supported() { warning: `uv publish` is experimental and may change without warning Publishing 1 file Uploading ok-1.0.0-py3-none-any.whl ([SIZE]) - error: Failed to publish `../../scripts/links/ok-1.0.0-py3-none-any.whl` to https://upload.pypi.org/legacy/ + error: Failed to publish `../../scripts/links/ok-1.0.0-py3-none-any.whl` to https://test.pypi.org/legacy/ Caused by: Permission denied (status code 403 Forbidden): 403 Username/Password authentication is no longer supported. Migrate to API Tokens or Trusted Publishers instead. See https://pypi.org/help/#apitoken and https://pypi.org/help/#trusted-publishers "### ); @@ -37,6 +39,8 @@ fn invalid_token() { .arg("__token__") .arg("-p") .arg("dummy") + .arg("--publish-url") + .arg("https://test.pypi.org/legacy") .arg("../../scripts/links/ok-1.0.0-py3-none-any.whl"), @r###" success: false exit_code: 2 @@ -46,7 +50,7 @@ fn invalid_token() { warning: `uv publish` is experimental and may change without warning Publishing 1 file Uploading ok-1.0.0-py3-none-any.whl ([SIZE]) - error: Failed to publish `../../scripts/links/ok-1.0.0-py3-none-any.whl` to https://upload.pypi.org/legacy/ + error: Failed to publish `../../scripts/links/ok-1.0.0-py3-none-any.whl` to https://test.pypi.org/legacy/ Caused by: Permission denied (status code 403 Forbidden): 403 Invalid or non-existent authentication information. See https://pypi.org/help/#invalid-auth for more information. "### );