#!/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"