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
|
||||
- name: gate-puppet-vswitch-puppet-syntax
|
||||
voting: false
|
||||
- name: gate-config-puppet-apply-centos6
|
||||
voting: false
|
||||
- name: gate-tomograph-python33
|
||||
voting: false
|
||||
- name: check-rally-dsvm-cli
|
||||
|
10
test.sh
10
test.sh
@ -3,7 +3,7 @@
|
||||
ROOT=$(readlink -fn $(dirname $0))
|
||||
MODULE_PATH="${ROOT}/modules:/etc/puppet/modules"
|
||||
|
||||
if [ ! -d applytest ] ; then
|
||||
if [[ ! -d applytest ]] ; then
|
||||
mkdir applytest
|
||||
fi
|
||||
|
||||
@ -12,11 +12,11 @@ sed -i -e 's/^[^][:space:]$]/#&/g' 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
|
||||
|
||||
if [ `lsb_release -i -s` == 'CentOS' ]; then
|
||||
if [ `lsb_release -r -s` =~ '6' ]; then
|
||||
if [[ `lsb_release -i -s` == 'CentOS' ]]; then
|
||||
if [[ `lsb_release -r -s` =~ '6' ]]; then
|
||||
CODENAME='centos6'
|
||||
fi
|
||||
elif [ `lsb_release -i -s` == 'Ubuntu' ]; then
|
||||
elif [[ `lsb_release -i -s` == 'Ubuntu' ]]; then
|
||||
CODENAME=`lsb_release -c -s`
|
||||
fi
|
||||
|
||||
@ -28,7 +28,7 @@ for f in `find applytest -name 'puppetapplytest*' -print` ; do
|
||||
fi
|
||||
done
|
||||
|
||||
if [ $FOUND == "0" ]; then
|
||||
if [[ $FOUND == "0" ]]; then
|
||||
echo "No hosts found for node type $CODENAME"
|
||||
exit 1
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user