Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please make all tests work offline or make it easy to skip tests requiring Internet #2880

Closed
mgorny opened this issue Jan 11, 2025 · 1 comment · Fixed by #2881
Closed

Please make all tests work offline or make it easy to skip tests requiring Internet #2880

mgorny opened this issue Jan 11, 2025 · 1 comment · Fixed by #2881

Comments

@mgorny
Copy link
Contributor

mgorny commented Jan 11, 2025

Problem description

FWICS, pixi's test suite mostly works offline, except for 4 tests:

failures:

---- solve_group_tests::test_dont_record_not_present_package_as_purl stdout ----
Created /var/tmp/portage/dev-util/pixi-0.39.5/temp/.tmpEejz2Y/pixi.toml
thread 'solve_group_tests::test_dont_record_not_present_package_as_purl' panicked at tests/integration_rust/solve_group_tests.rs:329:14
:
called `Result::unwrap()` on an `Err` value: 
  × failed to download pypi name mapping
  ├─▶ Request failed after 3 retries
  ├─▶ error sending request for url (https://conda-mapping.prefix.dev/hash-
  │   v0/7f19352d978e7a7181eb8abe398cd35397e5be4d3851680ca5f334f2515fa628)
  ├─▶ client error (Connect)
  ├─▶ dns error: failed to lookup address information: Temporary failure in
  │   name resolution
  ╰─▶ failed to lookup address information: Temporary failure in name
      resolution

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- solve_group_tests::test_compressed_mapping_catch_not_pandoc_not_a_python_package stdout ----
Created /var/tmp/portage/dev-util/pixi-0.39.5/temp/.tmpmUTiPC/pixi.toml
thread 'solve_group_tests::test_compressed_mapping_catch_not_pandoc_not_a_python_package' panicked at tests/integration_rust/solve_grou
p_tests.rs:273:14:
called `Result::unwrap()` on an `Err` value: 
  × failed to download pypi name mapping
  ├─▶ Request failed after 3 retries
  ├─▶ error sending request for url (https://conda-mapping.prefix.dev/hash-
  │   v0/79f820488b35eac730c2358c9f90b094fbc29dbb02d4429e43b60e331445fbf0)
  ├─▶ client error (Connect)
  ├─▶ dns error: failed to lookup address information: Temporary failure in
  │   name resolution
  ╰─▶ failed to lookup address information: Temporary failure in name
      resolution


---- solve_group_tests::test_purl_are_missing_for_non_conda_forge stdout ----
Created /var/tmp/portage/dev-util/pixi-0.39.5/temp/.tmpTP4Hsw/pixi.toml
thread 'solve_group_tests::test_purl_are_missing_for_non_conda_forge' panicked at tests/integration_rust/solve_group_tests.rs:186:14:
called `Result::unwrap()` on an `Err` value: 
  × failed to download pypi name mapping
  ├─▶ Request failed after 3 retries
  ├─▶ error sending request for url (https://conda-mapping.prefix.dev/hash-
  │   v0/06e350efc8be524f03e3dc320d35dde0b224c47d69020936f59b79b32fb75b81)
  ├─▶ client error (Connect)
  ├─▶ dns error: failed to lookup address information: Temporary failure in
  │   name resolution
  ╰─▶ failed to lookup address information: Temporary failure in name
      resolution


---- solve_group_tests::test_purl_are_generated_using_custom_mapping stdout ----
Created /var/tmp/portage/dev-util/pixi-0.39.5/temp/.tmpIwgfRA/pixi.toml
thread 'solve_group_tests::test_purl_are_generated_using_custom_mapping' panicked at tests/integration_rust/solve_group_tests.rs:229:14
:
called `Result::unwrap()` on an `Err` value: 
  × failed to download pypi name mapping
  ├─▶ Request failed after 3 retries
  ├─▶ error sending request for url (https://conda-mapping.prefix.dev/hash-
  │   v0/06e350efc8be524f03e3dc320d35dde0b224c47d69020936f59b79b32fb75b81)
  ├─▶ client error (Connect)
  ├─▶ dns error: failed to lookup address information: Temporary failure in
  │   name resolution
  ╰─▶ failed to lookup address information: Temporary failure in name
      resolution


failures:
    solve_group_tests::test_compressed_mapping_catch_not_pandoc_not_a_python_package
    solve_group_tests::test_dont_record_not_present_package_as_purl
    solve_group_tests::test_purl_are_generated_using_custom_mapping
    solve_group_tests::test_purl_are_missing_for_non_conda_forge

Is there any chance you'd either manage to make these tests work offline as well, or alternatively add an easy way to skip them? For example, uv uses features to control tests requiring additional resources — if that's okay with you, I can make a pull request adding online-tests or something like that (enabled by default).

@baszalmstra
Copy link
Contributor

Sounds great!

mgorny added a commit to mgorny/pixi that referenced this issue Jan 11, 2025
Add an `online_tests` feature that specifically covers tests accessing
the Internet.  It is enabled by default to preserve the existing
behavior, but can be explicitly disabled when running the test suite
entirely offline.

I have not added the respective feature checks to
`slow_integration_tests`, as they all seem to require Internet, so that
seems redundant.

Fixes prefix-dev#2880
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants