spec/spec_helper_acceptance.rb in simp-rspec-puppet-facts-2.3.0 vs spec/spec_helper_acceptance.rb in simp-rspec-puppet-facts-2.3.1

- old
+ new

@@ -1,10 +1,9 @@ require 'beaker-rspec' require 'tmpdir' require 'yaml' require 'simp/beaker_helpers' - include Simp::BeakerHelpers require 'beaker/puppet_install_helper' require 'beaker-windows' include BeakerWindows::Path @@ -22,11 +21,11 @@ end end end hosts.each do |host| - # https://petersouter.co.uk/testing-windows-puppet-with-beaker/ + # https://petersouter.xyz/testing-windows-with-beaker-without-cygwin/ case host['platform'] when /windows/ GEOTRUST_GLOBAL_CA = <<-EOM.freeze -----BEGIN CERTIFICATE----- MIIDVDCCAjygAwIBAgIDAjRWMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVT @@ -64,28 +63,9 @@ # Configure all nodes in nodeset c.before :suite do begin # Install modules and dependencies from spec/fixtures/modules copy_fixture_modules_to( hosts ) - - nonwin = hosts.dup - nonwin.delete_if {|h| h[:platform] =~ /windows/ } - - unless nonwin.empty? - begin - server = only_host_with_role(nonwin, 'server') - rescue ArgumentError => e - server = hosts_with_role(nonwin, 'default').first - end - # Generate and install PKI certificates on each SUT - Dir.mktmpdir do |cert_dir| - run_fake_pki_ca_on(server, nonwin, cert_dir ) - nonwin.each{ |sut| copy_pki_to( sut, cert_dir, '/etc/pki/simp-testing' )} - end - - # add PKI keys - copy_keydist_to(server) - end rescue StandardError, ScriptError => e if ENV['PRY'] require 'pry'; binding.pry else raise e