Commit 586b35f3 authored by Flavio TARSETTI's avatar Flavio TARSETTI

Merge branch '94_improve_execution_hanlding' into 'master'

Improve execution handling

See merge request !114
parents dc387a4b 050b1e39
Pipeline #37849 passed with stages
in 18 minutes and 50 seconds
......@@ -479,7 +479,7 @@ class Host(object):
limitation is not put in place.
"""
cmd = ["docker", "run", "-tid"]
cmd = ["docker", "run", "--tty", "--interactive", "--detach", "--read-only"]
network = container.network
if network:
......
......@@ -423,7 +423,7 @@ class DockerExecutor(RemoteExecutor):
# ----- (If necessary) Instantiate the docker container that provide the databases
datasets_uid = self.data.pop("datasets_uid", None)
datasets_uid = self.data.pop("datasets_uid", os.geteuid())
network_name = self.data.pop("network_name", "bridge")
databases_infos = {}
......
......@@ -239,4 +239,13 @@ class TestDockerExecution(BaseExecutionMixIn):
result = self.execute("errors/user/single/1/write_error", [{"out_data": 42}])
nose.tools.eq_(result["status"], 1)
nose.tools.assert_true("Permission denied" in result["user_error"])
nose.tools.assert_true("Read-only" in result["user_error"])
@slow
def test_user_mismatch_error(self):
result = self.execute(
"errors/user/single/1/write_error", [{"out_data": 42}], datasets_uid=0
)
nose.tools.eq_(result["status"], 1)
nose.tools.assert_true("Failed to create an user" in result["stderr"])
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment