Skip to content

Commit 5896837

Browse files
committed
uppercase BOX variable.
uncomment INVENTORY variable. comment puts statements in Vagrantfile.
1 parent d8bfb40 commit 5896837

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

tests/Vagrantfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,32 @@ CONFIGURATION_FILE = 'group_vars/all.yml'
77

88
Vagrant.configure('2') do |config|
99

10-
puts "[INFO] loading box settings from #{CONFIGURATION_FILE}..."
10+
# puts "[DEBUG] loading box settings from #{CONFIGURATION_FILE}..."
1111
vagrant_environment = YAML.load_file(File.expand_path(CONFIGURATION_FILE, File.dirname(__FILE__)))
1212

1313
vagrant_environment['vagrant'].each do |box_name, box_settings|
1414
if not box_settings['enabled']
15-
puts "[INFO] #{box_name} is not enabled. skipping..."
15+
# puts "[DEBUG] #{box_name} is not enabled. skipping..."
1616
next
1717
end
1818

19-
puts "[INFO] applying #{box_name} settings..."
19+
# puts "[DEBUG] applying #{box_name} settings..."
2020
config.vm.define "#{box_name}" do |host|
2121

2222
host.vm.box = box_settings['box'] unless not box_settings.key? 'box'
2323
host.vm.hostname = box_name
2424

2525
host.vm.network box_settings['network']['name'], ip: box_settings['network']['ip'] unless box_settings.key? 'network'
2626

27-
puts "[INFO] applying virtualbox provider settings for #{box_name} box..."
27+
# puts "[DEBUG] applying virtualbox provider settings for #{box_name} box..."
2828
config.vm.provider "#{box_settings['provider']}" do | provider |
2929
box_settings['provider'].each do |key, value|
3030
next if key == 'name'
3131
provider.send("#{key}=", value)
3232
end
3333
end
3434

35-
puts "[INFO] provisioning #{box_name} using ansible vagrant playbook..."
35+
# puts "[DEBUG] provisioning #{box_name} using ansible vagrant playbook..."
3636
config.vm.provision 'ansible' do |ansible|
3737
ansible.playbook = PLAYBOOK
3838
ansible.verbose = 'v'

tests/test_idempotence.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ NC='\033[0m'
3333
# the logfile to hold the output of the playbook run
3434
LOGFILE="log/${BOX}_${VIRTUALENV_NAME}.log"
3535

36-
echo "[INFO] #{BOX} ${VIRTUALENV_NAME} running idempotence test..."
36+
echo "[INFO] ${BOX} ${VIRTUALENV_NAME} running idempotence test..."
3737
ansible-playbook -i ${INVENTORY} --limit ${BOX} ${PLAYBOOK} 2>&1 | tee ${LOGFILE} | \
3838
grep "${BOX}" | grep -q "${PASS_CRITERIA}" && \
3939
echo -ne "[TEST] ${BOX} ${VIRTUALENV_NAME} idempotence : ${GREEN}PASS${NC}\n" || \

tests/vagrant.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ source environment.sh
2626
# NOTE: PLAYBOOK must be the same value as defined in the Vagrantfile.
2727
PLAYBOOK="vagrant.yml"
2828

29-
# A default inventory file is automatically generated by Vagrant @
30-
# INVENTORY=${DIR}/.vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory
29+
# Inventory file to run tests againt (points to Vagrant generated inventory)
30+
INVENTORY=${DIR}/.vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory
3131

3232

3333
while [[ $# > 1 ]]
@@ -83,7 +83,7 @@ export ANSIBLE_ASK_SUDO_PASS=True
8383
for BOX in `grep vagrant.dev group_vars/all.yml | sed 's/://g'`
8484
do
8585

86-
echo "[INFO] preparing ${box}..."
86+
echo "[INFO] preparing ${BOX}..."
8787
vagrant up ${BOX} 2> /dev/null
8888
if [ $? -ne 0 ]; then
8989
# box not enabled
@@ -92,6 +92,6 @@ do
9292

9393
. test_idempotence.sh
9494

95-
echo "[INFO] destroying ${BOX}..."
95+
echo "[INFO] destroy ${BOX}..."
9696
vagrant destroy -f ${BOX}
9797
done

0 commit comments

Comments
 (0)