summaryrefslogtreecommitdiff
path: root/spec/acceptance
diff options
context:
space:
mode:
authorJohn Duarte <john.duarte@puppetlabs.com>2014-05-06 08:52:20 -0700
committerJohn Duarte <john.duarte@puppetlabs.com>2014-05-18 11:38:18 -0700
commitfc8c177fbbe0f3cecfb1f984725bf4cbcfbeb54d (patch)
tree297d6441cd5873803c662b410e8120ccce88ff71 /spec/acceptance
parent3c41c39e19b63d76001fe980a2b8281221e6175e (diff)
Move git daemon setup/teardown into context block
In order to ensure that the git daemon is running for the proper test, the setup and teardown calls for git daemon hav been moved into the context block for testing the git protocol.
Diffstat (limited to 'spec/acceptance')
-rw-r--r--spec/acceptance/git_clone_protocols_spec.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/acceptance/git_clone_protocols_spec.rb b/spec/acceptance/git_clone_protocols_spec.rb
index ec99629..77a1adb 100644
--- a/spec/acceptance/git_clone_protocols_spec.rb
+++ b/spec/acceptance/git_clone_protocols_spec.rb
@@ -29,8 +29,6 @@ hosts.each do |host|
# copy ssl keys
scp_to(host, "#{my_root}/acceptance/files/server.crt", tmpdir)
scp_to(host, "#{my_root}/acceptance/files/server.key", tmpdir)
-
- host.execute("nohup git daemon --detach --base-path=/#{tmpdir}")
# }}}
end
@@ -96,6 +94,7 @@ hosts.each do |host|
context 'using git protocol' do
before(:all) do
on(host,apply_manifest("file {'#{tmpdir}/testrepo': ensure => directory, purge => true, recurse => true, recurselimit => 1, force => true; }"))
+ host.execute("nohup git daemon --detach --base-path=/#{tmpdir}")
end
it 'should have HEAD pointing to master' do
@@ -115,6 +114,9 @@ hosts.each do |host|
it { should contain 'ref: refs/heads/master' }
end
+ after(:all) do
+ host.execute('pkill -9 git')
+ end
end
end