tests fail on alpine linux
a16bitsysop opened this issue · 4 comments
I am trying to write an APKBUILD file for nodeenv but the tests fail on all architectures apart from aarch64:
https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/11255
The error for x86_64 is about a url being wrong:
E AssertionError: expected call not found.
E Expected: urlopen('https://nodejs.org/download/release/index.json')
E Actual: urlopen('https://unofficial-builds.nodejs.org/download/release/index.json')
/usr/lib/python3.8/site-packages/mock/mock.py:913: AssertionError
The other plattforms have a key_error eg:
KeyError: 'armv8l'
Apart from x86 which is:
urllib.error.HTTPError: HTTP Error 404: Not Found
If I swap the nodejs.org for the mirror returned in the test like this:
@@ -87,8 +87,8 @@
'https://npm.taobao.org/mirrors/node/index.json'),
('npm.some-mirror.com',
'https://npm.some-mirror.com/download/release/index.json'),
- ('',
- 'https://nodejs.org/download/release/index.json')]
+ ('https://unofficial-builds.nodejs.org/download/release',
+ 'https://unofficial-builds.nodejs.org/download/release/index.json')]
with open(os.path.join(HERE, 'nodejs_index.json'), 'rb') as f:
def rewind(_):
f.seek(0)
The x86_64 passes on alpine linux ci tests as well, the x86 error is now a "404 not found" error doing
* Install prebuilt node (14.8.0) .
Which looks like node is not available pre built for x86?
unofficial-builds.nodejs.org
is used for musl libc. For x86_64
should be nodejs.org
.
All details are here: #247
It redirects to unofficial-builds for x86_64 which causes the test error. Passes for all other arch’s without patch changing nodejs.org to unofficial-builds (except x86 which always gives file not found)
On Alpine x86_64 is musl as well