Permalink
Browse files

Merge commit 'upstream/master'

  • Loading branch information...
2 parents 7bdb376 + acf47fb commit 4acdaa6c89d4245cc776afd2b999c42f6c4ec528 Dan Bode committed Jul 15, 2010
View
2 local_setup.example.sh
@@ -0,0 +1,2 @@
+cd ~/puppet/lib
+BIN=../bin
View
4 spec/apply/classes/should_not_auto_include_resources_from_class_spec.sh
@@ -6,9 +6,9 @@ set -e
$BIN/puppet apply <<PP | tee /tmp/class_not_include-$$
class x {
- notify{'a':}
+ notify{'NEVER':}
}
PP
# postcondition - test that the file is empty
# this assumes that we are running at notice level (not debug or verbose)
-[ ! -s /tmp/class_not_include-$$ ]
+! grep NEVER /tmp/class_not_include-$$
View
2 spec/apply/conditionals/should_evaluate_else_spec.sh
@@ -5,6 +5,8 @@ set -e
#
. local_setup.sh
+OUTFILE="/tmp/spec-$$.log"
+
$BIN/puppet apply <<PP | tee $OUTFILE
if( 1 == 2) {
notice('if')
View
2 spec/apply/conditionals/should_evaluate_elsif_spec.sh
@@ -2,6 +2,8 @@
source local_setup.sh
+OUTFILE="/tmp/spec-$$.log"
+
$BIN/puppet apply <<PP | tee $OUTFILE
if( 1 == 3) {
notice('if')
View
2 spec/apply/conditionals/should_evaluate_empty_spec.sh 100755 → 100644
@@ -4,6 +4,8 @@
#
. local_setup.sh
+OUTFILE="/tmp/spec-$$.log"
+
$BIN/puppet apply <<PP | tee $OUTFILE
if \$undef_var {
} else {
View
2 spec/apply/conditionals/should_evaluate_false_spec.sh
@@ -4,6 +4,8 @@
#
source local_setup.sh
+OUTFILE="/tmp/spec-$$.log"
+
$BIN/puppet <<PP | tee $OUTFILE
if false {
} else {
View
2 spec/apply/conditionals/should_evaluate_if_spec.sh
@@ -2,6 +2,8 @@
source local_setup.sh
+OUTFILE="/tmp/spec-$$.log"
+
$BIN/puppet apply <<PP | tee $OUTFILE
if( 1 == 1) {
notice('if')
View
2 spec/apply/conditionals/should_evaluate_strings_true_spec.sh
@@ -4,6 +4,8 @@
#
source local_setup.sh
+OUTFILE="/tmp/spec-$$.log"
+
$BIN/puppet <<PP | tee $OUTFILE
if 'false' {
notice('true')
View
3 spec/apply/conditionals/should_evaluate_undef_spec.sh
@@ -1,5 +1,8 @@
#!/bin/bash
source local_setup.sh
+
+OUTFILE="/tmp/spec-$$.log"
+
$BIN/puppet apply <<PP | tee $OUTFILE
if '' {
} else {
View
14 spec/resource/host/ticket_4131_should_not_create_without_ip_spec.sh
@@ -5,15 +5,13 @@ set -u
. local_setup.sh
#
-# precondition - entry exists with namevar
+# precondition - entry doesn't exist
#
-
-if ! grep test1 /etc/hosts; then
- echo "127.0.0.2 test1" >> /etc/hosts
+if [ -f /tmp/host-$$ ]; then
+ rm /tmp/host-$$
fi
-if [ -f /tmp/hosts-$$ ]; then
- rm /tmp/hosts-$$
-fi
+$BIN/puppet resource host test1 ensure=present target="/tmp/host-$$" host_aliases=alias1 | tee /tmp/spec-$$.log
+
# post-condition - ip address not specified, create should fail with message.
-$BIN/puppet resource host test1 ensure=present target="/tmp/host-$$" host_aliases=alias1 | grep 'ip is a required attribute for hosts'
+grep 'ip is a required attribute for hosts' /tmp/spec-$$.log

0 comments on commit 4acdaa6

Please sign in to comment.