From 60c3a3478a59f0408c73fab0c0f729ff6f52149b Mon Sep 17 00:00:00 2001 From: Yanis Guenane Date: Fri, 10 Jul 2015 17:24:54 +0200 Subject: [PATCH] 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 --- contrib/bootstrap.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/contrib/bootstrap.sh b/contrib/bootstrap.sh index 540786f..2a02b75 100755 --- a/contrib/bootstrap.sh +++ b/contrib/bootstrap.sh @@ -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]