Skip to content

Commit

Permalink
Docker: Pass environment variable to aiida-prepare script (#6169)
Browse files Browse the repository at this point in the history
Set `with-contenv` such that environment variables are forwarded. Without
this, settings like the work dir of `localhost` will be set incorrectly and will cause
calculations to fail.

Cherry-pick: 6123f52
  • Loading branch information
unkcpz authored and sphuber committed Nov 15, 2023
1 parent 17507b4 commit ea47668
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .docker/aiida-core-base/s6-assets/s6-rc.d/aiida-prepare/up
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/command/execlineb -S0

with-contenv

foreground { s6-echo "Calling /etc/init/aiida-prepare" }
/etc/init/aiida-prepare.sh
8 changes: 8 additions & 0 deletions .docker/tests/test_aiida.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,11 @@ def test_verdi_status(aiida_exec, container_user, timeout):

# check that we have suppressed the warnings
assert 'Warning' not in output


def test_computer_setup_success(aiida_exec, container_user, timeout):
time.sleep(timeout)
output = aiida_exec('verdi computer test localhost', user=container_user).decode().strip()

assert 'Success' in output
assert 'Failed' not in output

0 comments on commit ea47668

Please sign in to comment.