From: Alfredo Deza Date: Mon, 12 Dec 2016 15:14:13 +0000 (-0500) Subject: ceph-docker-nightly: use sg to execture pytest as part of the docker group X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=f9cc49aec026c2ae17b1db2603d262f5cb1c8a00;p=ceph-build.git ceph-docker-nightly: use sg to execture pytest as part of the docker group Signed-off-by: Alfredo Deza --- diff --git a/ceph-docker-nightly/build/build b/ceph-docker-nightly/build/build index e00014df..5b0f784c 100644 --- a/ceph-docker-nightly/build/build +++ b/ceph-docker-nightly/build/build @@ -1,14 +1,17 @@ #!/bin/bash # the following two methods exist in scripts/build_utils.sh -pkgs=( "pytest" ) +pkgs=( "pytest" "docker-py==1.10.3" ) install_python_packages "pkgs[@]" -sudo apt-get install docker.io +sudo apt-get install -y docker.io sudo gpasswd -a ${USER} docker sudo systemctl restart docker newgrp docker cd tests -py.test -v +# adding groups on the fly doesn't guarantee their availability +# so we must use `sg` to execute the tests as part of the docker group to avoid +# 'Permission Denied` when tryin to talk over the socket +sg docker -c "$VENV/py.test -v"