]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-docker-nightly: use sg to execture pytest as part of the docker group
authorAlfredo Deza <adeza@redhat.com>
Mon, 12 Dec 2016 15:14:13 +0000 (10:14 -0500)
committerAlfredo Deza <adeza@redhat.com>
Tue, 13 Dec 2016 17:20:11 +0000 (12:20 -0500)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
ceph-docker-nightly/build/build

index e00014df6af4734889e16a056608da04d22dedd8..5b0f784c35b523548db39993b4821d2ca77af386 100644 (file)
@@ -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"