From 21857e86184f8a8eee0cdad0a1e5688f9f08c53b Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Fri, 30 Sep 2016 22:06:28 -0700 Subject: [PATCH] Disable privileged mode on Shippable. (#17844) --- test/integration/destructive.yml | 4 ++-- test/utils/shippable/integration.sh | 12 +++++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/test/integration/destructive.yml b/test/integration/destructive.yml index e49cde6650..5dbdc649bd 100644 --- a/test/integration/destructive.yml +++ b/test/integration/destructive.yml @@ -3,7 +3,7 @@ roles: # In destructive because it creates and removes a user - { role: test_become, tags: test_become} - - { role: test_service, tags: test_service } + - { role: test_service, tags: [test_service, needs_privileged] } # Current pip unconditionally uses md5. We can re-enable if pip switches # to a different hash or allows us to not check md5 - { role: test_pip, tags: test_pip, when: ansible_fips != True } @@ -11,7 +11,7 @@ - { role: test_yum, tags: test_yum, when: ansible_python.version.major == '2' } - { role: test_apt, tags: test_apt } - { role: test_apt_repository, tags: [test_apt_repository, test_apt_key] } - - { role: test_postgresql, tags: [test_postgresql, test_postgresql_db, test_postgresql_privs, test_postgresql_user] } + - { role: test_postgresql, tags: [test_postgresql, test_postgresql_db, test_postgresql_privs, test_postgresql_user, needs_privileged] } - { role: test_mysql_db, tags: test_mysql_db} - { role: test_mysql_user, tags: test_mysql_user} - { role: test_mysql_variables, tags: test_mysql_variables} diff --git a/test/utils/shippable/integration.sh b/test/utils/shippable/integration.sh index 35891b02f4..4f4985c094 100755 --- a/test/utils/shippable/integration.sh +++ b/test/utils/shippable/integration.sh @@ -31,6 +31,7 @@ if [ "${SHIPPABLE_BUILD_DIR:-}" ]; then host_shared_dir="/home/shippable/cache/build-${BUILD_NUMBER}" controller_shared_dir="/home/shippable/cache/build-${BUILD_NUMBER}" share_source=1 + test_privileged=false # temporarily disabled to troubleshoot performance issues else host_shared_dir="${source_root}" controller_shared_dir="" @@ -101,16 +102,21 @@ container_id=$(docker run -d \ show_environment +skip= + if [ "${test_python3}" ]; then docker exec "${container_id}" ln -s /usr/bin/python3 /usr/bin/python docker exec "${container_id}" ln -s /usr/bin/pip3 /usr/bin/pip - skip_tags=$(tr '\n' ',' < "${source_root}/test/utils/shippable/python3-test-tag-blacklist.txt") - test_flags="--skip-tags ${skip_tags} ${test_flags}" + skip+=",$(tr '\n' ',' < "${source_root}/test/utils/shippable/python3-test-tag-blacklist.txt")" fi if [ "${test_privileged}" = 'false' ]; then - test_flags="--skip-tags needs_privileged ${test_flags}" + skip+=",needs_privileged" +fi + +if [ "${skip}" ]; then + test_flags="--skip-tags ${skip} ${test_flags}" fi if [ -z "${share_source}" ]; then