diff --git a/acceptance/tests/allow_symlinks_as_config_directories.rb b/acceptance/tests/allow_symlinks_as_config_directories.rb index 1f450fe25..c8c8bbbf3 100644 --- a/acceptance/tests/allow_symlinks_as_config_directories.rb +++ b/acceptance/tests/allow_symlinks_as_config_directories.rb @@ -1,34 +1,30 @@ test_name "Should allow symlinks to directories as configuration directories" +confine :except, :platform => 'windows' agents.each do |agent| - if agent['platform'].include?('windows') - skip_test "Test not supported on this platform" - next - end - step "Create the test confdir with a link to it" confdir = agent.tmpdir('puppet_conf-directory') conflink = agent.tmpfile('puppet_conf-symlink') on agent, "rm -rf #{conflink} #{confdir}" on agent, "mkdir #{confdir}" on agent, "ln -s #{confdir} #{conflink}" create_remote_file agent, "#{confdir}/puppet.conf", < manifest do assert_match("My certname is awesome_certname", stdout) end step "Check that the symlink and confdir are unchanged" on agent, "[ -L #{conflink} ]" on agent, "[ -d #{confdir} ]" on agent, "[ $(readlink #{conflink}) = #{confdir} ]" end diff --git a/acceptance/tests/resource/cron/should_create_cron.rb b/acceptance/tests/resource/cron/should_create_cron.rb index 6a1d5c07c..92e9c6fac 100644 --- a/acceptance/tests/resource/cron/should_create_cron.rb +++ b/acceptance/tests/resource/cron/should_create_cron.rb @@ -1,37 +1,33 @@ test_name "should create cron" +confine :except, :platform => 'windows' tmpuser = "pl#{rand(999999).to_i}" tmpfile = "/tmp/cron-test-#{Time.new.to_i}" create_user = "user { '#{tmpuser}': ensure => present, managehome => false }" delete_user = "user { '#{tmpuser}': ensure => absent, managehome => false }" package_cron = "case $operatingsystem { centos, redhat: {$cron = 'cronie'}\n default: {$cron ='cron'} } package {'cron': name=> $cron, ensure=>present, }" agents.each do |host| - if host['platform'].include?('windows') - skip_test "Test not supported on this platform" - next - end - step "ensure the user exist via puppet" apply_manifest_on host, create_user apply_manifest_on host, package_cron step "apply the resource on the host using puppet resource" on(host, puppet_resource("cron", "crontest", "user=#{tmpuser}", "command=/bin/true", "ensure=present")) do assert_match(/created/, stdout, "Did not create crontab for #{tmpuser} on #{host}") end step "verify that crontab -l contains what you expected" run_cron_on(host, :list, tmpuser) do assert_match(/\* \* \* \* \* \/bin\/true/, stdout, "Incorrect crontab for #{tmpuser} on #{host}") end step "remove the crontab file for that user" run_cron_on(host, :remove, tmpuser) step "remove the user from the system" apply_manifest_on host, delete_user end diff --git a/acceptance/tests/resource/cron/should_match_existing.rb b/acceptance/tests/resource/cron/should_match_existing.rb index e6b50808b..81b480f02 100755 --- a/acceptance/tests/resource/cron/should_match_existing.rb +++ b/acceptance/tests/resource/cron/should_match_existing.rb @@ -1,40 +1,36 @@ test_name "puppet should match existing job" +confine :except, :platform => 'windows' tmpuser = "pl#{rand(999999).to_i}" tmpfile = "/tmp/cron-test-#{Time.new.to_i}" create_user = "user { '#{tmpuser}': ensure => present, managehome => false }" delete_user = "user { '#{tmpuser}': ensure => absent, managehome => false }" package_cron = "case $operatingsystem { centos, redhat: {$cron = 'cronie'}\n default: {$cron ='cron'} } package {'cron': name=> $cron, ensure=>present, }" agents.each do |host| - if host['platform'].include?('windows') - skip_test "Test not supported on this platform" - next - end - step "ensure the user exist via puppet" apply_manifest_on host, create_user apply_manifest_on host, package_cron step "Create the existing cron job by hand..." run_cron_on(host,:add,tmpuser,"* * * * * /bin/true") step "Apply the resource on the host using puppet resource" on(host, puppet_resource("cron", "crontest", "user=#{tmpuser}", "command=/bin/true", "ensure=present")) do assert_match(/present/, stdout, "Failed creating crontab for #{tmpuser} on #{host}") end step "Verify that crontab -l contains what you expected" run_cron_on(host, :list, tmpuser) do assert_match(/\* \* \* \* \* \/bin\/true/, stdout, "Did not find crontab for #{tmpuser} on #{host}") end step "remove the crontab file for that user" run_cron_on(host, :remove, tmpuser) step "remove the user from the system" apply_manifest_on host, delete_user end diff --git a/acceptance/tests/resource/cron/should_remove_cron.rb b/acceptance/tests/resource/cron/should_remove_cron.rb index fa72f5a05..760316ade 100755 --- a/acceptance/tests/resource/cron/should_remove_cron.rb +++ b/acceptance/tests/resource/cron/should_remove_cron.rb @@ -1,40 +1,36 @@ test_name "puppet should remove a crontab entry as expected" +confine :except, :platform => 'windows' tmpuser = "pl#{rand(999999).to_i}" tmpfile = "/tmp/cron-test-#{Time.new.to_i}" create_user = "user { '#{tmpuser}': ensure => present, managehome => false }" delete_user = "user { '#{tmpuser}': ensure => absent, managehome => false }" package_cron = "case $operatingsystem { centos, redhat: {$cron = 'cronie'}\n default: {$cron ='cron'} } package {'cron': name=> $cron, ensure=>present, }" agents.each do |host| - if host['platform'].include?('windows') - skip_test "Test not supported on this platform" - next - end - step "ensure the user exist via puppet" apply_manifest_on host, create_user apply_manifest_on host, package_cron step "create the existing job by hand..." run_cron_on(host,:add,tmpuser,"* * * * * /bin/true") step "apply the resource on the host using puppet resource" on(host, puppet_resource("cron", "crontest", "user=#{tmpuser}", "command=/bin/true", "ensure=absent")) do assert_match(/crontest\D+ensure:\s+removed/, stdout, "Didn't remove crobtab entry for #{tmpuser} on #{host}") end step "verify that crontab -l contains what you expected" run_cron_on(host, :list, tmpuser) do assert_no_match(/\/bin\/true/, stdout, "Error: Found entry for #{tmpuser} on #{host}") end step "remove the crontab file for that user" run_cron_on(host, :remove, tmpuser) step "remove the user from the system" apply_manifest_on host, delete_user end diff --git a/acceptance/tests/resource/cron/should_remove_matching.rb b/acceptance/tests/resource/cron/should_remove_matching.rb index f480867d3..0b7115a6b 100755 --- a/acceptance/tests/resource/cron/should_remove_matching.rb +++ b/acceptance/tests/resource/cron/should_remove_matching.rb @@ -1,43 +1,39 @@ test_name "puppet should remove a crontab entry based on command matching" +confine :except, :platform => 'windows' tmpuser = "pl#{rand(999999).to_i}" tmpfile = "/tmp/cron-test-#{Time.new.to_i}" cron = '# Puppet Name: crontest\n* * * * * /bin/true\n1 1 1 1 1 /bin/true\n' create_user = "user { '#{tmpuser}': ensure => present, managehome => false }" delete_user = "user { '#{tmpuser}': ensure => absent, managehome => false }" package_cron = "case $operatingsystem { centos, redhat: {$cron = 'cronie'}\n default: {$cron ='cron'} } package {'cron': name=> $cron, ensure=>present, }" agents.each do |host| - if host['platform'].include?('windows') - skip_test "Test not supported on this platform" - next - end - step "ensure the user exist via puppet" apply_manifest_on host, create_user apply_manifest_on host, package_cron step "create the existing job by hand..." run_cron_on(host,:add,tmpuser,"* * * * * /bin/true") step "Remove cron resource" on(host, puppet_resource("cron", "bogus", "user=#{tmpuser}", "command=/bin/true", "ensure=absent")) do assert_match(/bogus\D+ensure: removed/, stdout, "Removing cron entry failed for #{tmpuser} on #{host}") end step "verify that crontab -l contains what you expected" run_cron_on(host,:list,tmpuser) do count = stdout.scan("/bin/true").length fail_test "found /bin/true the wrong number of times (#{count})" unless count == 0 end step "remove the crontab file for that user" run_cron_on(host,:remove,tmpuser) step "remove the user from the system" apply_manifest_on host, delete_user end diff --git a/acceptance/tests/resource/cron/should_update_existing.rb b/acceptance/tests/resource/cron/should_update_existing.rb index 1bd69b8e3..2b4926a14 100755 --- a/acceptance/tests/resource/cron/should_update_existing.rb +++ b/acceptance/tests/resource/cron/should_update_existing.rb @@ -1,45 +1,41 @@ test_name "puppet should update existing crontab entry" +confine :except, :platform => 'windows' tmpuser = "pl#{rand(999999).to_i}" tmpfile = "/tmp/cron-test-#{Time.new.to_i}" create_user = "user { '#{tmpuser}': ensure => present, managehome => false }" delete_user = "user { '#{tmpuser}': ensure => absent, managehome => false }" package_cron = "case $operatingsystem { centos, redhat: {$cron = 'cronie'}\n default: {$cron ='cron'} } package {'cron': name=> $cron, ensure=>present, }" agents.each do |host| - if host['platform'].include?('windows') - skip_test "Test not supported on this platform" - next - end - step "ensure the user exist via puppet" apply_manifest_on host, create_user apply_manifest_on host, package_cron step "create the existing job by hand..." run_cron_on(host,:add,tmpuser,"* * * * * /bin/true") step "verify that crontab -l contains what you expected" run_cron_on(host,:list,tmpuser) do assert_match(/\* \* \* \* \* \/bin\/true/, stdout, "Didn't find correct crobtab entry for #{tmpuser} on #{host}") end step "apply the resource change on the host" on(host, puppet_resource("cron", "crontest", "user=#{tmpuser}", "command=/bin/true", "ensure=present", "hour='0-6'")) do assert_match(/hour\s+=>\s+\['0-6'\]/, stdout, "Modifying cron entry failed for #{tmpuser} on #{host}") end step "verify that crontab -l contains what you expected" run_cron_on(host,:list,tmpuser) do assert_match(/\* 0-6 \* \* \* \/bin\/true/, stdout, "Didn't find correctly modified time entry in crobtab entry for #{tmpuser} on #{host}") end step "remove the crontab file for that user" run_cron_on(host,:remove,tmpuser) step "remove the user from the system" apply_manifest_on host, delete_user end diff --git a/acceptance/tests/resource/exec/accept_multi-line_commands.rb b/acceptance/tests/resource/exec/accept_multi-line_commands.rb index dafd86c05..443c7d2ca 100644 --- a/acceptance/tests/resource/exec/accept_multi-line_commands.rb +++ b/acceptance/tests/resource/exec/accept_multi-line_commands.rb @@ -1,32 +1,28 @@ test_name "Be able to execute multi-line commands (#9996)" +confine :except, :platform => 'windows' agents.each do |agent| - if agent['platform'].include?('windows') - skip_test "Test not supported on this platform" - next - end - temp_file_name = agent.tmpfile('9996-multi-line-commands') test_manifest = < "/bin/echo '#Test' > #{temp_file_name}; /bin/echo 'bob' >> #{temp_file_name};" } HERE expected_results = < 'windows' message = 'hello world' target = "/tmp/test-#{Time.new.to_i}" source = "/tmp/test-#{Time.new.to_i}-source" agents.each do |agent| - if agent['platform'].include?('windows') - skip_test "Test not supported on this platform" - next - end - step "clean up the system before we begin" on agent, "rm -rf #{target}" on agent, "echo '#{message}' > #{source}" step "verify we can create a symlink" on(agent, puppet_resource("file", target, "ensure=#{source}")) step "verify the symlink was created" on agent, "test -L #{target} && test -f #{target}" step "verify source file" on agent, "test -f #{source}" step "verify the content is identical on both sides" on(agent, "cat #{source}") do fail_test "source missing content" unless stdout.include? message end on(agent, "cat #{target}") do fail_test "target missing content" unless stdout.include? message end step "clean up after the test run" on agent, "rm -rf #{target} #{source}" end diff --git a/acceptance/tests/resource/file/symbolic_modes.rb b/acceptance/tests/resource/file/symbolic_modes.rb index 46c61ca35..8ff21b85a 100644 --- a/acceptance/tests/resource/file/symbolic_modes.rb +++ b/acceptance/tests/resource/file/symbolic_modes.rb @@ -1,114 +1,110 @@ test_name "file resource: symbolic modes" +confine :except, :platform => 'windows' def validate(path, mode) "ruby -e 'exit (File::Stat.new(#{path.inspect}).mode & 0777 == #{mode})'" end agents.each do |agent| - if agent['platform'].include?('windows') - Log.warn("Pending: this does not currently work on Windows") - next - end - user = agent['user'] group = agent['group'] || user file = agent.tmpfile('symbolic-mode-file') dir = agent.tmpdir('symbolic-mode-dir') on(agent, "touch #{file} ; mkdir -p #{dir}") # Infrastructure for a nice, table driven test. Yum. # # For your reference: # 4000 the set-user-ID-on-execution bit # 2000 the set-group-ID-on-execution bit # 1000 the sticky bit # 0400 Allow read by owner. # 0200 Allow write by owner. # 0100 For files, allow execution by owner. For directories, allow the # owner to search in the directory. # 0040 Allow read by group members. # 0020 Allow write by group members. # 0010 For files, allow execution by group members. For directories, allow # group members to search in the directory. # 0004 Allow read by others. # 0002 Allow write by others. # 0001 For files, allow execution by others. For directories allow others # to search in the directory. # # fields are: start_mode, symbolic_mode, file_mode, dir_mode # start_mode is passed to chmod on the target platform # symbolic_mode is the mode set in our test # the file and dir mode values are the numeric resultant values we should get tests = < 'windows' target = "/test-socket-#{$$}" agents.each do |agent| - if agent['platform'].include?('windows') - skip_test "Test not supported on this platform" - next - end - step "clean up the system before we begin" on(agent, "rm -f #{target}") step "create UNIX domain socket" on(agent, %Q{ruby -e "require 'socket'; UNIXServer::new('#{target}').close"}) step "query for all files, which should return nothing" on(agent, puppet_resource('file'), :acceptable_exit_codes => [1]) do assert_match(%r{Listing all file instances is not supported. Please specify a file or directory, e.g. puppet resource file /etc}, stderr) end ["/", "/etc"].each do |file| step "query '#{file}' directory, which should return single entry" on(agent, puppet_resource('file', file)) do files = stdout.scan(/^file \{ '([^']+)'/).flatten assert_equal(1, files.size, "puppet returned multiple files: #{files.join(', ')}") assert_match(file, files[0], "puppet did not return file") end end step "query file that does not exist, which should report the file is absent" on(agent, puppet_resource('file', '/this/does/notexist')) do assert_match(/ensure\s+=>\s+'absent'/, stdout) end step "remove UNIX domain socket" on(agent, "rm -f #{target}") end diff --git a/acceptance/tests/resource/group/should_modify_gid.rb b/acceptance/tests/resource/group/should_modify_gid.rb index 65e9a1f95..43ba6fa4f 100755 --- a/acceptance/tests/resource/group/should_modify_gid.rb +++ b/acceptance/tests/resource/group/should_modify_gid.rb @@ -1,31 +1,27 @@ test_name "should modify gid of existing group" +confine :except, :platform => 'windows' name = "pl#{rand(999999).to_i}" gid1 = rand(999999).to_i gid2 = rand(999999).to_i agents.each do |agent| - if agent['platform'].include?('windows') - skip_test "Test not supported on this platform" - next - end - step "ensure that the group exists with gid #{gid1}" on(agent, puppet_resource('group', name, 'ensure=present', "gid=#{gid1}")) do fail_test "missing gid notice" unless stdout =~ /gid +=> +'#{gid1}'/ end step "ensure that we can modify the GID of the group to #{gid2}" on(agent, puppet_resource('group', name, 'ensure=present', "gid=#{gid2}")) do fail_test "missing gid notice" unless stdout =~ /gid +=> +'#{gid2}'/ end step "verify that the GID changed" on(agent, "getent group #{name}") do fail_test "gid is wrong through getent output" unless stdout =~ /^#{name}:.*:#{gid2}:/ end step "clean up the system after the test run" on(agent, puppet_resource('group', name, 'ensure=absent')) end diff --git a/acceptance/tests/resource/service/ticket_4123_should_list_all_running_redhat.rb b/acceptance/tests/resource/service/ticket_4123_should_list_all_running_redhat.rb index 064424766..20a12038c 100755 --- a/acceptance/tests/resource/service/ticket_4123_should_list_all_running_redhat.rb +++ b/acceptance/tests/resource/service/ticket_4123_should_list_all_running_redhat.rb @@ -1,12 +1,9 @@ test_name "#4123: should list all running services on Redhat/CentOS" step "Validate services running agreement ralsh vs. OS service count" # This will remotely exec: # ticket_4123_should_list_all_running_redhat.sh +confine :to, :platform => /el-/ hosts.each do |host| - if host['platform'].include?('el-') - run_script_on(host, File.join(File.dirname(__FILE__), 'ticket_4123_should_list_all_running_redhat.sh')) - else - skip_test "Test not supported on this plaform" - end + run_script_on(host, File.join(File.dirname(__FILE__), 'ticket_4123_should_list_all_running_redhat.sh')) end diff --git a/acceptance/tests/resource/service/ticket_4124_should_list_all_disabled.rb b/acceptance/tests/resource/service/ticket_4124_should_list_all_disabled.rb index 7ba3c1a28..b502f3d33 100755 --- a/acceptance/tests/resource/service/ticket_4124_should_list_all_disabled.rb +++ b/acceptance/tests/resource/service/ticket_4124_should_list_all_disabled.rb @@ -1,12 +1,9 @@ test_name "#4124: should list all disabled services on Redhat/CentOS" step "Validate disabled services agreement ralsh vs. OS service count" # This will remotely exec: # ticket_4124_should_list_all_disabled.sh +confine :to, :platform => /el-/ hosts.each do |host| - unless host['platform'].include?('el-') - skip_test "Test not supported on this plaform" - else - run_script_on(host, File.join(File.dirname(__FILE__), 'ticket_4124_should_list_all_disabled.sh')) - end + run_script_on(host, File.join(File.dirname(__FILE__), 'ticket_4124_should_list_all_disabled.sh')) end diff --git a/acceptance/tests/resource/user/should_create_with_gid.rb b/acceptance/tests/resource/user/should_create_with_gid.rb index 0b9f00d64..1cafe8f74 100755 --- a/acceptance/tests/resource/user/should_create_with_gid.rb +++ b/acceptance/tests/resource/user/should_create_with_gid.rb @@ -1,34 +1,31 @@ test_name "verifies that puppet resource creates a user and assigns the correct group" +confine :except, :platform => 'windows' user = "pl#{rand(999999).to_i}" group = "gp#{rand(999999).to_i}" agents.each do |host| - if host['platform'].include?('windows') - skip_test "Test not supported on this platform" - else - step "user should not exist" - on host, "if getent passwd #{user}; then userdel #{user}; fi" + step "user should not exist" + on host, "if getent passwd #{user}; then userdel #{user}; fi" - step "group should exist" - on host, "getent group #{group} || groupadd #{group}" + step "group should exist" + on host, "getent group #{group} || groupadd #{group}" - step "create user with group" - on(host, puppet_resource('user', user, 'ensure=present', "gid=#{group}")) + step "create user with group" + on(host, puppet_resource('user', user, 'ensure=present', "gid=#{group}")) - step "verify the group exists and find the gid" - on(host, "getent group #{group}") do - gid = stdout.split(':')[2] + step "verify the group exists and find the gid" + on(host, "getent group #{group}") do + gid = stdout.split(':')[2] - step "verify that the user has that as their gid" - on(host, "getent passwd #{user}") do - got = stdout.split(':')[3] - fail_test "wanted gid #{gid} but found #{got}" unless gid == got - end - end - - step "clean up after the test is done" - on(host, puppet_resource('user', user, 'ensure=absent')) - on(host, puppet_resource('group', group, 'ensure=absent')) + step "verify that the user has that as their gid" + on(host, "getent passwd #{user}") do + got = stdout.split(':')[3] + fail_test "wanted gid #{gid} but found #{got}" unless gid == got + end end + + step "clean up after the test is done" + on(host, puppet_resource('user', user, 'ensure=absent')) + on(host, puppet_resource('group', group, 'ensure=absent')) end diff --git a/acceptance/tests/resource/user/should_modify_gid.rb b/acceptance/tests/resource/user/should_modify_gid.rb index 4c13dc40e..850a3a75b 100755 --- a/acceptance/tests/resource/user/should_modify_gid.rb +++ b/acceptance/tests/resource/user/should_modify_gid.rb @@ -1,45 +1,42 @@ test_name "verify that we can modify the gid" +confine :except, :platform => 'windows' user = "pl#{rand(99999).to_i}" group1 = "#{user}old" group2 = "#{user}new" agents.each do |host| - if host['platform'].include?('windows') - skip_test "Test not supported on this platform" - else - step "ensure that the groups both exist" - on(host, puppet_resource('group', group1, 'ensure=present')) - on(host, puppet_resource('group', group2, 'ensure=present')) - - step "ensure the user exists and has the old group" - on(host, puppet_resource('user', user, 'ensure=present', "gid=#{group1}")) - - step "verify that the user has the correct gid" - on(host, "getent group #{group1}") do - gid = stdout.split(':')[2] - on(host, "getent passwd #{user}") do - got = stdout.split(':')[3] - fail_test "didn't have the expected old GID, but #{got}" unless got == gid - end - end - - step "modify the GID of the user" - on(host, puppet_resource('user', user, 'ensure=present', "gid=#{group2}")) - - - step "verify that the user has the updated gid" - on(host, "getent group #{group2}") do - gid = stdout.split(':')[2] - on(host, "getent passwd #{user}") do - got = stdout.split(':')[3] - fail_test "didn't have the expected old GID, but #{got}" unless got == gid - end - end - - step "ensure that we remove the things we made" - on(host, puppet_resource('user', user, 'ensure=absent')) - on(host, puppet_resource('group', group1, 'ensure=absent')) - on(host, puppet_resource('group', group2, 'ensure=absent')) + step "ensure that the groups both exist" + on(host, puppet_resource('group', group1, 'ensure=present')) + on(host, puppet_resource('group', group2, 'ensure=present')) + + step "ensure the user exists and has the old group" + on(host, puppet_resource('user', user, 'ensure=present', "gid=#{group1}")) + + step "verify that the user has the correct gid" + on(host, "getent group #{group1}") do + gid = stdout.split(':')[2] + on(host, "getent passwd #{user}") do + got = stdout.split(':')[3] + fail_test "didn't have the expected old GID, but #{got}" unless got == gid + end end + + step "modify the GID of the user" + on(host, puppet_resource('user', user, 'ensure=present', "gid=#{group2}")) + + + step "verify that the user has the updated gid" + on(host, "getent group #{group2}") do + gid = stdout.split(':')[2] + on(host, "getent passwd #{user}") do + got = stdout.split(':')[3] + fail_test "didn't have the expected old GID, but #{got}" unless got == gid + end + end + + step "ensure that we remove the things we made" + on(host, puppet_resource('user', user, 'ensure=absent')) + on(host, puppet_resource('group', group1, 'ensure=absent')) + on(host, puppet_resource('group', group2, 'ensure=absent')) end diff --git a/acceptance/tests/ticket_3961_puppet_ca_should_produce_certs.rb b/acceptance/tests/ticket_3961_puppet_ca_should_produce_certs.rb index 3f41aebbe..09a0b5e77 100644 --- a/acceptance/tests/ticket_3961_puppet_ca_should_produce_certs.rb +++ b/acceptance/tests/ticket_3961_puppet_ca_should_produce_certs.rb @@ -1,35 +1,31 @@ test_name "#3961: puppet ca should produce certs spec" +confine :except, :platform => 'windows' target = "working3961.example.org" expect = ['notice: Signed certificate request for ca', 'notice: Rebuilding inventory file', 'notice: working3961.example.org has a waiting certificate request', 'notice: Signed certificate request for working3961.example.org', 'notice: Removing file Puppet::SSL::CertificateRequest working3961.example.org'] agents.each do |agent| - if agent['platform'].include?('windows') - skip_test "Test not supported on this platform" - next - end - scratch = agent.tmpdir('puppet-ssl-3961') options = { :confdir => scratch, :vardir => scratch } step "removing the SSL scratch directory..." on(agent, "rm -vrf #{scratch}") step "generate a certificate in #{scratch}" on(agent,puppet_cert('--trace', '--generate', target, options)) do expect.each do |line| stdout.index(line) or fail_test("missing line in output: #{line}") end end step "verify the certificate for #{target} exists" on agent, "test -f #{scratch}/ssl/certs/#{target}.pem" step "verify the private key for #{target} exists" on agent, "grep -q 'BEGIN RSA PRIVATE KEY' #{scratch}/ssl/private_keys/#{target}.pem" end