Skip to content
New issue

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

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

Already on GitHub? # to your account

remove main node.js mirror in tests if musl #271

Merged
merged 1 commit into from
Aug 29, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions tests/nodeenv_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import pipes
import subprocess
import sys
import sysconfig

import mock
import pytest
Expand Down Expand Up @@ -117,6 +118,11 @@ def test_mirror_option():
'https://npm.some-mirror.com/download/release/index.json'),
('',
'https://nodejs.org/download/release/index.json')]
sys_type = sysconfig.get_config_var('HOST_GNU_TYPE')
musl_type = ['x86_64-pc-linux-musl', 'x86_64-unknown-linux-musl']
# Check if running on musl system and delete last mirror if it is
if sys_type in musl_type:
urls.pop()
with open(os.path.join(HERE, 'nodejs_index.json'), 'rb') as f:
def rewind(_):
f.seek(0)
Expand Down