From 6024f7c628a0d1aa8c240a43cc9a8e92590a0f6f Mon Sep 17 00:00:00 2001 From: Jusong Yu Date: Sat, 4 Nov 2023 13:20:27 +0100 Subject: [PATCH] Docker: Pass environment variable to aiida-prepare script --- .docker/aiida-core-base/s6-assets/s6-rc.d/aiida-prepare/up | 2 ++ .docker/tests/test_aiida.py | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/.docker/aiida-core-base/s6-assets/s6-rc.d/aiida-prepare/up b/.docker/aiida-core-base/s6-assets/s6-rc.d/aiida-prepare/up index 60e82d7e43..b1045997fd 100644 --- a/.docker/aiida-core-base/s6-assets/s6-rc.d/aiida-prepare/up +++ b/.docker/aiida-core-base/s6-assets/s6-rc.d/aiida-prepare/up @@ -1,4 +1,6 @@ #!/command/execlineb -S0 +with-contenv + foreground { s6-echo "Calling /etc/init/aiida-prepare" } /etc/init/aiida-prepare.sh diff --git a/.docker/tests/test_aiida.py b/.docker/tests/test_aiida.py index 803bc855d7..caaaecad68 100644 --- a/.docker/tests/test_aiida.py +++ b/.docker/tests/test_aiida.py @@ -30,3 +30,8 @@ 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 show localhost', user=container_user).decode().strip() + assert f'/home/{container_user}/aiida_run' in output