Skip to content

Commit

Permalink
Use testpypi for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
konstin committed Sep 24, 2024
1 parent 74d4794 commit 09cd4f0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions crates/uv/tests/publish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
"###
);
Expand All @@ -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
Expand All @@ -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.
"###
);
Expand Down

0 comments on commit 09cd4f0

Please sign in to comment.