From 591725e0f2a0dd0dd31b0086dbd4068bd302b0e1 Mon Sep 17 00:00:00 2001 From: John Duarte Date: Sat, 10 May 2014 21:13:03 -0700 Subject: Move git tests into sub-directory --- .../negative/shallow_clone_hostile_depth.rb | 39 ++++++++++++++ .../negative/shallow_clone_negative_depth.rb | 39 ++++++++++++++ .../negative/shallow_clone_overflow_depth.rb | 39 ++++++++++++++ .../beaker/git/shallow_clone/shallow_clone_file.rb | 43 +++++++++++++++ .../git/shallow_clone/shallow_clone_file_path.rb | 43 +++++++++++++++ .../beaker/git/shallow_clone/shallow_clone_git.rb | 48 +++++++++++++++++ .../beaker/git/shallow_clone/shallow_clone_http.rb | 55 +++++++++++++++++++ .../git/shallow_clone/shallow_clone_https.rb | 62 ++++++++++++++++++++++ .../beaker/git/shallow_clone/shallow_clone_ssh.rb | 53 ++++++++++++++++++ .../git/shallow_clone/shallow_clone_zero_depth.rb | 39 ++++++++++++++ 10 files changed, 460 insertions(+) create mode 100644 spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_hostile_depth.rb create mode 100644 spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_negative_depth.rb create mode 100644 spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_overflow_depth.rb create mode 100644 spec/acceptance/beaker/git/shallow_clone/shallow_clone_file.rb create mode 100644 spec/acceptance/beaker/git/shallow_clone/shallow_clone_file_path.rb create mode 100644 spec/acceptance/beaker/git/shallow_clone/shallow_clone_git.rb create mode 100644 spec/acceptance/beaker/git/shallow_clone/shallow_clone_http.rb create mode 100644 spec/acceptance/beaker/git/shallow_clone/shallow_clone_https.rb create mode 100644 spec/acceptance/beaker/git/shallow_clone/shallow_clone_ssh.rb create mode 100644 spec/acceptance/beaker/git/shallow_clone/shallow_clone_zero_depth.rb (limited to 'spec/acceptance/beaker/git/shallow_clone') diff --git a/spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_hostile_depth.rb b/spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_hostile_depth.rb new file mode 100644 index 0000000..0a4b467 --- /dev/null +++ b/spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_hostile_depth.rb @@ -0,0 +1,39 @@ +test_name 'C3608 - shallow clone repo depth hostile input' + +# Globals +repo_name = 'testrepo_shallow_clone' + +hosts.each do |host| + tmpdir = host.tmpdir('vcsrepo') + step 'setup - create repo' do + install_package(host, 'git') + my_root = File.expand_path(File.join(File.dirname(__FILE__), '../../../../..')) + scp_to(host, "#{my_root}/acceptance/files/create_git_repo.sh", tmpdir) + on(host, "cd #{tmpdir} && ./create_git_repo.sh") + end + + teardown do + on(host, "rm -fr #{tmpdir}") + end + + step 'shallow clone repo with puppet (bad input ignored, full clone checkedout)' do + pp = <<-EOS + vcsrepo { "#{tmpdir}/#{repo_name}": + ensure => present, + source => "file://#{tmpdir}/testrepo.git", + provider => git, + depth => 'rm -rf /tmp', + } + EOS + + apply_manifest_on(host, pp) + apply_manifest_on(host, pp) + end + + step 'verify checkout is NOT shallow' do + on(host, "ls #{tmpdir}/#{repo_name}/.git/") do |res| + fail_test('shallow not found') if res.stdout.include? "shallow" + end + end + +end diff --git a/spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_negative_depth.rb b/spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_negative_depth.rb new file mode 100644 index 0000000..2ba1f0f --- /dev/null +++ b/spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_negative_depth.rb @@ -0,0 +1,39 @@ +test_name 'C3607 - shallow clone repo depth = -1' + +# Globals +repo_name = 'testrepo_shallow_clone' + +hosts.each do |host| + tmpdir = host.tmpdir('vcsrepo') + step 'setup - create repo' do + install_package(host, 'git') + my_root = File.expand_path(File.join(File.dirname(__FILE__), '../../../../..')) + scp_to(host, "#{my_root}/acceptance/files/create_git_repo.sh", tmpdir) + on(host, "cd #{tmpdir} && ./create_git_repo.sh") + end + + teardown do + on(host, "rm -fr #{tmpdir}") + end + + step 'shallow clone repo with puppet (bad input ignored, full clone checkedout)' do + pp = <<-EOS + vcsrepo { "#{tmpdir}/#{repo_name}": + ensure => present, + source => "file://#{tmpdir}/testrepo.git", + provider => git, + depth => -1, + } + EOS + + apply_manifest_on(host, pp) + apply_manifest_on(host, pp) + end + + step 'verify checkout is NOT shallow' do + on(host, "ls #{tmpdir}/#{repo_name}/.git/") do |res| + fail_test('shallow not found') if res.stdout.include? "shallow" + end + end + +end diff --git a/spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_overflow_depth.rb b/spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_overflow_depth.rb new file mode 100644 index 0000000..55ff878 --- /dev/null +++ b/spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_overflow_depth.rb @@ -0,0 +1,39 @@ +test_name 'C3606 - shallow clone repo depth overflow 64bit integer' + +# Globals +repo_name = 'testrepo_shallow_clone' + +hosts.each do |host| + tmpdir = host.tmpdir('vcsrepo') + step 'setup - create repo' do + install_package(host, 'git') + my_root = File.expand_path(File.join(File.dirname(__FILE__), '../../../../..')) + scp_to(host, "#{my_root}/acceptance/files/create_git_repo.sh", tmpdir) + on(host, "cd #{tmpdir} && ./create_git_repo.sh") + end + + teardown do + on(host, "rm -fr #{tmpdir}") + end + + step 'shallow clone repo with puppet (bad input ignored, full clone checkedout)' do + pp = <<-EOS + vcsrepo { "#{tmpdir}/#{repo_name}": + ensure => present, + source => "file://#{tmpdir}/testrepo.git", + provider => git, + depth => 18446744073709551616, + } + EOS + + apply_manifest_on(host, pp) + apply_manifest_on(host, pp) + end + + step 'verify checkout is NOT shallow' do + on(host, "ls #{tmpdir}/#{repo_name}/.git/") do |res| + fail_test('shallow not found') if res.stdout.include? "shallow" + end + end + +end diff --git a/spec/acceptance/beaker/git/shallow_clone/shallow_clone_file.rb b/spec/acceptance/beaker/git/shallow_clone/shallow_clone_file.rb new file mode 100644 index 0000000..52eb3d2 --- /dev/null +++ b/spec/acceptance/beaker/git/shallow_clone/shallow_clone_file.rb @@ -0,0 +1,43 @@ +test_name 'C3476 - shallow clone repo minimal depth = 1 (file protocol)' + +# Globals +repo_name = 'testrepo_shallow_clone' + +hosts.each do |host| + tmpdir = host.tmpdir('vcsrepo') + step 'setup - create repo' do + install_package(host, 'git') + my_root = File.expand_path(File.join(File.dirname(__FILE__), '../../../..')) + scp_to(host, "#{my_root}/acceptance/files/create_git_repo.sh", tmpdir) + on(host, "cd #{tmpdir} && ./create_git_repo.sh") + end + + teardown do + on(host, "rm -fr #{tmpdir}") + end + + step 'shallow clone repo with puppet' do + pp = <<-EOS + vcsrepo { "#{tmpdir}/#{repo_name}": + ensure => present, + source => "file://#{tmpdir}/testrepo.git", + provider => git, + depth => 1, + } + EOS + + apply_manifest_on(host, pp) + apply_manifest_on(host, pp) + end + + step 'verify checkout is shallow and of the correct depth' do + on(host, "ls #{tmpdir}/#{repo_name}/.git/") do |res| + fail_test('shallow not found') unless res.stdout.include? "shallow" + end + + on(host, "wc -l #{tmpdir}/#{repo_name}/.git/shallow") do |res| + fail_test('shallow not found') unless res.stdout.include? "2 #{tmpdir}/#{repo_name}/.git/shallow" + end + end + +end diff --git a/spec/acceptance/beaker/git/shallow_clone/shallow_clone_file_path.rb b/spec/acceptance/beaker/git/shallow_clone/shallow_clone_file_path.rb new file mode 100644 index 0000000..d9d18ce --- /dev/null +++ b/spec/acceptance/beaker/git/shallow_clone/shallow_clone_file_path.rb @@ -0,0 +1,43 @@ +test_name 'C3475 - shallow clone repo minimal depth = 1 (file path protocol)' + +# Globals +repo_name = 'testrepo_shallow_clone' + +hosts.each do |host| + tmpdir = host.tmpdir('vcsrepo') + step 'setup - create repo' do + install_package(host, 'git') + my_root = File.expand_path(File.join(File.dirname(__FILE__), '../../../..')) + scp_to(host, "#{my_root}/acceptance/files/create_git_repo.sh", tmpdir) + on(host, "cd #{tmpdir} && ./create_git_repo.sh") + end + + teardown do + on(host, "rm -fr #{tmpdir}") + end + + step 'shallow clone repo with puppet' do + pp = <<-EOS + vcsrepo { "#{tmpdir}/#{repo_name}": + ensure => present, + source => "#{tmpdir}/testrepo.git", + provider => git, + depth => 1, + } + EOS + + apply_manifest_on(host, pp) + apply_manifest_on(host, pp) + end + + step 'verify checkout is shallow and of the correct depth' do + on(host, "ls #{tmpdir}/#{repo_name}/.git/") do |res| + fail_test('shallow not found') unless res.stdout.include? "shallow" + end + + on(host, "wc -l #{tmpdir}/#{repo_name}/.git/shallow") do |res| + fail_test('shallow not found') unless res.stdout.include? "2 #{tmpdir}/#{repo_name}/.git/shallow" + end + end + +end diff --git a/spec/acceptance/beaker/git/shallow_clone/shallow_clone_git.rb b/spec/acceptance/beaker/git/shallow_clone/shallow_clone_git.rb new file mode 100644 index 0000000..8b3a16a --- /dev/null +++ b/spec/acceptance/beaker/git/shallow_clone/shallow_clone_git.rb @@ -0,0 +1,48 @@ +test_name 'C3474 - shallow clone repo minimal depth = 1 (git protocol)' + +# Globals +repo_name = 'testrepo_shallow_clone' + +hosts.each do |host| + tmpdir = host.tmpdir('vcsrepo') + step 'setup - create repo' do + install_package(host, 'git') + my_root = File.expand_path(File.join(File.dirname(__FILE__), '../../../..')) + scp_to(host, "#{my_root}/acceptance/files/create_git_repo.sh", tmpdir) + on(host, "cd #{tmpdir} && ./create_git_repo.sh") + end + step 'setup - start git daemon' do + install_package(host, 'git-daemon') + on(host, "nohup git daemon --detach --base-path=/#{tmpdir}") + end + + teardown do + on(host, "rm -fr #{tmpdir}") + on(host, 'pkill -9 git-daemon') + end + + step 'shallow clone repo with puppet' do + pp = <<-EOS + vcsrepo { "#{tmpdir}/#{repo_name}": + ensure => present, + source => "git://#{host}/testrepo.git", + provider => git, + depth => 1, + } + EOS + + apply_manifest_on(host, pp) + apply_manifest_on(host, pp) + end + + step 'verify checkout is shallow and of the correct depth' do + on(host, "ls #{tmpdir}/#{repo_name}/.git/") do |res| + fail_test('shallow not found') unless res.stdout.include? "shallow" + end + + on(host, "wc -l #{tmpdir}/#{repo_name}/.git/shallow") do |res| + fail_test('shallow not found') unless res.stdout.include? "2 #{tmpdir}/#{repo_name}/.git/shallow" + end + end + +end diff --git a/spec/acceptance/beaker/git/shallow_clone/shallow_clone_http.rb b/spec/acceptance/beaker/git/shallow_clone/shallow_clone_http.rb new file mode 100644 index 0000000..ad7e30e --- /dev/null +++ b/spec/acceptance/beaker/git/shallow_clone/shallow_clone_http.rb @@ -0,0 +1,55 @@ +test_name 'C3479 - shallow clone repo minimal depth = 1 (http protocol)' + +# Globals +repo_name = 'testrepo_shallow_clone' + +hosts.each do |host| + tmpdir = host.tmpdir('vcsrepo') + step 'setup - create repo' do + install_package(host, 'git') + my_root = File.expand_path(File.join(File.dirname(__FILE__), '../../../..')) + scp_to(host, "#{my_root}/acceptance/files/create_git_repo.sh", tmpdir) + on(host, "cd #{tmpdir} && ./create_git_repo.sh") + end + + step 'setup - start http server' do + http_daemon =<<-EOF + require 'webrick' + server = WEBrick::HTTPServer.new(:Port => 8000, :DocumentRoot => "#{tmpdir}") + WEBrick::Daemon.start + server.start + EOF + create_remote_file(host, '/tmp/http_daemon.rb', http_daemon) + on(host, "ruby /tmp/http_daemon.rb") + 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') + end + + step 'shallow clone repo with puppet' do + pp = <<-EOS + vcsrepo { "#{tmpdir}/#{repo_name}": + ensure => present, + source => "http://#{host}:8000/testrepo.git", + provider => git, + depth => 1, + } + EOS + + apply_manifest_on(host, pp) + apply_manifest_on(host, pp) + end + + step 'verify checkout is shallow and of the correct depth' do + on(host, "ls #{tmpdir}/#{repo_name}/.git/") do |res| + fail_test('shallow not found') unless res.stdout.include? "shallow" + end + + on(host, "wc -l #{tmpdir}/#{repo_name}/.git/shallow") do |res| + fail_test('shallow not found') unless res.stdout.include? "2 #{tmpdir}/#{repo_name}/.git/shallow" + end + end + +end diff --git a/spec/acceptance/beaker/git/shallow_clone/shallow_clone_https.rb b/spec/acceptance/beaker/git/shallow_clone/shallow_clone_https.rb new file mode 100644 index 0000000..e016e55 --- /dev/null +++ b/spec/acceptance/beaker/git/shallow_clone/shallow_clone_https.rb @@ -0,0 +1,62 @@ +test_name 'C3480 - shallow clone repo minimal depth = 1 (https protocol)' + +# Globals +repo_name = 'testrepo_shallow_clone' + +hosts.each do |host| + tmpdir = host.tmpdir('vcsrepo') + step 'setup - create repo' do + install_package(host, 'git') + my_root = File.expand_path(File.join(File.dirname(__FILE__), '../../../..')) + scp_to(host, "#{my_root}/acceptance/files/create_git_repo.sh", tmpdir) + on(host, "cd #{tmpdir} && ./create_git_repo.sh") + end + step 'setup - start https server' do + https_daemon =<<-EOF + require 'webrick' + require 'webrick/https' + server = WEBrick::HTTPServer.new( + :Port => 8443, + :DocumentRoot => "#{tmpdir}", + :SSLEnable => true, + :SSLVerifyClient => OpenSSL::SSL::VERIFY_NONE, + :SSLCertificate => OpenSSL::X509::Certificate.new( File.open("#{tmpdir}/server.crt").read), + :SSLPrivateKey => OpenSSL::PKey::RSA.new( File.open("#{tmpdir}/server.key").read), + :SSLCertName => [ [ "CN",WEBrick::Utils::getservername ] ]) + WEBrick::Daemon.start + server.start + EOF + create_remote_file(host, '/tmp/https_daemon.rb', https_daemon) + #on(host, "ruby /tmp/https_daemon.rb") + 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') + end + + step 'shallow clone repo with puppet' do + pp = <<-EOS + vcsrepo { "#{tmpdir}/#{repo_name}": + ensure => present, + source => "https://github.com/johnduarte/testrepo.git", + provider => git, + depth => 1, + } + EOS + + apply_manifest_on(host, pp) + apply_manifest_on(host, pp) + end + + step 'verify checkout is shallow and of the correct depth' do + on(host, "ls #{tmpdir}/#{repo_name}/.git/") do |res| + fail_test('shallow not found') unless res.stdout.include? "shallow" + end + + on(host, "wc -l #{tmpdir}/#{repo_name}/.git/shallow") do |res| + fail_test('shallow not found') unless res.stdout.include? "2 #{tmpdir}/#{repo_name}/.git/shallow" + end + end + +end diff --git a/spec/acceptance/beaker/git/shallow_clone/shallow_clone_ssh.rb b/spec/acceptance/beaker/git/shallow_clone/shallow_clone_ssh.rb new file mode 100644 index 0000000..fda9bf4 --- /dev/null +++ b/spec/acceptance/beaker/git/shallow_clone/shallow_clone_ssh.rb @@ -0,0 +1,53 @@ +test_name 'C3477 - shallow clone repo minimal depth = 1 (ssh protocol)' + +# Globals +repo_name = 'testrepo_shallow_clone' + +hosts.each do |host| + tmpdir = host.tmpdir('vcsrepo') + step 'setup - create repo' do + install_package(host, 'git') + my_root = File.expand_path(File.join(File.dirname(__FILE__), '../../../..')) + scp_to(host, "#{my_root}/acceptance/files/create_git_repo.sh", tmpdir) + on(host, "cd #{tmpdir} && ./create_git_repo.sh") + end + step 'setup - establish ssh keys' do + # create ssh keys + on(host, 'ssh-keygen -q -t rsa -f /root/.ssh/id_rsa -N ""') + + # copy public key to authorized_keys + on(host, 'echo -e "Host *\n\tStrictHostKeyChecking no\n" >> /root/.ssh/config') + on(host, 'chown -R root:root /root/.ssh') + 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 }") + end + + step 'shallow clone repo with puppet' do + pp = <<-EOS + vcsrepo { "#{tmpdir}/#{repo_name}": + ensure => present, + source => "ssh://root@#{host}#{tmpdir}/testrepo.git", + provider => git, + depth => 1, + } + EOS + + apply_manifest_on(host, pp) + apply_manifest_on(host, pp) + end + + step 'verify checkout is shallow and of the correct depth' do + on(host, "ls #{tmpdir}/#{repo_name}/.git/") do |res| + fail_test('shallow not found') unless res.stdout.include? "shallow" + end + + on(host, "wc -l #{tmpdir}/#{repo_name}/.git/shallow") do |res| + fail_test('shallow not found') unless res.stdout.include? "2 #{tmpdir}/#{repo_name}/.git/shallow" + end + end + +end diff --git a/spec/acceptance/beaker/git/shallow_clone/shallow_clone_zero_depth.rb b/spec/acceptance/beaker/git/shallow_clone/shallow_clone_zero_depth.rb new file mode 100644 index 0000000..6cec2a1 --- /dev/null +++ b/spec/acceptance/beaker/git/shallow_clone/shallow_clone_zero_depth.rb @@ -0,0 +1,39 @@ +test_name 'C3404 - shallow clone repo depth = 0 non shallow' + +# Globals +repo_name = 'testrepo_shallow_clone' + +hosts.each do |host| + tmpdir = host.tmpdir('vcsrepo') + step 'setup - create repo' do + install_package(host, 'git') + my_root = File.expand_path(File.join(File.dirname(__FILE__), '../../../..')) + scp_to(host, "#{my_root}/acceptance/files/create_git_repo.sh", tmpdir) + on(host, "cd #{tmpdir} && ./create_git_repo.sh") + end + + teardown do + on(host, "rm -fr #{tmpdir}") + end + + step 'shallow clone repo with puppet (zero depth means not shallow)' do + pp = <<-EOS + vcsrepo { "#{tmpdir}/#{repo_name}": + ensure => present, + source => "file://#{tmpdir}/testrepo.git", + provider => git, + depth => 0, + } + EOS + + apply_manifest_on(host, pp) + apply_manifest_on(host, pp) + end + + step 'verify checkout is NOT shallow' do + on(host, "ls #{tmpdir}/#{repo_name}/.git/") do |res| + fail_test('shallow found') if res.stdout.include? "shallow" + end + end + +end -- cgit v1.2.3 From 4040e4a1cccc72692c00d5efc06f8e8d5e1174f1 Mon Sep 17 00:00:00 2001 From: John Duarte Date: Sun, 11 May 2014 12:00:21 -0700 Subject: Update expectations for shallow clone --- .../negative/shallow_clone_file_path.rb | 39 +++++++++++++++ .../shallow_clone/negative/shallow_clone_http.rb | 51 ++++++++++++++++++++ .../git/shallow_clone/shallow_clone_file_path.rb | 43 ----------------- .../beaker/git/shallow_clone/shallow_clone_http.rb | 55 ---------------------- 4 files changed, 90 insertions(+), 98 deletions(-) create mode 100644 spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_file_path.rb create mode 100644 spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_http.rb delete mode 100644 spec/acceptance/beaker/git/shallow_clone/shallow_clone_file_path.rb delete mode 100644 spec/acceptance/beaker/git/shallow_clone/shallow_clone_http.rb (limited to 'spec/acceptance/beaker/git/shallow_clone') diff --git a/spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_file_path.rb b/spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_file_path.rb new file mode 100644 index 0000000..9cebe45 --- /dev/null +++ b/spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_file_path.rb @@ -0,0 +1,39 @@ +test_name 'C3475 - shallow clone repo minimal depth = 1 (file path protocol)' + +# Globals +repo_name = 'testrepo_shallow_clone' + +hosts.each do |host| + tmpdir = host.tmpdir('vcsrepo') + step 'setup - create repo' do + install_package(host, 'git') + my_root = File.expand_path(File.join(File.dirname(__FILE__), '../../../..')) + scp_to(host, "#{my_root}/acceptance/files/create_git_repo.sh", tmpdir) + on(host, "cd #{tmpdir} && ./create_git_repo.sh") + end + + teardown do + on(host, "rm -fr #{tmpdir}") + end + + step 'shallow clone repo with puppet' do + pp = <<-EOS + vcsrepo { "#{tmpdir}/#{repo_name}": + ensure => present, + source => "#{tmpdir}/testrepo.git", + provider => git, + depth => 1, + } + EOS + + apply_manifest_on(host, pp) + apply_manifest_on(host, pp) + end + + step 'git does not support shallow clone via file path: verify checkout is NOT created' do + on(host, "ls #{tmpdir}") do |res| + fail_test('checkout found') if res.stdout.include? "#{repo_name}" + end + end + +end diff --git a/spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_http.rb b/spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_http.rb new file mode 100644 index 0000000..f80239b --- /dev/null +++ b/spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_http.rb @@ -0,0 +1,51 @@ +test_name 'C3479 - shallow clone repo minimal depth = 1 (http protocol)' + +# Globals +repo_name = 'testrepo_shallow_clone' + +hosts.each do |host| + tmpdir = host.tmpdir('vcsrepo') + step 'setup - create repo' do + install_package(host, 'git') + my_root = File.expand_path(File.join(File.dirname(__FILE__), '../../../..')) + scp_to(host, "#{my_root}/acceptance/files/create_git_repo.sh", tmpdir) + on(host, "cd #{tmpdir} && ./create_git_repo.sh") + end + + step 'setup - start http server' do + http_daemon =<<-EOF + require 'webrick' + server = WEBrick::HTTPServer.new(:Port => 8000, :DocumentRoot => "#{tmpdir}") + WEBrick::Daemon.start + server.start + EOF + create_remote_file(host, '/tmp/http_daemon.rb', http_daemon) + on(host, "ruby /tmp/http_daemon.rb") + 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') + end + + step 'shallow clone repo with puppet' do + pp = <<-EOS + vcsrepo { "#{tmpdir}/#{repo_name}": + ensure => present, + source => "http://#{host}:8000/testrepo.git", + provider => git, + depth => 1, + } + EOS + + apply_manifest_on(host, pp) + apply_manifest_on(host, pp) + end + + step 'git does not support shallow clone via HTTP: verify checkout is NOT created' do + on(host, "ls #{tmpdir}") do |res| + fail_test('checkout found') if res.stdout.include? "#{repo_name}" + end + end + +end diff --git a/spec/acceptance/beaker/git/shallow_clone/shallow_clone_file_path.rb b/spec/acceptance/beaker/git/shallow_clone/shallow_clone_file_path.rb deleted file mode 100644 index d9d18ce..0000000 --- a/spec/acceptance/beaker/git/shallow_clone/shallow_clone_file_path.rb +++ /dev/null @@ -1,43 +0,0 @@ -test_name 'C3475 - shallow clone repo minimal depth = 1 (file path protocol)' - -# Globals -repo_name = 'testrepo_shallow_clone' - -hosts.each do |host| - tmpdir = host.tmpdir('vcsrepo') - step 'setup - create repo' do - install_package(host, 'git') - my_root = File.expand_path(File.join(File.dirname(__FILE__), '../../../..')) - scp_to(host, "#{my_root}/acceptance/files/create_git_repo.sh", tmpdir) - on(host, "cd #{tmpdir} && ./create_git_repo.sh") - end - - teardown do - on(host, "rm -fr #{tmpdir}") - end - - step 'shallow clone repo with puppet' do - pp = <<-EOS - vcsrepo { "#{tmpdir}/#{repo_name}": - ensure => present, - source => "#{tmpdir}/testrepo.git", - provider => git, - depth => 1, - } - EOS - - apply_manifest_on(host, pp) - apply_manifest_on(host, pp) - end - - step 'verify checkout is shallow and of the correct depth' do - on(host, "ls #{tmpdir}/#{repo_name}/.git/") do |res| - fail_test('shallow not found') unless res.stdout.include? "shallow" - end - - on(host, "wc -l #{tmpdir}/#{repo_name}/.git/shallow") do |res| - fail_test('shallow not found') unless res.stdout.include? "2 #{tmpdir}/#{repo_name}/.git/shallow" - end - end - -end diff --git a/spec/acceptance/beaker/git/shallow_clone/shallow_clone_http.rb b/spec/acceptance/beaker/git/shallow_clone/shallow_clone_http.rb deleted file mode 100644 index ad7e30e..0000000 --- a/spec/acceptance/beaker/git/shallow_clone/shallow_clone_http.rb +++ /dev/null @@ -1,55 +0,0 @@ -test_name 'C3479 - shallow clone repo minimal depth = 1 (http protocol)' - -# Globals -repo_name = 'testrepo_shallow_clone' - -hosts.each do |host| - tmpdir = host.tmpdir('vcsrepo') - step 'setup - create repo' do - install_package(host, 'git') - my_root = File.expand_path(File.join(File.dirname(__FILE__), '../../../..')) - scp_to(host, "#{my_root}/acceptance/files/create_git_repo.sh", tmpdir) - on(host, "cd #{tmpdir} && ./create_git_repo.sh") - end - - step 'setup - start http server' do - http_daemon =<<-EOF - require 'webrick' - server = WEBrick::HTTPServer.new(:Port => 8000, :DocumentRoot => "#{tmpdir}") - WEBrick::Daemon.start - server.start - EOF - create_remote_file(host, '/tmp/http_daemon.rb', http_daemon) - on(host, "ruby /tmp/http_daemon.rb") - 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') - end - - step 'shallow clone repo with puppet' do - pp = <<-EOS - vcsrepo { "#{tmpdir}/#{repo_name}": - ensure => present, - source => "http://#{host}:8000/testrepo.git", - provider => git, - depth => 1, - } - EOS - - apply_manifest_on(host, pp) - apply_manifest_on(host, pp) - end - - step 'verify checkout is shallow and of the correct depth' do - on(host, "ls #{tmpdir}/#{repo_name}/.git/") do |res| - fail_test('shallow not found') unless res.stdout.include? "shallow" - end - - on(host, "wc -l #{tmpdir}/#{repo_name}/.git/shallow") do |res| - fail_test('shallow not found') unless res.stdout.include? "2 #{tmpdir}/#{repo_name}/.git/shallow" - end - end - -end -- cgit v1.2.3 From 93a410c9ad3d8b3cb8da1ce79040cd00475fceaf Mon Sep 17 00:00:00 2001 From: John Duarte Date: Mon, 12 May 2014 10:39:37 -0700 Subject: Add tests git using ssh scp syntax --- .../git/branch_checkout/branch_checkout_scp.rb | 54 +++++++++++++++++++ .../git/group_checkout/group_checkout_scp.rb | 59 +++++++++++++++++++++ .../git/revision_checkout/revision_checkout_scp.rb | 59 +++++++++++++++++++++ .../beaker/git/shallow_clone/shallow_clone_scp.rb | 53 +++++++++++++++++++ .../beaker/git/tag_checkout/tag_checkout_scp.rb | 60 ++++++++++++++++++++++ .../beaker/git/user_checkout/user_checkout_scp.rb | 59 +++++++++++++++++++++ 6 files changed, 344 insertions(+) create mode 100644 spec/acceptance/beaker/git/branch_checkout/branch_checkout_scp.rb create mode 100644 spec/acceptance/beaker/git/group_checkout/group_checkout_scp.rb create mode 100644 spec/acceptance/beaker/git/revision_checkout/revision_checkout_scp.rb create mode 100644 spec/acceptance/beaker/git/shallow_clone/shallow_clone_scp.rb create mode 100644 spec/acceptance/beaker/git/tag_checkout/tag_checkout_scp.rb create mode 100644 spec/acceptance/beaker/git/user_checkout/user_checkout_scp.rb (limited to 'spec/acceptance/beaker/git/shallow_clone') diff --git a/spec/acceptance/beaker/git/branch_checkout/branch_checkout_scp.rb b/spec/acceptance/beaker/git/branch_checkout/branch_checkout_scp.rb new file mode 100644 index 0000000..0a4e07a --- /dev/null +++ b/spec/acceptance/beaker/git/branch_checkout/branch_checkout_scp.rb @@ -0,0 +1,54 @@ +test_name 'C3439 - checkout a branch (ssh protocol, scp syntax)' + +# Globals +repo_name = 'testrepo_branch_checkout' +branch = 'a_branch' + +hosts.each do |host| + tmpdir = host.tmpdir('vcsrepo') + step 'setup - create repo' do + install_package(host, 'git') + my_root = File.expand_path(File.join(File.dirname(__FILE__), '../../../..')) + scp_to(host, "#{my_root}/acceptance/files/create_git_repo.sh", tmpdir) + on(host, "cd #{tmpdir} && ./create_git_repo.sh") + end + step 'setup - establish ssh keys' do + # create ssh keys + on(host, 'ssh-keygen -q -t rsa -f /root/.ssh/id_rsa -N ""') + + # copy public key to authorized_keys + on(host, 'echo -e "Host *\n\tStrictHostKeyChecking no\n" >> /root/.ssh/config') + on(host, 'chown -R root:root /root/.ssh') + 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 }") + end + + step 'checkout a branch with puppet' do + pp = <<-EOS + vcsrepo { "#{tmpdir}/#{repo_name}": + ensure => present, + source => "root@#{host}:#{tmpdir}/testrepo.git", + provider => git, + revision => '#{branch}', + } + EOS + + apply_manifest_on(host, pp) + apply_manifest_on(host, pp) + end + + step "verify checkout is on the #{branch} branch" do + on(host, "ls #{tmpdir}/#{repo_name}/.git/") do |res| + fail_test('checkout not found') unless res.stdout.include? "HEAD" + end + + on(host, "cat #{tmpdir}/#{repo_name}/.git/HEAD") do |res| + fail_test('branch not found') unless res.stdout.include? "ref: refs/heads/#{branch}" + end + end + +end diff --git a/spec/acceptance/beaker/git/group_checkout/group_checkout_scp.rb b/spec/acceptance/beaker/git/group_checkout/group_checkout_scp.rb new file mode 100644 index 0000000..d8f5bb5 --- /dev/null +++ b/spec/acceptance/beaker/git/group_checkout/group_checkout_scp.rb @@ -0,0 +1,59 @@ +test_name 'C3488 - checkout as a group (ssh protocol, scp syntax)' + +# Globals +repo_name = 'testrepo_group_checkout' +group = 'mygroup' + +hosts.each do |host| + tmpdir = host.tmpdir('vcsrepo') + step 'setup - create repo' do + install_package(host, 'git') + my_root = File.expand_path(File.join(File.dirname(__FILE__), '../../../..')) + scp_to(host, "#{my_root}/acceptance/files/create_git_repo.sh", tmpdir) + on(host, "cd #{tmpdir} && ./create_git_repo.sh") + end + step 'setup - establish ssh keys' do + # create ssh keys + on(host, 'ssh-keygen -q -t rsa -f /root/.ssh/id_rsa -N ""') + + # copy public key to 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, }") + 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, }") + end + + step 'checkout as a group with puppet (scp syntax)' do + pp = <<-EOS + vcsrepo { "#{tmpdir}/#{repo_name}": + ensure => present, + source => "root@#{host}:#{tmpdir}/testrepo.git", + provider => git, + group => '#{group}', + } + EOS + + apply_manifest_on(host, pp) + apply_manifest_on(host, pp) + end + + step "verify git checkout is own by group #{group}" do + on(host, "ls #{tmpdir}/#{repo_name}/.git/") do |res| + fail_test('checkout not found') unless res.stdout.include? "HEAD" + end + + on(host, "stat --format '%U:%G' #{tmpdir}/#{repo_name}/.git/HEAD") do |res| + fail_test('checkout not owned by group') unless res.stdout.include? ":#{group}" + end + end + +end diff --git a/spec/acceptance/beaker/git/revision_checkout/revision_checkout_scp.rb b/spec/acceptance/beaker/git/revision_checkout/revision_checkout_scp.rb new file mode 100644 index 0000000..c920fb4 --- /dev/null +++ b/spec/acceptance/beaker/git/revision_checkout/revision_checkout_scp.rb @@ -0,0 +1,59 @@ +test_name 'C3453 - checkout a revision (ssh protocol, scp syntax)' + +# Globals +repo_name = 'testrepo_revision_checkout' + +hosts.each do |host| + tmpdir = host.tmpdir('vcsrepo') + step 'setup - create repo' do + install_package(host, 'git') + my_root = File.expand_path(File.join(File.dirname(__FILE__), '../../../..')) + scp_to(host, "#{my_root}/acceptance/files/create_git_repo.sh", tmpdir) + on(host, "cd #{tmpdir} && ./create_git_repo.sh") + end + step 'setup - establish ssh keys' do + # create ssh keys + on(host, 'ssh-keygen -q -t rsa -f /root/.ssh/id_rsa -N ""') + + # copy public key to authorized_keys + on(host, 'echo -e "Host *\n\tStrictHostKeyChecking no\n" >> /root/.ssh/config') + on(host, 'chown -R root:root /root/.ssh') + 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 }") + end + + step 'get revision sha from repo' do + on(host, "git --git-dir=#{tmpdir}/testrepo.git rev-list HEAD | tail -1") do |res| + @sha = res.stdout.chomp + end + end + + step 'checkout a revision with puppet (scp syntax)' do + pp = <<-EOS + vcsrepo { "#{tmpdir}/#{repo_name}": + ensure => present, + source => "root@#{host}:#{tmpdir}/testrepo.git", + provider => git, + revision => '#{@sha}', + } + EOS + + apply_manifest_on(host, pp) + apply_manifest_on(host, pp) + end + + step "verify checkout is set to revision #{@sha}" do + on(host, "ls #{tmpdir}/#{repo_name}/.git/") do |res| + fail_test('checkout not found') unless res.stdout.include? "HEAD" + end + + on(host, "cat #{tmpdir}/#{repo_name}/.git/HEAD") do |res| + fail_test('revision not found') unless res.stdout.include? "#{@sha}" + end + end + +end diff --git a/spec/acceptance/beaker/git/shallow_clone/shallow_clone_scp.rb b/spec/acceptance/beaker/git/shallow_clone/shallow_clone_scp.rb new file mode 100644 index 0000000..6837802 --- /dev/null +++ b/spec/acceptance/beaker/git/shallow_clone/shallow_clone_scp.rb @@ -0,0 +1,53 @@ +test_name 'C3478 - shallow clone repo minimal depth = 1 (ssh protocol, scp syntax)' + +# Globals +repo_name = 'testrepo_shallow_clone' + +hosts.each do |host| + tmpdir = host.tmpdir('vcsrepo') + step 'setup - create repo' do + install_package(host, 'git') + my_root = File.expand_path(File.join(File.dirname(__FILE__), '../../../..')) + scp_to(host, "#{my_root}/acceptance/files/create_git_repo.sh", tmpdir) + on(host, "cd #{tmpdir} && ./create_git_repo.sh") + end + step 'setup - establish ssh keys' do + # create ssh keys + on(host, 'ssh-keygen -q -t rsa -f /root/.ssh/id_rsa -N ""') + + # copy public key to authorized_keys + on(host, 'echo -e "Host *\n\tStrictHostKeyChecking no\n" >> /root/.ssh/config') + on(host, 'chown -R root:root /root/.ssh') + 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 }") + end + + step 'shallow clone repo with puppet (scp syntax)' do + pp = <<-EOS + vcsrepo { "#{tmpdir}/#{repo_name}": + ensure => present, + source => "root@#{host}:#{tmpdir}/testrepo.git", + provider => git, + depth => 1, + } + EOS + + apply_manifest_on(host, pp) + apply_manifest_on(host, pp) + end + + step 'verify checkout is shallow and of the correct depth' do + on(host, "ls #{tmpdir}/#{repo_name}/.git/") do |res| + fail_test('shallow not found') unless res.stdout.include? "shallow" + end + + on(host, "wc -l #{tmpdir}/#{repo_name}/.git/shallow") do |res| + fail_test('shallow not found') unless res.stdout.include? "2 #{tmpdir}/#{repo_name}/.git/shallow" + end + end + +end diff --git a/spec/acceptance/beaker/git/tag_checkout/tag_checkout_scp.rb b/spec/acceptance/beaker/git/tag_checkout/tag_checkout_scp.rb new file mode 100644 index 0000000..d602689 --- /dev/null +++ b/spec/acceptance/beaker/git/tag_checkout/tag_checkout_scp.rb @@ -0,0 +1,60 @@ +test_name 'C3446 - checkout a tag (ssh protocol, scp syntax)' + +# Globals +repo_name = 'testrepo_tag_checkout' +tag = '0.0.2' + +hosts.each do |host| + tmpdir = host.tmpdir('vcsrepo') + step 'setup - create repo' do + install_package(host, 'git') + my_root = File.expand_path(File.join(File.dirname(__FILE__), '../../../..')) + scp_to(host, "#{my_root}/acceptance/files/create_git_repo.sh", tmpdir) + on(host, "cd #{tmpdir} && ./create_git_repo.sh") + end + step 'setup - establish ssh keys' do + # create ssh keys + on(host, 'ssh-keygen -q -t rsa -f /root/.ssh/id_rsa -N ""') + + # copy public key to authorized_keys + on(host, 'echo -e "Host *\n\tStrictHostKeyChecking no\n" >> /root/.ssh/config') + on(host, 'chown -R root:root /root/.ssh') + 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 }") + end + + step 'get tag sha from repo' do + on(host, "git --git-dir=#{tmpdir}/testrepo.git rev-list HEAD | tail -1") do |res| + @sha = res.stdout.chomp + end + end + + step 'checkout a tag with puppet (scp syntax)' do + pp = <<-EOS + vcsrepo { "#{tmpdir}/#{repo_name}": + ensure => present, + source => "root@#{host}:#{tmpdir}/testrepo.git", + provider => git, + revision => '#{tag}', + } + EOS + + apply_manifest_on(host, pp) + apply_manifest_on(host, pp) + end + + step "verify checkout out tag is #{tag}" do + on(host, "ls #{tmpdir}/#{repo_name}/.git/") do |res| + fail_test('checkout not found') unless res.stdout.include? "HEAD" + end + + on(host,"git --git-dir=#{tmpdir}/#{repo_name}/.git name-rev HEAD") do |res| + fail_test('tag not found') unless res.stdout.include? "#{tag}" + end + end + +end diff --git a/spec/acceptance/beaker/git/user_checkout/user_checkout_scp.rb b/spec/acceptance/beaker/git/user_checkout/user_checkout_scp.rb new file mode 100644 index 0000000..a4f7261 --- /dev/null +++ b/spec/acceptance/beaker/git/user_checkout/user_checkout_scp.rb @@ -0,0 +1,59 @@ +test_name 'C3460 - checkout as a user (ssh protocol, scp syntax)' + +# Globals +repo_name = 'testrepo_user_checkout' +user = 'myuser' + +hosts.each do |host| + tmpdir = host.tmpdir('vcsrepo') + step 'setup - create repo' do + install_package(host, 'git') + my_root = File.expand_path(File.join(File.dirname(__FILE__), '../../../..')) + scp_to(host, "#{my_root}/acceptance/files/create_git_repo.sh", tmpdir) + on(host, "cd #{tmpdir} && ./create_git_repo.sh") + end + step 'setup - establish ssh keys' do + # create ssh keys + on(host, 'ssh-keygen -q -t rsa -f /root/.ssh/id_rsa -N ""') + + # copy public key to 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 user' do + apply_manifest_on(host, "user { '#{user}': ensure => present, }") + 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, "user { '#{user}': ensure => absent, }") + end + + step 'checkout as a user with puppet (scp syntax)' do + pp = <<-EOS + vcsrepo { "#{tmpdir}/#{repo_name}": + ensure => present, + source => "root@#{host}:#{tmpdir}/testrepo.git", + provider => git, + owner => '#{user}', + } + EOS + + apply_manifest_on(host, pp) + apply_manifest_on(host, pp) + end + + step "verify git checkout is owned by user #{user}" do + on(host, "ls #{tmpdir}/#{repo_name}/.git/") do |res| + fail_test('checkout not found') unless res.stdout.include? "HEAD" + end + + on(host, "stat --format '%U:%G' #{tmpdir}/#{repo_name}/.git/HEAD") do |res| + fail_test('checkout not owned by user') unless res.stdout.include? "#{user}:" + end + end + +end -- cgit v1.2.3 From 8d0d19cc6d7d684b526ddc00172ca1db65207073 Mon Sep 17 00:00:00 2001 From: John Duarte Date: Mon, 12 May 2014 11:02:15 -0700 Subject: Fix root path depth for negative shallow tests --- .../beaker/git/shallow_clone/negative/shallow_clone_file_path.rb | 2 +- spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_http.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'spec/acceptance/beaker/git/shallow_clone') diff --git a/spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_file_path.rb b/spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_file_path.rb index 9cebe45..a2565db 100644 --- a/spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_file_path.rb +++ b/spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_file_path.rb @@ -7,7 +7,7 @@ hosts.each do |host| tmpdir = host.tmpdir('vcsrepo') step 'setup - create repo' do install_package(host, 'git') - my_root = File.expand_path(File.join(File.dirname(__FILE__), '../../../..')) + my_root = File.expand_path(File.join(File.dirname(__FILE__), '../../../../..')) scp_to(host, "#{my_root}/acceptance/files/create_git_repo.sh", tmpdir) on(host, "cd #{tmpdir} && ./create_git_repo.sh") end diff --git a/spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_http.rb b/spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_http.rb index f80239b..a67ec00 100644 --- a/spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_http.rb +++ b/spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_http.rb @@ -7,7 +7,7 @@ hosts.each do |host| tmpdir = host.tmpdir('vcsrepo') step 'setup - create repo' do install_package(host, 'git') - my_root = File.expand_path(File.join(File.dirname(__FILE__), '../../../..')) + my_root = File.expand_path(File.join(File.dirname(__FILE__), '../../../../..')) scp_to(host, "#{my_root}/acceptance/files/create_git_repo.sh", tmpdir) on(host, "cd #{tmpdir} && ./create_git_repo.sh") end -- cgit v1.2.3 From b362b35825638c27a7a19da97bd14bc9d7e133b4 Mon Sep 17 00:00:00 2001 From: John Duarte Date: Mon, 12 May 2014 11:24:16 -0700 Subject: Fix exec test for shallow clone --- .../negative/shallow_clone_exec_depth.rb | 39 ++++++++++++++++++++++ .../negative/shallow_clone_hostile_depth.rb | 39 ---------------------- 2 files changed, 39 insertions(+), 39 deletions(-) create mode 100644 spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_exec_depth.rb delete mode 100644 spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_hostile_depth.rb (limited to 'spec/acceptance/beaker/git/shallow_clone') diff --git a/spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_exec_depth.rb b/spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_exec_depth.rb new file mode 100644 index 0000000..caef5a6 --- /dev/null +++ b/spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_exec_depth.rb @@ -0,0 +1,39 @@ +test_name 'C3608 - shallow clone repo depth hostile input' + +# Globals +repo_name = 'testrepo_shallow_clone' + +hosts.each do |host| + tmpdir = host.tmpdir('vcsrepo') + step 'setup - create repo' do + install_package(host, 'git') + my_root = File.expand_path(File.join(File.dirname(__FILE__), '../../../../..')) + scp_to(host, "#{my_root}/acceptance/files/create_git_repo.sh", tmpdir) + on(host, "cd #{tmpdir} && ./create_git_repo.sh") + end + + teardown do + on(host, "rm -fr #{tmpdir}") + end + + step 'shallow clone repo with puppet (bad input ignored, full clone checkedout)' do + pp = <<-EOS + vcsrepo { "#{tmpdir}/#{repo_name}": + ensure => present, + source => "file://#{tmpdir}/testrepo.git", + provider => git, + depth => "exec 'rm -rf /tmp'", + } + EOS + + apply_manifest_on(host, pp) + apply_manifest_on(host, pp) + end + + step 'verify checkout is NOT shallow' do + on(host, "ls #{tmpdir}/#{repo_name}/.git/") do |res| + fail_test('shallow not found') if res.stdout.include? "shallow" + end + end + +end diff --git a/spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_hostile_depth.rb b/spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_hostile_depth.rb deleted file mode 100644 index 0a4b467..0000000 --- a/spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_hostile_depth.rb +++ /dev/null @@ -1,39 +0,0 @@ -test_name 'C3608 - shallow clone repo depth hostile input' - -# Globals -repo_name = 'testrepo_shallow_clone' - -hosts.each do |host| - tmpdir = host.tmpdir('vcsrepo') - step 'setup - create repo' do - install_package(host, 'git') - my_root = File.expand_path(File.join(File.dirname(__FILE__), '../../../../..')) - scp_to(host, "#{my_root}/acceptance/files/create_git_repo.sh", tmpdir) - on(host, "cd #{tmpdir} && ./create_git_repo.sh") - end - - teardown do - on(host, "rm -fr #{tmpdir}") - end - - step 'shallow clone repo with puppet (bad input ignored, full clone checkedout)' do - pp = <<-EOS - vcsrepo { "#{tmpdir}/#{repo_name}": - ensure => present, - source => "file://#{tmpdir}/testrepo.git", - provider => git, - depth => 'rm -rf /tmp', - } - EOS - - apply_manifest_on(host, pp) - apply_manifest_on(host, pp) - end - - step 'verify checkout is NOT shallow' do - on(host, "ls #{tmpdir}/#{repo_name}/.git/") do |res| - fail_test('shallow not found') if res.stdout.include? "shallow" - end - end - -end -- cgit v1.2.3 From 97e64b52f63f3dd673dfa2fe92c71d4d9ddbcbc7 Mon Sep 17 00:00:00 2001 From: John Duarte Date: Thu, 15 May 2014 11:43:29 -0700 Subject: Add conditional ruby path based on pe --- spec/acceptance/beaker/git/basic_auth/basic_auth_checkout_http.rb | 5 +++-- spec/acceptance/beaker/git/basic_auth/basic_auth_checkout_https.rb | 5 +++-- spec/acceptance/beaker/git/branch_checkout/branch_checkout_http.rb | 5 +++-- spec/acceptance/beaker/git/branch_checkout/branch_checkout_https.rb | 5 +++-- spec/acceptance/beaker/git/group_checkout/group_checkout_http.rb | 5 +++-- spec/acceptance/beaker/git/group_checkout/group_checkout_https.rb | 5 +++-- .../beaker/git/revision_checkout/revision_checkout_http.rb | 5 +++-- .../beaker/git/revision_checkout/revision_checkout_https.rb | 5 +++-- .../beaker/git/shallow_clone/negative/shallow_clone_http.rb | 5 +++-- spec/acceptance/beaker/git/shallow_clone/shallow_clone_https.rb | 5 +++-- spec/acceptance/beaker/git/tag_checkout/tag_checkout_http.rb | 5 +++-- spec/acceptance/beaker/git/tag_checkout/tag_checkout_https.rb | 5 +++-- spec/acceptance/beaker/git/user_checkout/user_checkout_http.rb | 5 +++-- spec/acceptance/beaker/git/user_checkout/user_checkout_https.rb | 5 +++-- 14 files changed, 42 insertions(+), 28 deletions(-) (limited to 'spec/acceptance/beaker/git/shallow_clone') diff --git a/spec/acceptance/beaker/git/basic_auth/basic_auth_checkout_http.rb b/spec/acceptance/beaker/git/basic_auth/basic_auth_checkout_http.rb index d43ae0a..f2486cd 100644 --- a/spec/acceptance/beaker/git/basic_auth/basic_auth_checkout_http.rb +++ b/spec/acceptance/beaker/git/basic_auth/basic_auth_checkout_http.rb @@ -7,6 +7,7 @@ password = 'bar' http_server_script = 'basic_auth_http_daemon.rb' hosts.each do |host| + ruby = '/opt/puppet/bin/ruby' if host.is_pe? || 'ruby' tmpdir = host.tmpdir('vcsrepo') step 'setup - create repo' do install_package(host, 'git') @@ -34,12 +35,12 @@ hosts.each do |host| server.start EOF create_remote_file(host, "#{tmpdir}/#{http_server_script}", script) - on(host, "ruby #{tmpdir}/#{http_server_script}") + on(host, "#{ruby} #{tmpdir}/#{http_server_script} &") end teardown do on(host, "rm -fr #{tmpdir}") - on(host, "ps ax | grep 'ruby #{tmpdir}/#{http_server_script}' | grep -v grep | awk '{print \"kill -9 \" $1}' | sh") + on(host, "ps ax | grep '#{ruby} #{tmpdir}/#{http_server_script}' | grep -v grep | awk '{print \"kill -9 \" $1}' | sh") end step 'checkout with puppet using basic auth' do diff --git a/spec/acceptance/beaker/git/basic_auth/basic_auth_checkout_https.rb b/spec/acceptance/beaker/git/basic_auth/basic_auth_checkout_https.rb index f033d22..67a6f73 100644 --- a/spec/acceptance/beaker/git/basic_auth/basic_auth_checkout_https.rb +++ b/spec/acceptance/beaker/git/basic_auth/basic_auth_checkout_https.rb @@ -7,6 +7,7 @@ password = 'bar' http_server_script = 'basic_auth_https_daemon.rb' hosts.each do |host| + ruby = '/opt/puppet/bin/ruby' if host.is_pe? || 'ruby' tmpdir = host.tmpdir('vcsrepo') step 'setup - create repo' do install_package(host, 'git') @@ -39,12 +40,12 @@ hosts.each do |host| server.start EOF create_remote_file(host, "#{tmpdir}/#{http_server_script}", script) - on(host, "ruby #{tmpdir}/#{http_server_script}") + on(host, "#{ruby} #{tmpdir}/#{http_server_script}") end teardown do on(host, "rm -fr #{tmpdir}") - on(host, "ps ax | grep 'ruby #{tmpdir}/#{http_server_script}' | grep -v grep | awk '{print \"kill -9 \" $1}' | sh") + on(host, "ps ax | grep '#{ruby} #{tmpdir}/#{http_server_script}' | grep -v grep | awk '{print \"kill -9 \" $1}' | sh") end step 'checkout with puppet using basic auth' do diff --git a/spec/acceptance/beaker/git/branch_checkout/branch_checkout_http.rb b/spec/acceptance/beaker/git/branch_checkout/branch_checkout_http.rb index 151d801..9fea700 100644 --- a/spec/acceptance/beaker/git/branch_checkout/branch_checkout_http.rb +++ b/spec/acceptance/beaker/git/branch_checkout/branch_checkout_http.rb @@ -5,6 +5,7 @@ repo_name = 'testrepo_branch_checkout' branch = 'a_branch' hosts.each do |host| + ruby = '/opt/puppet/bin/ruby' if host.is_pe? || 'ruby' tmpdir = host.tmpdir('vcsrepo') step 'setup - create repo' do install_package(host, 'git') @@ -21,12 +22,12 @@ hosts.each do |host| server.start EOF create_remote_file(host, '/tmp/http_daemon.rb', http_daemon) - on(host, "ruby /tmp/http_daemon.rb") + on(host, "#{ruby} /tmp/http_daemon.rb") 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') + on(host, 'ps ax | grep "#{ruby} /tmp/http_daemon.rb" | grep -v grep | awk \'{print "kill -9 " $1}\' | sh') end step 'checkout a branch with puppet' do diff --git a/spec/acceptance/beaker/git/branch_checkout/branch_checkout_https.rb b/spec/acceptance/beaker/git/branch_checkout/branch_checkout_https.rb index 273f5aa..4d6a4ab 100644 --- a/spec/acceptance/beaker/git/branch_checkout/branch_checkout_https.rb +++ b/spec/acceptance/beaker/git/branch_checkout/branch_checkout_https.rb @@ -5,6 +5,7 @@ repo_name = 'testrepo_branch_checkout' branch = 'a_branch' hosts.each do |host| + ruby = '/opt/puppet/bin/ruby' if host.is_pe? || 'ruby' tmpdir = host.tmpdir('vcsrepo') step 'setup - create repo' do install_package(host, 'git') @@ -28,12 +29,12 @@ hosts.each do |host| server.start EOF create_remote_file(host, '/tmp/https_daemon.rb', https_daemon) - #on(host, "ruby /tmp/https_daemon.rb") + #on(host, "#{ruby} /tmp/https_daemon.rb") 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') + on(host, 'ps ax | grep "#{ruby} /tmp/https_daemon.rb" | grep -v grep | awk \'{print "kill -9 " $1}\' | sh') end step 'checkout a branch with puppet' 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 5c05baa..4888bd2 100644 --- a/spec/acceptance/beaker/git/group_checkout/group_checkout_http.rb +++ b/spec/acceptance/beaker/git/group_checkout/group_checkout_http.rb @@ -5,6 +5,7 @@ repo_name = 'testrepo_group_checkout' group = 'mygroup' hosts.each do |host| + ruby = '/opt/puppet/bin/ruby' if host.is_pe? || 'ruby' tmpdir = host.tmpdir('vcsrepo') step 'setup - create repo' do install_package(host, 'git') @@ -21,7 +22,7 @@ hosts.each do |host| server.start EOF create_remote_file(host, '/tmp/http_daemon.rb', http_daemon) - on(host, "ruby /tmp/http_daemon.rb") + on(host, "#{ruby} /tmp/http_daemon.rb") end step 'setup - create group' do @@ -30,7 +31,7 @@ hosts.each do |host| 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') + 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, }") end 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 4551aee..3a72cc8 100644 --- a/spec/acceptance/beaker/git/group_checkout/group_checkout_https.rb +++ b/spec/acceptance/beaker/git/group_checkout/group_checkout_https.rb @@ -5,6 +5,7 @@ repo_name = 'testrepo_group_checkout' group = 'mygroup' hosts.each do |host| + ruby = '/opt/puppet/bin/ruby' if host.is_pe? || 'ruby' tmpdir = host.tmpdir('vcsrepo') step 'setup - create repo' do install_package(host, 'git') @@ -28,7 +29,7 @@ hosts.each do |host| server.start EOF create_remote_file(host, '/tmp/https_daemon.rb', https_daemon) - #on(host, "ruby /tmp/https_daemon.rb") + #on(host, "#{ruby} /tmp/https_daemon.rb") end step 'setup - create group' do @@ -37,7 +38,7 @@ hosts.each do |host| 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') + 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, }") end diff --git a/spec/acceptance/beaker/git/revision_checkout/revision_checkout_http.rb b/spec/acceptance/beaker/git/revision_checkout/revision_checkout_http.rb index 40db6c9..5f5d9e5 100644 --- a/spec/acceptance/beaker/git/revision_checkout/revision_checkout_http.rb +++ b/spec/acceptance/beaker/git/revision_checkout/revision_checkout_http.rb @@ -4,6 +4,7 @@ test_name 'C3455 - checkout a revision (http protocol)' repo_name = 'testrepo_revision_checkout' hosts.each do |host| + ruby = '/opt/puppet/bin/ruby' if host.is_pe? || 'ruby' tmpdir = host.tmpdir('vcsrepo') step 'setup - create repo' do install_package(host, 'git') @@ -20,12 +21,12 @@ hosts.each do |host| server.start EOF create_remote_file(host, '/tmp/http_daemon.rb', http_daemon) - on(host, "ruby /tmp/http_daemon.rb") + on(host, "#{ruby} /tmp/http_daemon.rb") 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') + on(host, 'ps ax | grep "#{ruby} /tmp/http_daemon.rb" | grep -v grep | awk \'{print "kill -9 " $1}\' | sh') end step 'get revision sha from repo' do diff --git a/spec/acceptance/beaker/git/revision_checkout/revision_checkout_https.rb b/spec/acceptance/beaker/git/revision_checkout/revision_checkout_https.rb index dc3dc7f..0a935aa 100644 --- a/spec/acceptance/beaker/git/revision_checkout/revision_checkout_https.rb +++ b/spec/acceptance/beaker/git/revision_checkout/revision_checkout_https.rb @@ -4,6 +4,7 @@ test_name 'C3456 - checkout a revision (https protocol)' repo_name = 'testrepo_revision_checkout' hosts.each do |host| + ruby = '/opt/puppet/bin/ruby' if host.is_pe? || 'ruby' tmpdir = host.tmpdir('vcsrepo') step 'setup - create repo' do install_package(host, 'git') @@ -27,12 +28,12 @@ hosts.each do |host| server.start EOF create_remote_file(host, '/tmp/https_daemon.rb', https_daemon) - #on(host, "ruby /tmp/https_daemon.rb") + #on(host, "#{ruby} /tmp/https_daemon.rb") 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') + on(host, 'ps ax | grep "#{ruby} /tmp/https_daemon.rb" | grep -v grep | awk \'{print "kill -9 " $1}\' | sh') end step 'get revision sha from repo' do diff --git a/spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_http.rb b/spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_http.rb index a67ec00..4c43be1 100644 --- a/spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_http.rb +++ b/spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_http.rb @@ -4,6 +4,7 @@ test_name 'C3479 - shallow clone repo minimal depth = 1 (http protocol)' repo_name = 'testrepo_shallow_clone' hosts.each do |host| + ruby = '/opt/puppet/bin/ruby' if host.is_pe? || 'ruby' tmpdir = host.tmpdir('vcsrepo') step 'setup - create repo' do install_package(host, 'git') @@ -20,12 +21,12 @@ hosts.each do |host| server.start EOF create_remote_file(host, '/tmp/http_daemon.rb', http_daemon) - on(host, "ruby /tmp/http_daemon.rb") + on(host, "#{ruby} /tmp/http_daemon.rb") 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') + on(host, 'ps ax | grep "#{ruby} /tmp/http_daemon.rb" | grep -v grep | awk \'{print "kill -9 " $1}\' | sh') end step 'shallow clone repo with puppet' do diff --git a/spec/acceptance/beaker/git/shallow_clone/shallow_clone_https.rb b/spec/acceptance/beaker/git/shallow_clone/shallow_clone_https.rb index e016e55..1a34521 100644 --- a/spec/acceptance/beaker/git/shallow_clone/shallow_clone_https.rb +++ b/spec/acceptance/beaker/git/shallow_clone/shallow_clone_https.rb @@ -4,6 +4,7 @@ test_name 'C3480 - shallow clone repo minimal depth = 1 (https protocol)' repo_name = 'testrepo_shallow_clone' hosts.each do |host| + ruby = '/opt/puppet/bin/ruby' if host.is_pe? || 'ruby' tmpdir = host.tmpdir('vcsrepo') step 'setup - create repo' do install_package(host, 'git') @@ -27,12 +28,12 @@ hosts.each do |host| server.start EOF create_remote_file(host, '/tmp/https_daemon.rb', https_daemon) - #on(host, "ruby /tmp/https_daemon.rb") + #on(host, "#{ruby} /tmp/https_daemon.rb") 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') + on(host, 'ps ax | grep "#{ruby} /tmp/https_daemon.rb" | grep -v grep | awk \'{print "kill -9 " $1}\' | sh') end step 'shallow clone repo with puppet' do diff --git a/spec/acceptance/beaker/git/tag_checkout/tag_checkout_http.rb b/spec/acceptance/beaker/git/tag_checkout/tag_checkout_http.rb index 3a6d33f..f2f721a 100644 --- a/spec/acceptance/beaker/git/tag_checkout/tag_checkout_http.rb +++ b/spec/acceptance/beaker/git/tag_checkout/tag_checkout_http.rb @@ -5,6 +5,7 @@ repo_name = 'testrepo_tag_checkout' tag = '0.0.2' hosts.each do |host| + ruby = '/opt/puppet/bin/ruby' if host.is_pe? || 'ruby' tmpdir = host.tmpdir('vcsrepo') step 'setup - create repo' do install_package(host, 'git') @@ -21,12 +22,12 @@ hosts.each do |host| server.start EOF create_remote_file(host, '/tmp/http_daemon.rb', http_daemon) - on(host, "ruby /tmp/http_daemon.rb") + on(host, "#{ruby} /tmp/http_daemon.rb") 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') + on(host, 'ps ax | grep "#{ruby} /tmp/http_daemon.rb" | grep -v grep | awk \'{print "kill -9 " $1}\' | sh') end step 'get tag sha from repo' do diff --git a/spec/acceptance/beaker/git/tag_checkout/tag_checkout_https.rb b/spec/acceptance/beaker/git/tag_checkout/tag_checkout_https.rb index b277d6d..fdfa02c 100644 --- a/spec/acceptance/beaker/git/tag_checkout/tag_checkout_https.rb +++ b/spec/acceptance/beaker/git/tag_checkout/tag_checkout_https.rb @@ -5,6 +5,7 @@ repo_name = 'testrepo_tag_checkout' tag = '0.0.2' hosts.each do |host| + ruby = '/opt/puppet/bin/ruby' if host.is_pe? || 'ruby' tmpdir = host.tmpdir('vcsrepo') step 'setup - create repo' do install_package(host, 'git') @@ -28,12 +29,12 @@ hosts.each do |host| server.start EOF create_remote_file(host, '/tmp/https_daemon.rb', https_daemon) - #on(host, "ruby /tmp/https_daemon.rb") + #on(host, "#{ruby} /tmp/https_daemon.rb") 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') + on(host, 'ps ax | grep "#{ruby} /tmp/https_daemon.rb" | grep -v grep | awk \'{print "kill -9 " $1}\' | sh') end step 'get tag sha from repo' do diff --git a/spec/acceptance/beaker/git/user_checkout/user_checkout_http.rb b/spec/acceptance/beaker/git/user_checkout/user_checkout_http.rb index 6faad95..379425b 100644 --- a/spec/acceptance/beaker/git/user_checkout/user_checkout_http.rb +++ b/spec/acceptance/beaker/git/user_checkout/user_checkout_http.rb @@ -5,6 +5,7 @@ repo_name = 'testrepo_user_checkout' user = 'myuser' hosts.each do |host| + ruby = '/opt/puppet/bin/ruby' if host.is_pe? || 'ruby' tmpdir = host.tmpdir('vcsrepo') step 'setup - create repo' do install_package(host, 'git') @@ -21,7 +22,7 @@ hosts.each do |host| server.start EOF create_remote_file(host, '/tmp/http_daemon.rb', http_daemon) - on(host, "ruby /tmp/http_daemon.rb") + on(host, "#{ruby} /tmp/http_daemon.rb") end step 'setup - create user' do @@ -30,7 +31,7 @@ hosts.each do |host| 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') + on(host, 'ps ax | grep "#{ruby} /tmp/http_daemon.rb" | grep -v grep | awk \'{print "kill -9 " $1}\' | sh') apply_manifest_on(host, "user { '#{user}': ensure => absent, }") end diff --git a/spec/acceptance/beaker/git/user_checkout/user_checkout_https.rb b/spec/acceptance/beaker/git/user_checkout/user_checkout_https.rb index 28a17b8..bd9b498 100644 --- a/spec/acceptance/beaker/git/user_checkout/user_checkout_https.rb +++ b/spec/acceptance/beaker/git/user_checkout/user_checkout_https.rb @@ -5,6 +5,7 @@ repo_name = 'testrepo_user_checkout' user = 'myuser' hosts.each do |host| + ruby = '/opt/puppet/bin/ruby' if host.is_pe? || 'ruby' tmpdir = host.tmpdir('vcsrepo') step 'setup - create repo' do install_package(host, 'git') @@ -28,7 +29,7 @@ hosts.each do |host| server.start EOF create_remote_file(host, '/tmp/https_daemon.rb', https_daemon) - #on(host, "ruby /tmp/https_daemon.rb") + #on(host, "#{ruby} /tmp/https_daemon.rb") end step 'setup - create user' do @@ -37,7 +38,7 @@ hosts.each do |host| 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') + on(host, 'ps ax | grep "#{ruby} /tmp/https_daemon.rb" | grep -v grep | awk \'{print "kill -9 " $1}\' | sh') apply_manifest_on(host, "user { '#{user}': ensure => absent, }") end -- cgit v1.2.3 From 0406d627bcd7e24d181944b4d2c70a7b6e50ccf5 Mon Sep 17 00:00:00 2001 From: John Duarte Date: Fri, 16 May 2014 14:58:17 -0700 Subject: Fix calls to ruby --- spec/acceptance/beaker/git/basic_auth/basic_auth_checkout_https.rb | 2 +- spec/acceptance/beaker/git/branch_checkout/branch_checkout_http.rb | 4 ++-- spec/acceptance/beaker/git/branch_checkout/branch_checkout_https.rb | 4 ++-- spec/acceptance/beaker/git/group_checkout/group_checkout_http.rb | 4 ++-- spec/acceptance/beaker/git/group_checkout/group_checkout_https.rb | 4 ++-- .../acceptance/beaker/git/revision_checkout/revision_checkout_http.rb | 4 ++-- .../beaker/git/revision_checkout/revision_checkout_https.rb | 4 ++-- .../beaker/git/shallow_clone/negative/shallow_clone_http.rb | 2 +- spec/acceptance/beaker/git/shallow_clone/shallow_clone_https.rb | 2 +- spec/acceptance/beaker/git/tag_checkout/tag_checkout_http.rb | 4 ++-- spec/acceptance/beaker/git/tag_checkout/tag_checkout_https.rb | 4 ++-- spec/acceptance/beaker/git/user_checkout/user_checkout_http.rb | 4 ++-- spec/acceptance/beaker/git/user_checkout/user_checkout_https.rb | 4 ++-- 13 files changed, 23 insertions(+), 23 deletions(-) (limited to 'spec/acceptance/beaker/git/shallow_clone') diff --git a/spec/acceptance/beaker/git/basic_auth/basic_auth_checkout_https.rb b/spec/acceptance/beaker/git/basic_auth/basic_auth_checkout_https.rb index 67a6f73..67a7ed9 100644 --- a/spec/acceptance/beaker/git/basic_auth/basic_auth_checkout_https.rb +++ b/spec/acceptance/beaker/git/basic_auth/basic_auth_checkout_https.rb @@ -7,7 +7,7 @@ password = 'bar' http_server_script = 'basic_auth_https_daemon.rb' hosts.each do |host| - ruby = '/opt/puppet/bin/ruby' if host.is_pe? || 'ruby' + ruby = (host.is_pe? && '/opt/puppet/bin/ruby') || 'ruby' tmpdir = host.tmpdir('vcsrepo') step 'setup - create repo' do install_package(host, 'git') diff --git a/spec/acceptance/beaker/git/branch_checkout/branch_checkout_http.rb b/spec/acceptance/beaker/git/branch_checkout/branch_checkout_http.rb index 9fea700..6da34e8 100644 --- a/spec/acceptance/beaker/git/branch_checkout/branch_checkout_http.rb +++ b/spec/acceptance/beaker/git/branch_checkout/branch_checkout_http.rb @@ -5,7 +5,7 @@ repo_name = 'testrepo_branch_checkout' branch = 'a_branch' hosts.each do |host| - ruby = '/opt/puppet/bin/ruby' if host.is_pe? || 'ruby' + ruby = (host.is_pe? && '/opt/puppet/bin/ruby') || 'ruby' tmpdir = host.tmpdir('vcsrepo') step 'setup - create repo' do install_package(host, 'git') @@ -27,7 +27,7 @@ hosts.each do |host| 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') + on(host, "ps ax | grep '#{ruby} /tmp/http_daemon.rb' | grep -v grep | awk '{print \"kill -9 \" $1}' | sh") end step 'checkout a branch with puppet' do diff --git a/spec/acceptance/beaker/git/branch_checkout/branch_checkout_https.rb b/spec/acceptance/beaker/git/branch_checkout/branch_checkout_https.rb index 4d6a4ab..6ebd9fd 100644 --- a/spec/acceptance/beaker/git/branch_checkout/branch_checkout_https.rb +++ b/spec/acceptance/beaker/git/branch_checkout/branch_checkout_https.rb @@ -5,7 +5,7 @@ repo_name = 'testrepo_branch_checkout' branch = 'a_branch' hosts.each do |host| - ruby = '/opt/puppet/bin/ruby' if host.is_pe? || 'ruby' + ruby = (host.is_pe? && '/opt/puppet/bin/ruby') || 'ruby' tmpdir = host.tmpdir('vcsrepo') step 'setup - create repo' do install_package(host, 'git') @@ -34,7 +34,7 @@ hosts.each do |host| 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') + on(host, "ps ax | grep '#{ruby} /tmp/https_daemon.rb' | grep -v grep | awk '{print \"kill -9 \" $1}' | sh") end step 'checkout a branch with puppet' 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 4888bd2..0c86c77 100644 --- a/spec/acceptance/beaker/git/group_checkout/group_checkout_http.rb +++ b/spec/acceptance/beaker/git/group_checkout/group_checkout_http.rb @@ -5,7 +5,7 @@ repo_name = 'testrepo_group_checkout' group = 'mygroup' hosts.each do |host| - ruby = '/opt/puppet/bin/ruby' if host.is_pe? || 'ruby' + ruby = (host.is_pe? && '/opt/puppet/bin/ruby') || 'ruby' tmpdir = host.tmpdir('vcsrepo') step 'setup - create repo' do install_package(host, 'git') @@ -31,7 +31,7 @@ hosts.each do |host| 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') + 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, }") end 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 3a72cc8..0bcbd97 100644 --- a/spec/acceptance/beaker/git/group_checkout/group_checkout_https.rb +++ b/spec/acceptance/beaker/git/group_checkout/group_checkout_https.rb @@ -5,7 +5,7 @@ repo_name = 'testrepo_group_checkout' group = 'mygroup' hosts.each do |host| - ruby = '/opt/puppet/bin/ruby' if host.is_pe? || 'ruby' + ruby = (host.is_pe? && '/opt/puppet/bin/ruby') || 'ruby' tmpdir = host.tmpdir('vcsrepo') step 'setup - create repo' do install_package(host, 'git') @@ -38,7 +38,7 @@ hosts.each do |host| 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') + 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, }") end diff --git a/spec/acceptance/beaker/git/revision_checkout/revision_checkout_http.rb b/spec/acceptance/beaker/git/revision_checkout/revision_checkout_http.rb index 5f5d9e5..9755d8e 100644 --- a/spec/acceptance/beaker/git/revision_checkout/revision_checkout_http.rb +++ b/spec/acceptance/beaker/git/revision_checkout/revision_checkout_http.rb @@ -4,7 +4,7 @@ test_name 'C3455 - checkout a revision (http protocol)' repo_name = 'testrepo_revision_checkout' hosts.each do |host| - ruby = '/opt/puppet/bin/ruby' if host.is_pe? || 'ruby' + ruby = (host.is_pe? && '/opt/puppet/bin/ruby') || 'ruby' tmpdir = host.tmpdir('vcsrepo') step 'setup - create repo' do install_package(host, 'git') @@ -26,7 +26,7 @@ hosts.each do |host| 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') + on(host, "ps ax | grep '#{ruby} /tmp/http_daemon.rb' | grep -v grep | awk '{print \"kill -9 \" $1}' | sh") end step 'get revision sha from repo' do diff --git a/spec/acceptance/beaker/git/revision_checkout/revision_checkout_https.rb b/spec/acceptance/beaker/git/revision_checkout/revision_checkout_https.rb index 0a935aa..16b5145 100644 --- a/spec/acceptance/beaker/git/revision_checkout/revision_checkout_https.rb +++ b/spec/acceptance/beaker/git/revision_checkout/revision_checkout_https.rb @@ -4,7 +4,7 @@ test_name 'C3456 - checkout a revision (https protocol)' repo_name = 'testrepo_revision_checkout' hosts.each do |host| - ruby = '/opt/puppet/bin/ruby' if host.is_pe? || 'ruby' + ruby = (host.is_pe? && '/opt/puppet/bin/ruby') || 'ruby' tmpdir = host.tmpdir('vcsrepo') step 'setup - create repo' do install_package(host, 'git') @@ -33,7 +33,7 @@ hosts.each do |host| 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') + on(host, "ps ax | grep '#{ruby} /tmp/https_daemon.rb' | grep -v grep | awk '{print \"kill -9 \" $1}' | sh") end step 'get revision sha from repo' do diff --git a/spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_http.rb b/spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_http.rb index 4c43be1..ecd51ad 100644 --- a/spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_http.rb +++ b/spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_http.rb @@ -4,7 +4,7 @@ test_name 'C3479 - shallow clone repo minimal depth = 1 (http protocol)' repo_name = 'testrepo_shallow_clone' hosts.each do |host| - ruby = '/opt/puppet/bin/ruby' if host.is_pe? || 'ruby' + ruby = (host.is_pe? && '/opt/puppet/bin/ruby') || 'ruby' tmpdir = host.tmpdir('vcsrepo') step 'setup - create repo' do install_package(host, 'git') diff --git a/spec/acceptance/beaker/git/shallow_clone/shallow_clone_https.rb b/spec/acceptance/beaker/git/shallow_clone/shallow_clone_https.rb index 1a34521..6254865 100644 --- a/spec/acceptance/beaker/git/shallow_clone/shallow_clone_https.rb +++ b/spec/acceptance/beaker/git/shallow_clone/shallow_clone_https.rb @@ -4,7 +4,7 @@ test_name 'C3480 - shallow clone repo minimal depth = 1 (https protocol)' repo_name = 'testrepo_shallow_clone' hosts.each do |host| - ruby = '/opt/puppet/bin/ruby' if host.is_pe? || 'ruby' + ruby = (host.is_pe? && '/opt/puppet/bin/ruby') || 'ruby' tmpdir = host.tmpdir('vcsrepo') step 'setup - create repo' do install_package(host, 'git') diff --git a/spec/acceptance/beaker/git/tag_checkout/tag_checkout_http.rb b/spec/acceptance/beaker/git/tag_checkout/tag_checkout_http.rb index f2f721a..cff6071 100644 --- a/spec/acceptance/beaker/git/tag_checkout/tag_checkout_http.rb +++ b/spec/acceptance/beaker/git/tag_checkout/tag_checkout_http.rb @@ -5,7 +5,7 @@ repo_name = 'testrepo_tag_checkout' tag = '0.0.2' hosts.each do |host| - ruby = '/opt/puppet/bin/ruby' if host.is_pe? || 'ruby' + ruby = (host.is_pe? && '/opt/puppet/bin/ruby') || 'ruby' tmpdir = host.tmpdir('vcsrepo') step 'setup - create repo' do install_package(host, 'git') @@ -27,7 +27,7 @@ hosts.each do |host| 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') + on(host, "ps ax | grep '#{ruby} /tmp/http_daemon.rb' | grep -v grep | awk '{print \"kill -9 \" $1}' | sh") end step 'get tag sha from repo' do diff --git a/spec/acceptance/beaker/git/tag_checkout/tag_checkout_https.rb b/spec/acceptance/beaker/git/tag_checkout/tag_checkout_https.rb index fdfa02c..1e3cc51 100644 --- a/spec/acceptance/beaker/git/tag_checkout/tag_checkout_https.rb +++ b/spec/acceptance/beaker/git/tag_checkout/tag_checkout_https.rb @@ -5,7 +5,7 @@ repo_name = 'testrepo_tag_checkout' tag = '0.0.2' hosts.each do |host| - ruby = '/opt/puppet/bin/ruby' if host.is_pe? || 'ruby' + ruby = (host.is_pe? && '/opt/puppet/bin/ruby') || 'ruby' tmpdir = host.tmpdir('vcsrepo') step 'setup - create repo' do install_package(host, 'git') @@ -34,7 +34,7 @@ hosts.each do |host| 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') + on(host, "ps ax | grep '#{ruby} /tmp/https_daemon.rb' | grep -v grep | awk '{print \"kill -9 \" $1}' | sh") end step 'get tag sha from repo' do diff --git a/spec/acceptance/beaker/git/user_checkout/user_checkout_http.rb b/spec/acceptance/beaker/git/user_checkout/user_checkout_http.rb index 379425b..07f5c1c 100644 --- a/spec/acceptance/beaker/git/user_checkout/user_checkout_http.rb +++ b/spec/acceptance/beaker/git/user_checkout/user_checkout_http.rb @@ -5,7 +5,7 @@ repo_name = 'testrepo_user_checkout' user = 'myuser' hosts.each do |host| - ruby = '/opt/puppet/bin/ruby' if host.is_pe? || 'ruby' + ruby = (host.is_pe? && '/opt/puppet/bin/ruby') || 'ruby' tmpdir = host.tmpdir('vcsrepo') step 'setup - create repo' do install_package(host, 'git') @@ -31,7 +31,7 @@ hosts.each do |host| 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') + on(host, "ps ax | grep '#{ruby} /tmp/http_daemon.rb' | grep -v grep | awk '{print \"kill -9 \" $1}' | sh") apply_manifest_on(host, "user { '#{user}': ensure => absent, }") end diff --git a/spec/acceptance/beaker/git/user_checkout/user_checkout_https.rb b/spec/acceptance/beaker/git/user_checkout/user_checkout_https.rb index bd9b498..7187586 100644 --- a/spec/acceptance/beaker/git/user_checkout/user_checkout_https.rb +++ b/spec/acceptance/beaker/git/user_checkout/user_checkout_https.rb @@ -5,7 +5,7 @@ repo_name = 'testrepo_user_checkout' user = 'myuser' hosts.each do |host| - ruby = '/opt/puppet/bin/ruby' if host.is_pe? || 'ruby' + ruby = (host.is_pe? && '/opt/puppet/bin/ruby') || 'ruby' tmpdir = host.tmpdir('vcsrepo') step 'setup - create repo' do install_package(host, 'git') @@ -38,7 +38,7 @@ hosts.each do |host| 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') + on(host, "ps ax | grep '#{ruby} /tmp/https_daemon.rb' | grep -v grep | awk '{print \"kill -9 \" $1}' | sh") apply_manifest_on(host, "user { '#{user}': ensure => absent, }") end -- cgit v1.2.3 From a50c949a695e04a0b5927d816c3e25ba46745c19 Mon Sep 17 00:00:00 2001 From: John Duarte Date: Fri, 16 May 2014 14:59:19 -0700 Subject: Skip tests for unsupported features --- spec/acceptance/beaker/git/basic_auth/basic_auth_checkout_https.rb | 1 + .../beaker/git/shallow_clone/negative/shallow_clone_file_path.rb | 1 + spec/acceptance/beaker/git/shallow_clone/shallow_clone_https.rb | 1 + 3 files changed, 3 insertions(+) (limited to 'spec/acceptance/beaker/git/shallow_clone') diff --git a/spec/acceptance/beaker/git/basic_auth/basic_auth_checkout_https.rb b/spec/acceptance/beaker/git/basic_auth/basic_auth_checkout_https.rb index 67a7ed9..32e3ef4 100644 --- a/spec/acceptance/beaker/git/basic_auth/basic_auth_checkout_https.rb +++ b/spec/acceptance/beaker/git/basic_auth/basic_auth_checkout_https.rb @@ -1,4 +1,5 @@ test_name 'C3493 - checkout with basic auth (https protocol)' +skip_test 'waiting for CA trust solution' # Globals repo_name = 'testrepo_checkout' diff --git a/spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_file_path.rb b/spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_file_path.rb index a2565db..c336842 100644 --- a/spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_file_path.rb +++ b/spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_file_path.rb @@ -1,4 +1,5 @@ test_name 'C3475 - shallow clone repo minimal depth = 1 (file path protocol)' +skip_test 'Not currently supported. See FM-1285' # Globals repo_name = 'testrepo_shallow_clone' diff --git a/spec/acceptance/beaker/git/shallow_clone/shallow_clone_https.rb b/spec/acceptance/beaker/git/shallow_clone/shallow_clone_https.rb index 6254865..9220e27 100644 --- a/spec/acceptance/beaker/git/shallow_clone/shallow_clone_https.rb +++ b/spec/acceptance/beaker/git/shallow_clone/shallow_clone_https.rb @@ -1,4 +1,5 @@ test_name 'C3480 - shallow clone repo minimal depth = 1 (https protocol)' +skip_test 'Not currently supported. See FM-1286' # Globals repo_name = 'testrepo_shallow_clone' -- cgit v1.2.3 From e42f4047c086a79fa0286dc9e46cdfe187a18320 Mon Sep 17 00:00:00 2001 From: John Duarte Date: Sun, 18 May 2014 17:26:20 -0700 Subject: Fix git daemon call --- .../beaker/git/basic_auth/negative/basic_auth_checkout_git.rb | 2 +- spec/acceptance/beaker/git/branch_checkout/branch_checkout_git.rb | 2 +- spec/acceptance/beaker/git/group_checkout/group_checkout_git.rb | 2 +- spec/acceptance/beaker/git/revision_checkout/revision_checkout_git.rb | 2 +- spec/acceptance/beaker/git/shallow_clone/shallow_clone_git.rb | 2 +- spec/acceptance/beaker/git/tag_checkout/tag_checkout_git.rb | 2 +- spec/acceptance/beaker/git/user_checkout/user_checkout_git.rb | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) (limited to 'spec/acceptance/beaker/git/shallow_clone') diff --git a/spec/acceptance/beaker/git/basic_auth/negative/basic_auth_checkout_git.rb b/spec/acceptance/beaker/git/basic_auth/negative/basic_auth_checkout_git.rb index 9b0f190..60a4fc2 100644 --- a/spec/acceptance/beaker/git/basic_auth/negative/basic_auth_checkout_git.rb +++ b/spec/acceptance/beaker/git/basic_auth/negative/basic_auth_checkout_git.rb @@ -17,7 +17,7 @@ hosts.each do |host| step 'setup - start git daemon' do install_package(host, 'git-daemon') - on(host, "nohup git daemon --detach --base-path=/#{tmpdir}") + on(host, "git daemon --base-path=#{tmpdir} --export-all --reuseaddr --verbose --detach") end teardown do diff --git a/spec/acceptance/beaker/git/branch_checkout/branch_checkout_git.rb b/spec/acceptance/beaker/git/branch_checkout/branch_checkout_git.rb index d786ae2..baeb5ec 100644 --- a/spec/acceptance/beaker/git/branch_checkout/branch_checkout_git.rb +++ b/spec/acceptance/beaker/git/branch_checkout/branch_checkout_git.rb @@ -14,7 +14,7 @@ hosts.each do |host| end step 'setup - start git daemon' do install_package(host, 'git-daemon') - on(host, "nohup git daemon --detach --base-path=/#{tmpdir}") + on(host, "git daemon --base-path=#{tmpdir} --export-all --reuseaddr --verbose --detach") end teardown 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 4752e5d..31ef286 100644 --- a/spec/acceptance/beaker/git/group_checkout/group_checkout_git.rb +++ b/spec/acceptance/beaker/git/group_checkout/group_checkout_git.rb @@ -14,7 +14,7 @@ hosts.each do |host| end step 'setup - start git daemon' do install_package(host, 'git-daemon') - on(host, "nohup git daemon --detach --base-path=/#{tmpdir}") + on(host, "git daemon --base-path=#{tmpdir} --export-all --reuseaddr --verbose --detach") end step 'setup - create group' do diff --git a/spec/acceptance/beaker/git/revision_checkout/revision_checkout_git.rb b/spec/acceptance/beaker/git/revision_checkout/revision_checkout_git.rb index 6979df3..3fa6cbd 100644 --- a/spec/acceptance/beaker/git/revision_checkout/revision_checkout_git.rb +++ b/spec/acceptance/beaker/git/revision_checkout/revision_checkout_git.rb @@ -13,7 +13,7 @@ hosts.each do |host| end step 'setup - start git daemon' do install_package(host, 'git-daemon') - on(host, "nohup git daemon --detach --base-path=/#{tmpdir}") + on(host, "git daemon --base-path=#{tmpdir} --export-all --reuseaddr --verbose --detach") end teardown do diff --git a/spec/acceptance/beaker/git/shallow_clone/shallow_clone_git.rb b/spec/acceptance/beaker/git/shallow_clone/shallow_clone_git.rb index 8b3a16a..d7c81fb 100644 --- a/spec/acceptance/beaker/git/shallow_clone/shallow_clone_git.rb +++ b/spec/acceptance/beaker/git/shallow_clone/shallow_clone_git.rb @@ -13,7 +13,7 @@ hosts.each do |host| end step 'setup - start git daemon' do install_package(host, 'git-daemon') - on(host, "nohup git daemon --detach --base-path=/#{tmpdir}") + on(host, "git daemon --base-path=#{tmpdir} --export-all --reuseaddr --verbose --detach") end teardown do diff --git a/spec/acceptance/beaker/git/tag_checkout/tag_checkout_git.rb b/spec/acceptance/beaker/git/tag_checkout/tag_checkout_git.rb index 9ec124d..45a737e 100644 --- a/spec/acceptance/beaker/git/tag_checkout/tag_checkout_git.rb +++ b/spec/acceptance/beaker/git/tag_checkout/tag_checkout_git.rb @@ -14,7 +14,7 @@ hosts.each do |host| end step 'setup - start git daemon' do install_package(host, 'git-daemon') - on(host, "nohup git daemon --detach --base-path=/#{tmpdir}") + on(host, "git daemon --base-path=#{tmpdir} --export-all --reuseaddr --verbose --detach") end teardown do diff --git a/spec/acceptance/beaker/git/user_checkout/user_checkout_git.rb b/spec/acceptance/beaker/git/user_checkout/user_checkout_git.rb index d954a5f..d7504b0 100644 --- a/spec/acceptance/beaker/git/user_checkout/user_checkout_git.rb +++ b/spec/acceptance/beaker/git/user_checkout/user_checkout_git.rb @@ -14,7 +14,7 @@ hosts.each do |host| end step 'setup - start git daemon' do install_package(host, 'git-daemon') - on(host, "nohup git daemon --detach --base-path=/#{tmpdir}") + on(host, "git daemon --base-path=#{tmpdir} --export-all --reuseaddr --verbose --detach") end step 'setup - create user' do -- cgit v1.2.3