puppet-openstack-cookiecutter/functions
Takashi Kajinami 191b2ee267 Unpin modulesync
... to use the recent modulesync which is compatible with Ruby 3.0.

This also fixes the failing unit tests, which were broken by recent
change in puppet-postgresql.

Depends-on: https://review.opendev.org/853222
Change-Id: Idca10381dc8204e2c35491b92d0f60b3566d4375
2022-08-16 05:38:12 +00:00

23 lines
573 B
Bash

#!/bin/bash
#
# functions - puppet-openstack_spec_helper specific functions
#
prepare_environment() {
rm -rf puppet-whazz default-config.yaml
mkdir -p .bundled_gems
export GEM_HOME=`pwd`/.bundled_gems
export GEM_BIN_DIR=$GEM_HOME/bin
ruby <<EOF
cmd = 'gem install bundler --no-document --verbose --bindir=${GEM_BIN_DIR}'
cmd += ' -v 2.2.11'
system(cmd)
EOF
# Build fake module
OS_NEW_MODULE_TEST=yes bash -x ./contrib/bootstrap.sh whazz dummy
cd puppet-whazz/x/puppet-modulesync-configs/modules/cookiecutter/puppet-whazz
$GEM_HOME/bin/bundle install
}