allow NODE_ARGS input when using a Docker image for testing (#378)

This commit is contained in:
Miraculous Owonubi 2022-10-25 11:01:47 +04:00 committed by GitHub
parent e9a8e265b6
commit 8219854337
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -20,4 +20,4 @@ if [ "$DOCKER_DESKTOP" = "true" ]; then
tail -f /dev/null
fi
node "$(dirname "$0")"/cli.js "$@"
node "${FREYR_NODE_ARGS[@]}" -- "$(dirname "$0")"/cli.js "$@"

View File

@ -145,8 +145,8 @@ async function run_tests(suite, args, i) {
let child,
handler = () => {};
let extra_node_args = process.env['NODE_ARGS'] ? process.env['NODE_ARGS'].split(' ') : [];
if (!docker_image) {
let extra_node_args = process.env['NODE_ARGS'] ? process.env['NODE_ARGS'].split(' ') : [];
child = spawn(
'node',
[
@ -177,6 +177,7 @@ async function run_tests(suite, args, i) {
`${test_stage_path}:/data`,
'--env',
'SHOW_DEBUG_STACK=1',
...(extra_node_args.length ? ['--env', `FREYR_NODE_ARGS=${extra_node_args.join(' ')}`] : []),
'--',
docker_image,
...child_args,