diff options
| author | Jenkins <jenkins@review.openstack.org> | 2015-05-13 21:54:51 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2015-05-13 21:54:51 +0000 |
| commit | b7d5053978e032498df0c2abc4be6ac56f0bdf7b (patch) | |
| tree | 612216da32d1f2c26bf51c9f1b9232110a1a12cc /tests/setup_docker.sh | |
| parent | a19f8fd990c86ff859eb8bf1a582af5a464b41c2 (diff) | |
| parent | 21cd478cbd0bf14f9522e088c99399886a8fcf28 (diff) | |
| download | kolla-b7d5053978e032498df0c2abc4be6ac56f0bdf7b.tar.gz kolla-b7d5053978e032498df0c2abc4be6ac56f0bdf7b.zip | |
Merge "Add functional tests to tox"
Diffstat (limited to 'tests/setup_docker.sh')
| -rwxr-xr-x | tests/setup_docker.sh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/setup_docker.sh b/tests/setup_docker.sh index d5878c681..6be1ebeec 100755 --- a/tests/setup_docker.sh +++ b/tests/setup_docker.sh @@ -50,12 +50,15 @@ function start_docker() { function create_group() { getent group docker - if [ $? -eq 2 ]; then # 2: key could not be found in database + result=$? + if [ $result -eq 0 ]; then # 0: key already exists, nothing to do + return + elif [ $result -eq 2 ]; then # 2: key could not be found in database groupadd docker chown root:docker /var/run/docker.sock usermod -a -G docker ${SUDO_USER:-$USER} else - echo Unexpected failure: $? + echo Unexpected failure: $result exit fi } |
