Fix acceptance test setup script for puppet 4

Map the modules to the correct path depending on whether this is running
under puppet 4. Currently, acceptance tests for puppet 4 will always
explicitly set PUPPET_VERSION.

Also clean up an unused variable to avoid confusion.

Change-Id: I9bd36a277411c72ef77ce157f8364845acc2e923
This commit is contained in:
Colleen Murphy 2018-06-15 11:09:43 +02:00
parent fbcbac7f8a
commit 6168de161f

View File

@ -27,7 +27,6 @@
# in a zuul environment or not.
ROOT=$(readlink -fn $(dirname $0)/..)
MODULE_PATH="${ROOT}/modules:/etc/puppet/modules"
# These arrays are initialized here and populated in modules.env
@ -47,12 +46,19 @@ install_external() {
}
install_openstack() {
local modulepath
if [ "$PUPPET_VERSION" == "3" ] ; then
modulepath='/etc/puppet/modules'
else
modulepath='/etc/puppetlabs/code/modules'
fi
cat > clonemap.yaml <<EOF
clonemap:
- name: openstack-infra/project-config
dest: /etc/project-config
- name: '(.*?)/puppet-(.*)'
dest: '/etc/puppet/modules/\2'
dest: '$modulepath/\2'
EOF
project_names=""