Add extra [] to puppet apply test
Double [[]] are needed by bash for the regex operator. Use them universally for safety. And make gate-config-puppet-apply-centos6 voting. Change-Id: I8f245a86381d24d8938df444e0268343b46fe09f
This commit is contained in:
parent
a339be3b8c
commit
efc85a4e62
@ -656,8 +656,6 @@ jobs:
|
|||||||
voting: false
|
voting: false
|
||||||
- name: gate-puppet-vswitch-puppet-syntax
|
- name: gate-puppet-vswitch-puppet-syntax
|
||||||
voting: false
|
voting: false
|
||||||
- name: gate-config-puppet-apply-centos6
|
|
||||||
voting: false
|
|
||||||
- name: gate-tomograph-python33
|
- name: gate-tomograph-python33
|
||||||
voting: false
|
voting: false
|
||||||
- name: check-rally-dsvm-cli
|
- name: check-rally-dsvm-cli
|
||||||
|
10
test.sh
10
test.sh
@ -3,7 +3,7 @@
|
|||||||
ROOT=$(readlink -fn $(dirname $0))
|
ROOT=$(readlink -fn $(dirname $0))
|
||||||
MODULE_PATH="${ROOT}/modules:/etc/puppet/modules"
|
MODULE_PATH="${ROOT}/modules:/etc/puppet/modules"
|
||||||
|
|
||||||
if [ ! -d applytest ] ; then
|
if [[ ! -d applytest ]] ; then
|
||||||
mkdir applytest
|
mkdir applytest
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -12,11 +12,11 @@ sed -i -e 's/^[^][:space:]$]/#&/g' applytest/puppetapplytest*
|
|||||||
sed -i -e 's@hiera(.\([^.]*\).,\([^)]*\))@\2@' applytest/puppetapplytest*
|
sed -i -e 's@hiera(.\([^.]*\).,\([^)]*\))@\2@' applytest/puppetapplytest*
|
||||||
mv applytest/*00 applytest/head # These are the top-level variables defined in site.pp
|
mv applytest/*00 applytest/head # These are the top-level variables defined in site.pp
|
||||||
|
|
||||||
if [ `lsb_release -i -s` == 'CentOS' ]; then
|
if [[ `lsb_release -i -s` == 'CentOS' ]]; then
|
||||||
if [ `lsb_release -r -s` =~ '6' ]; then
|
if [[ `lsb_release -r -s` =~ '6' ]]; then
|
||||||
CODENAME='centos6'
|
CODENAME='centos6'
|
||||||
fi
|
fi
|
||||||
elif [ `lsb_release -i -s` == 'Ubuntu' ]; then
|
elif [[ `lsb_release -i -s` == 'Ubuntu' ]]; then
|
||||||
CODENAME=`lsb_release -c -s`
|
CODENAME=`lsb_release -c -s`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ for f in `find applytest -name 'puppetapplytest*' -print` ; do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ $FOUND == "0" ]; then
|
if [[ $FOUND == "0" ]]; then
|
||||||
echo "No hosts found for node type $CODENAME"
|
echo "No hosts found for node type $CODENAME"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user