-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathtest_meltdown_fact.sh
More file actions
executable file
·25 lines (25 loc) · 981 Bytes
/
test_meltdown_fact.sh
File metadata and controls
executable file
·25 lines (25 loc) · 981 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
# usage: test_meltdown_fact [test|acceptance|travis]
# without arguments, scope is "test"
scope=${1:-"test"}
# install gems
bundle install
# provision nodes for testing scope
echo "Provisioning scope ${scope}..."
bundle exec rake "litmus:provision_list[${scope}]"
[ $scope == "travis" ] && bundle exec bolt task run package name=curl action=install --nodes all --modulepath=spec/fixtures/modules --inventory=./inventory.yaml
# install puppet agent on the nodes
echo "Installing agent..."
bundle exec rake litmus:install_agent
# install the meltdown module on the nodes
echo "Installing meltdown module..."
bundle exec rake litmus:install_module
# run the acceptance tests in parallel
echo "Running acceptance tests..."
bundle exec rake litmus:acceptance:parallel
if [ $? == 0 ]; then
# tear down the nodes. Note: if the testing failed,
# tear down is not done and needs to be done manually
echo "Tearing down test hosts..."
bundle exec rake litmus:tear_down
fi