summaryrefslogtreecommitdiff
path: root/spec/acceptance/beaker/git/group_checkout
diff options
context:
space:
mode:
Diffstat (limited to 'spec/acceptance/beaker/git/group_checkout')
-rw-r--r--spec/acceptance/beaker/git/group_checkout/group_checkout_file.rb8
-rw-r--r--spec/acceptance/beaker/git/group_checkout/group_checkout_file_path.rb8
-rw-r--r--spec/acceptance/beaker/git/group_checkout/group_checkout_git.rb10
-rw-r--r--spec/acceptance/beaker/git/group_checkout/group_checkout_http.rb10
-rw-r--r--spec/acceptance/beaker/git/group_checkout/group_checkout_https.rb10
-rw-r--r--spec/acceptance/beaker/git/group_checkout/group_checkout_scp.rb15
-rw-r--r--spec/acceptance/beaker/git/group_checkout/group_checkout_ssh.rb15
-rw-r--r--spec/acceptance/beaker/git/group_checkout/negative/group_checkout_file_non_existent_group.rb5
8 files changed, 41 insertions, 40 deletions
diff --git a/spec/acceptance/beaker/git/group_checkout/group_checkout_file.rb b/spec/acceptance/beaker/git/group_checkout/group_checkout_file.rb
index 6913bd5..be5ae92 100644
--- a/spec/acceptance/beaker/git/group_checkout/group_checkout_file.rb
+++ b/spec/acceptance/beaker/git/group_checkout/group_checkout_file.rb
@@ -14,12 +14,12 @@ hosts.each do |host|
end
step 'setup - create group' do
- apply_manifest_on(host, "group { '#{group}': ensure => present, }")
+ apply_manifest_on(host, "group { '#{group}': ensure => present, }", :catch_failures => true)
end
teardown do
on(host, "rm -fr #{tmpdir}")
- apply_manifest_on(host, "group { '#{group}': ensure => absent, }")
+ apply_manifest_on(host, "group { '#{group}': ensure => absent, }", :catch_failures => true)
end
step 'checkout as a group with puppet' do
@@ -32,8 +32,8 @@ hosts.each do |host|
}
EOS
- apply_manifest_on(host, pp)
- apply_manifest_on(host, pp)
+ apply_manifest_on(host, pp, :catch_failures => true)
+ apply_manifest_on(host, pp, :catch_changes => true)
end
step "verify git checkout is own by group #{group}" do
diff --git a/spec/acceptance/beaker/git/group_checkout/group_checkout_file_path.rb b/spec/acceptance/beaker/git/group_checkout/group_checkout_file_path.rb
index 6701dda..c204792 100644
--- a/spec/acceptance/beaker/git/group_checkout/group_checkout_file_path.rb
+++ b/spec/acceptance/beaker/git/group_checkout/group_checkout_file_path.rb
@@ -14,12 +14,12 @@ hosts.each do |host|
end
step 'setup - create group' do
- apply_manifest_on(host, "group { '#{group}': ensure => present, }")
+ apply_manifest_on(host, "group { '#{group}': ensure => present, }", :catch_failures => true)
end
teardown do
on(host, "rm -fr #{tmpdir}")
- apply_manifest_on(host, "group { '#{group}': ensure => absent, }")
+ apply_manifest_on(host, "group { '#{group}': ensure => absent, }", :catch_failures => true)
end
step 'checkout a group with puppet' do
@@ -32,8 +32,8 @@ hosts.each do |host|
}
EOS
- apply_manifest_on(host, pp)
- apply_manifest_on(host, pp)
+ apply_manifest_on(host, pp, :catch_failures => true)
+ apply_manifest_on(host, pp, :catch_changes => true)
end
step "verify git checkout is own by group #{group}" do
diff --git a/spec/acceptance/beaker/git/group_checkout/group_checkout_git.rb b/spec/acceptance/beaker/git/group_checkout/group_checkout_git.rb
index 31ef286..6147549 100644
--- a/spec/acceptance/beaker/git/group_checkout/group_checkout_git.rb
+++ b/spec/acceptance/beaker/git/group_checkout/group_checkout_git.rb
@@ -18,13 +18,13 @@ hosts.each do |host|
end
step 'setup - create group' do
- apply_manifest_on(host, "group { '#{group}': ensure => present, }")
+ apply_manifest_on(host, "group { '#{group}': ensure => present, }", :catch_failures => true)
end
teardown do
on(host, "rm -fr #{tmpdir}")
- on(host, 'pkill -9 git-daemon')
- apply_manifest_on(host, "group { '#{group}': ensure => absent, }")
+ on(host, 'pkill -9 git-daemon ; sleep 1')
+ apply_manifest_on(host, "group { '#{group}': ensure => absent, }", :catch_failures => true)
end
step 'checkout a group with puppet' do
@@ -37,8 +37,8 @@ hosts.each do |host|
}
EOS
- apply_manifest_on(host, pp)
- apply_manifest_on(host, pp)
+ apply_manifest_on(host, pp, :catch_failures => true)
+ apply_manifest_on(host, pp, :catch_changes => true)
end
step "verify git checkout is own by group #{group}" do
diff --git a/spec/acceptance/beaker/git/group_checkout/group_checkout_http.rb b/spec/acceptance/beaker/git/group_checkout/group_checkout_http.rb
index 0c86c77..43c3f2e 100644
--- a/spec/acceptance/beaker/git/group_checkout/group_checkout_http.rb
+++ b/spec/acceptance/beaker/git/group_checkout/group_checkout_http.rb
@@ -26,13 +26,13 @@ hosts.each do |host|
end
step 'setup - create group' do
- apply_manifest_on(host, "group { '#{group}': ensure => present, }")
+ apply_manifest_on(host, "group { '#{group}': ensure => present, }", :catch_failures => true)
end
teardown do
on(host, "rm -fr #{tmpdir}")
- on(host, "ps ax | grep '#{ruby} /tmp/http_daemon.rb' | grep -v grep | awk '{print \"kill -9 \" $1}' | sh")
- apply_manifest_on(host, "group { '#{group}': ensure => absent, }")
+ on(host, "ps ax | grep '#{ruby} /tmp/http_daemon.rb' | grep -v grep | awk '{print \"kill -9 \" $1}' | sh ; sleep 1")
+ apply_manifest_on(host, "group { '#{group}': ensure => absent, }", :catch_failures => true)
end
step 'checkout a group with puppet' do
@@ -45,8 +45,8 @@ hosts.each do |host|
}
EOS
- apply_manifest_on(host, pp)
- apply_manifest_on(host, pp)
+ apply_manifest_on(host, pp, :catch_failures => true)
+ apply_manifest_on(host, pp, :catch_changes => true)
end
step "verify git checkout is own by group #{group}" do
diff --git a/spec/acceptance/beaker/git/group_checkout/group_checkout_https.rb b/spec/acceptance/beaker/git/group_checkout/group_checkout_https.rb
index 0bcbd97..6825df3 100644
--- a/spec/acceptance/beaker/git/group_checkout/group_checkout_https.rb
+++ b/spec/acceptance/beaker/git/group_checkout/group_checkout_https.rb
@@ -33,13 +33,13 @@ hosts.each do |host|
end
step 'setup - create group' do
- apply_manifest_on(host, "group { '#{group}': ensure => present, }")
+ apply_manifest_on(host, "group { '#{group}': ensure => present, }", :catch_failures => true)
end
teardown do
on(host, "rm -fr #{tmpdir}")
- on(host, "ps ax | grep '#{ruby} /tmp/https_daemon.rb' | grep -v grep | awk '{print \"kill -9 \" $1}' | sh")
- apply_manifest_on(host, "group { '#{group}': ensure => absent, }")
+ on(host, "ps ax | grep '#{ruby} /tmp/https_daemon.rb' | grep -v grep | awk '{print \"kill -9 \" $1}' | sh ; sleep 1")
+ apply_manifest_on(host, "group { '#{group}': ensure => absent, }", :catch_failures => true)
end
step 'checkout as a group with puppet' do
@@ -52,8 +52,8 @@ hosts.each do |host|
}
EOS
- apply_manifest_on(host, pp)
- apply_manifest_on(host, pp)
+ apply_manifest_on(host, pp, :catch_failures => true)
+ apply_manifest_on(host, pp, :catch_changes => true)
end
step "verify git checkout is own by group #{group}" do
diff --git a/spec/acceptance/beaker/git/group_checkout/group_checkout_scp.rb b/spec/acceptance/beaker/git/group_checkout/group_checkout_scp.rb
index d8f5bb5..0bcf143 100644
--- a/spec/acceptance/beaker/git/group_checkout/group_checkout_scp.rb
+++ b/spec/acceptance/beaker/git/group_checkout/group_checkout_scp.rb
@@ -14,22 +14,23 @@ hosts.each do |host|
end
step 'setup - establish ssh keys' do
# create ssh keys
- on(host, 'ssh-keygen -q -t rsa -f /root/.ssh/id_rsa -N ""')
+ on(host, 'yes | ssh-keygen -q -t rsa -f /root/.ssh/id_rsa -N ""')
# copy public key to authorized_keys
+ on(host, 'cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys')
on(host, 'echo -e "Host *\n\tStrictHostKeyChecking no\n" >> /root/.ssh/config')
on(host, 'chown -R root:root /root/.ssh')
end
step 'setup - create group' do
- apply_manifest_on(host, "group { '#{group}': ensure => present, }")
+ apply_manifest_on(host, "group { '#{group}': ensure => present, }", :catch_failures => true)
end
teardown do
on(host, "rm -fr #{tmpdir}")
- apply_manifest_on(host, "file{'/root/.ssh/id_rsa': ensure => absent, force => true }")
- apply_manifest_on(host, "file{'/root/.ssh/id_rsa.pub': ensure => absent, force => true }")
- apply_manifest_on(host, "group { '#{group}': ensure => absent, }")
+ apply_manifest_on(host, "file{'/root/.ssh/id_rsa': ensure => absent, force => true }", :catch_failures => true)
+ apply_manifest_on(host, "file{'/root/.ssh/id_rsa.pub': ensure => absent, force => true }", :catch_failures => true)
+ apply_manifest_on(host, "group { '#{group}': ensure => absent, }", :catch_failures => true)
end
step 'checkout as a group with puppet (scp syntax)' do
@@ -42,8 +43,8 @@ hosts.each do |host|
}
EOS
- apply_manifest_on(host, pp)
- apply_manifest_on(host, pp)
+ apply_manifest_on(host, pp, :catch_failures => true)
+ apply_manifest_on(host, pp, :catch_changes => true)
end
step "verify git checkout is own by group #{group}" do
diff --git a/spec/acceptance/beaker/git/group_checkout/group_checkout_ssh.rb b/spec/acceptance/beaker/git/group_checkout/group_checkout_ssh.rb
index 1255864..87bad69 100644
--- a/spec/acceptance/beaker/git/group_checkout/group_checkout_ssh.rb
+++ b/spec/acceptance/beaker/git/group_checkout/group_checkout_ssh.rb
@@ -14,22 +14,23 @@ hosts.each do |host|
end
step 'setup - establish ssh keys' do
# create ssh keys
- on(host, 'ssh-keygen -q -t rsa -f /root/.ssh/id_rsa -N ""')
+ on(host, 'yes | ssh-keygen -q -t rsa -f /root/.ssh/id_rsa -N ""')
# copy public key to authorized_keys
+ on(host, 'cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys')
on(host, 'echo -e "Host *\n\tStrictHostKeyChecking no\n" >> /root/.ssh/config')
on(host, 'chown -R root:root /root/.ssh')
end
step 'setup - create group' do
- apply_manifest_on(host, "group { '#{group}': ensure => present, }")
+ apply_manifest_on(host, "group { '#{group}': ensure => present, }", :catch_failures => true)
end
teardown do
on(host, "rm -fr #{tmpdir}")
- apply_manifest_on(host, "file{'/root/.ssh/id_rsa': ensure => absent, force => true }")
- apply_manifest_on(host, "file{'/root/.ssh/id_rsa.pub': ensure => absent, force => true }")
- apply_manifest_on(host, "group { '#{group}': ensure => absent, }")
+ apply_manifest_on(host, "file{'/root/.ssh/id_rsa': ensure => absent, force => true }", :catch_failures => true)
+ apply_manifest_on(host, "file{'/root/.ssh/id_rsa.pub': ensure => absent, force => true }", :catch_failures => true)
+ apply_manifest_on(host, "group { '#{group}': ensure => absent, }", :catch_failures => true)
end
step 'checkout as a group with puppet' do
@@ -42,8 +43,8 @@ hosts.each do |host|
}
EOS
- apply_manifest_on(host, pp)
- apply_manifest_on(host, pp)
+ apply_manifest_on(host, pp, :catch_failures => true)
+ apply_manifest_on(host, pp, :catch_changes => true)
end
step "verify git checkout is own by group #{group}" do
diff --git a/spec/acceptance/beaker/git/group_checkout/negative/group_checkout_file_non_existent_group.rb b/spec/acceptance/beaker/git/group_checkout/negative/group_checkout_file_non_existent_group.rb
index 5bce264..5388f7f 100644
--- a/spec/acceptance/beaker/git/group_checkout/negative/group_checkout_file_non_existent_group.rb
+++ b/spec/acceptance/beaker/git/group_checkout/negative/group_checkout_file_non_existent_group.rb
@@ -14,7 +14,7 @@ hosts.each do |host|
end
step 'setup - delete group' do
- apply_manifest_on(host, "group { '#{group}': ensure => absent, }")
+ apply_manifest_on(host, "group { '#{group}': ensure => absent, }", :catch_failures => true)
end
teardown do
@@ -31,8 +31,7 @@ hosts.each do |host|
}
EOS
- apply_manifest_on(host, pp)
- apply_manifest_on(host, pp)
+ apply_manifest_on(host, pp, :expect_failures => true)
end
step "verify git checkout is NOT owned by group #{group}" do