Handle the postgresql md5password in specs

Current password in spec/classes/X_db_postgresql_spec.rb isn't generic,
and will cause spec to fails.
This patch aims to generate this value on the fly for the to be created
project.

Change-Id: I113e6143f4a714e079e79749b4034880e3bd1440
This commit is contained in:
Yanis Guenane 2015-07-10 17:24:54 +02:00
parent 216db46b34
commit 60c3a3478a

View File

@ -26,6 +26,7 @@
# * git-review (package or pip)
# * cookiecutter (package or pip)
# * modulesync (gem)
# * digest (gem)
proj=$1
user=$2
@ -84,8 +85,10 @@ EOF
#
msync update --noop
pushd modules/puppet-$proj
md5password=`ruby -e "require 'digest/md5'; puts 'md5' + Digest::MD5.hexdigest('pw${proj}')"`
sed -i "s|md5c530c33636c58ae83ca933f39319273e|${md5password}|g" spec/classes/${proj}_db_postgresql_spec.rb
git remote add gerrit ssh://$user@review.openstack.org:29418/openstack/puppet-$proj.git
git commit --amend -am "puppet-${proj}: Initial commit
git add --all && git commit --amend -am "puppet-${proj}: Initial commit
This is the initial commit for puppet-${proj}.
It has been automatically generated using cookiecutter[1] and msync[2]