File tree Expand file tree Collapse file tree 3 files changed +40
-3
lines changed
Expand file tree Collapse file tree 3 files changed +40
-3
lines changed Original file line number Diff line number Diff line change 11# -*- mode: ruby -*-
22# vi: set ft=ruby :
33
4- load '../common/timestamp-appender.rb'
5-
64Vagrant . configure ( "2" ) do |config |
75 config . vm . box = "ubuntu/bionic64"
86
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ checkPlaybookSyntax ()
4+ {
5+ PLAYBOOK_FILE=$1
6+ INVENTORY_FILE=$2
7+ if [ " x$INVENTORY_FILE " == " x" ]; then
8+ ansible-playbook $PLAYBOOK_FILE --syntax-check
9+ else
10+ ansible-playbook $PLAYBOOK_FILE -i $INVENTORY_FILE --syntax-check
11+ fi
12+ if [ $? -ne 0 ]; then
13+ echo " Syntax error in $PLAYBOOK_FILE "
14+ teardown
15+ exit 1
16+ fi
17+ echo " $PLAYBOOK_FILE syntax is OK"
18+ }
19+
20+ assertEquals ()
21+ {
22+ EXPECTED=$1
23+ ACTUAL=$2
24+ if [ " $ACTUAL " != " $EXPECTED " ]; then
25+ echo " Assertion error: $EXPECTED expected, but $ACTUAL gotten"
26+ teardown
27+ exit 1
28+ fi
29+ }
30+
31+ assertFileExists ()
32+ {
33+ FILE_PATH=$1
34+ if [ ! -f $FILE_PATH ]; then
35+ echo " The file $FILE_PATH does not exist"
36+ teardown
37+ exit 1
38+ fi
39+ }
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ teardown()
77 rm -rf .vagrant/ * .retry " $tmpfile " ubuntu-* -cloudimg-console.log
88}
99
10- . ../common/ test-library.sh
10+ . test-library.sh
1111
1212# turn on the environment
1313vagrant up
You can’t perform that action at this time.
0 commit comments