Skip to content

Commit

Permalink
fix(test_npm_plugin.py): fix test expectations after the hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
liushuyu committed Sep 12, 2024
1 parent eb7544f commit eb09328
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tests/unit/plugins/test_npm_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,17 +290,16 @@ def test_get_build_commands_include_node_true(
]
plugin = NpmPlugin(properties=properties, part_info=part_info)

assert plugin.get_pull_commands() == [
assert plugin.get_pull_commands() == []

assert plugin.get_build_commands() == [
f'if [ ! -f "{part_info.part_cache_dir}/node-v20.13.1-linux-x64.tar.gz" ]; then\n'
f' mkdir -p "{part_info.part_cache_dir}"\n'
f' curl --retry 5 -s "https://nodejs.org/dist/v20.13.1/SHASUMS256.txt" -o "{part_info.part_cache_dir}"/SHASUMS256.txt\n'
f' curl --retry 5 -s "https://nodejs.org/dist/v20.13.1/node-v20.13.1-linux-x64.tar.gz" -o "{part_info.part_cache_dir}/node-v20.13.1-linux-x64.tar.gz"\n'
"fi\n"
f'cd "{part_info.part_cache_dir}"\n'
"sha256sum --ignore-missing --strict -c SHASUMS256.txt\n"
]

assert plugin.get_build_commands() == [
"sha256sum --ignore-missing --strict -c SHASUMS256.txt\n",
f'tar -xzf "{part_info.part_cache_dir}/node-v20.13.1-linux-x64.tar.gz"'
' -C "${CRAFT_PART_INSTALL}/" --no-same-owner '
"--strip-components=1\n",
Expand Down

0 comments on commit eb09328

Please sign in to comment.