simp-beaker-helpers 1.17.0 → 1.18.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2d2df234c2357c8763e82b9cabaf6b9da39736ca7fcedc4a16dd344a993c2c2d
4
- data.tar.gz: eda59ab6e07fadc67fb31b0d5d5462b89a2f4290129f46d32fda963999b5bc99
3
+ metadata.gz: 0e9731dc0c98a6ed7a1e7d81f1aa8cb84f2f78a0f52408462b214575e0ad648f
4
+ data.tar.gz: f8d4399abcd3278ae16abc4d508b2ec8921da93d9441f317726608813b2b6aaf
5
5
  SHA512:
6
- metadata.gz: bbcabe0f22e139595747cde2afd378e8f7d4f35e1d4ce387fc2c09da3bc57d2099e8abfc0beb407cfff0a53aad13c4be032840d54a78f86a7c4f5f47a504628a
7
- data.tar.gz: 84235e55f67ee2fefc02dce2221763e817876a22fb1bf6cfee7adfcbfd261913022a39bba804ad66643f0cc884c164f41e0ac3b239a8b339e1809c8b7e55b063
6
+ metadata.gz: 1d17b36761db1e16c8b3d76ee57d8c1f193f8fd5c1dbe13f824b837e297968adabba1c8ea3d12e0be86a396e6ebf3a8afc71f5ed27838bb240fdde1f4b4afd2a
7
+ data.tar.gz: 7ceff2ed1a04a20d1ee1ba533011345033513fe31c276f87cf1841707cbfd634bbfa3ec04b4ae8a7f27061fe3c92fe76f5fa1b17a66129bc291e64208b6633a7
@@ -1,5 +1,8 @@
1
1
  ---
2
2
  fixtures:
3
+ # Needed for Hiera v5 to work
4
+ forge_modules:
5
+ compliance_markup: "simp/compliance_markup"
3
6
  repositories:
4
7
  stdlib: "https://github.com/simp/puppetlabs-stdlib"
5
8
 
@@ -1,3 +1,18 @@
1
+ ### 1.18.0 / 2020-02-06
2
+ * Update Windows support
3
+ * Add require beaker-windows and note installation of gem if missing
4
+ * Add geotrust global CA certificate in fix_eratta_on
5
+ * Added convenience helper methods
6
+ * Add puppet_environment_path_on
7
+ * Add file_content_on which is multi-platform safe unlike the built-in
8
+ file_contents_on
9
+ * Add hiera_config_path_on
10
+ * Add get_hiera_config_on
11
+ * Add set_hiera_config_on
12
+
13
+ ### 1.17.1 / 2019-11-01
14
+ * Only pull in the beaker rake tasks from the puppetlabs helpers
15
+
1
16
  ### 1.17.0 / 2019-10-22
2
17
  * Allow users to perform exclusion filters on SSG results
3
18
  * Allow users to pass Arrays of items to match for SSG results
data/Rakefile CHANGED
@@ -12,10 +12,6 @@ require 'simp/rake/beaker'
12
12
 
13
13
  Simp::Rake::Beaker.new(@rakefile_dir)
14
14
 
15
- ['spec','syntax','syntax:hiera','syntax:manifests','syntax:templates','lint','metadata'].each do |task|
16
- Rake::Task[task].clear
17
- end
18
-
19
15
  CLEAN.include "#{@package}-*.gem"
20
16
  CLEAN.include 'pkg'
21
17
  CLEAN.include 'dist'
@@ -19,7 +19,23 @@ module Simp::BeakerHelpers
19
19
  end
20
20
 
21
21
  def is_windows?(sut)
22
- fact_on(sut, 'osfamily').casecmp?('windows')
22
+ is_windows = fact_on(sut, 'osfamily').casecmp?('windows')
23
+
24
+ if is_windows
25
+ begin
26
+ require 'beaker-windows'
27
+ rescue LoadError
28
+ logger.error(%{You must include 'beaker-windows' in your Gemfile for windows support on #{host}})
29
+ exit 1
30
+ end
31
+
32
+ include BeakerWindows::Path
33
+ include BeakerWindows::Powershell
34
+ include BeakerWindows::Registry
35
+ include BeakerWindows::WindowsFeature
36
+ end
37
+
38
+ return is_windows
23
39
  end
24
40
 
25
41
  # We can't cache this because it may change during a run
@@ -102,11 +118,21 @@ module Simp::BeakerHelpers
102
118
  splitchar = ':'
103
119
  splitchar = ';' if is_windows?(sut)
104
120
 
105
- sut.puppet_configprint['modulepath'].split(splitchar)
121
+ (
122
+ sut.puppet_configprint['modulepath'].split(splitchar) +
123
+ sut.puppet_configprint['basemodulepath'].split(splitchar)
124
+ ).uniq
125
+ end
126
+
127
+ # Return the default environment path
128
+ def puppet_environment_path_on(sut, environment='production')
129
+ File.dirname(sut.puppet_configprint['manifest'])
106
130
  end
107
131
 
108
132
  # Return the path to the 'spec/fixtures' directory
109
133
  def fixtures_path
134
+ return @fixtures_path if @fixtures_path
135
+
110
136
  STDERR.puts ' ** fixtures_path' if ENV['BEAKER_helpers_verbose']
111
137
  dir = RSpec.configuration.default_path
112
138
  dir = File.join('.', 'spec') unless dir
@@ -114,7 +140,8 @@ module Simp::BeakerHelpers
114
140
  dir = File.join(File.expand_path(dir), 'fixtures')
115
141
 
116
142
  if File.directory?(dir)
117
- return dir
143
+ @fixtures_path = dir
144
+ return @fixtures_path
118
145
  else
119
146
  raise("Could not find fixtures directory at '#{dir}'")
120
147
  end
@@ -122,6 +149,8 @@ module Simp::BeakerHelpers
122
149
 
123
150
  # Locates .fixture.yml in or above this directory.
124
151
  def fixtures_yml_path
152
+ return @fixtures_yml_path if @fixtures_yml_path
153
+
125
154
  STDERR.puts ' ** fixtures_yml_path' if ENV['BEAKER_helpers_verbose']
126
155
 
127
156
  if ENV['FIXTURES_YML']
@@ -144,19 +173,26 @@ module Simp::BeakerHelpers
144
173
 
145
174
  STDERR.puts " ** fixtures_yml_path:finished (file: '#{file}')" if ENV['BEAKER_helpers_verbose']
146
175
 
147
- fixtures_yml
176
+ @fixtures_yml_path = fixtures_yml
177
+
178
+ return @fixtures_yml_path
148
179
  end
149
180
 
150
181
 
151
182
  # returns an Array of puppet modules declared in .fixtures.yml
152
183
  def pupmods_in_fixtures_yml
184
+ return @pupmods_in_fixtures_yml if @pupmods_in_fixtures_yml
185
+
153
186
  STDERR.puts ' ** pupmods_in_fixtures_yml' if ENV['BEAKER_helpers_verbose']
154
187
  fixtures_yml = fixtures_yml_path
155
188
  data = YAML.load_file( fixtures_yml )
156
189
  repos = data.fetch('fixtures').fetch('repositories', {}).keys || []
157
190
  symlinks = data.fetch('fixtures').fetch('symlinks', {}).keys || []
158
191
  STDERR.puts ' ** pupmods_in_fixtures_yml: finished' if ENV['BEAKER_helpers_verbose']
159
- (repos + symlinks)
192
+
193
+ @pupmods_in_fixtures_yml = (repos + symlinks)
194
+
195
+ return @pupmods_in_fixtures_yml
160
196
  end
161
197
 
162
198
 
@@ -587,8 +623,33 @@ module Simp::BeakerHelpers
587
623
  parallel = (ENV['BEAKER_SIMP_parallel'] == 'yes')
588
624
  block_on(suts, :run_in_parallel => parallel) do |sut|
589
625
  if sut[:platform] =~ /windows/
590
- puts " -- SKIPPING #{sut} because it is windows"
591
- # DO NOTHING
626
+ # Install the necessary windows certificate for testing
627
+ #
628
+ # https://petersouter.xyz/testing-windows-with-beaker-without-cygwin/
629
+ geotrust_global_ca = <<~EOM.freeze
630
+ -----BEGIN CERTIFICATE-----
631
+ MIIDVDCCAjygAwIBAgIDAjRWMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVT
632
+ MRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9i
633
+ YWwgQ0EwHhcNMDIwNTIxMDQwMDAwWhcNMjIwNTIxMDQwMDAwWjBCMQswCQYDVQQG
634
+ EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEbMBkGA1UEAxMSR2VvVHJ1c3Qg
635
+ R2xvYmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2swYYzD9
636
+ 9BcjGlZ+W988bDjkcbd4kdS8odhM+KhDtgPpTSEHCIjaWC9mOSm9BXiLnTjoBbdq
637
+ fnGk5sRgprDvgOSJKA+eJdbtg/OtppHHmMlCGDUUna2YRpIuT8rxh0PBFpVXLVDv
638
+ iS2Aelet8u5fa9IAjbkU+BQVNdnARqN7csiRv8lVK83Qlz6cJmTM386DGXHKTubU
639
+ 1XupGc1V3sjs0l44U+VcT4wt/lAjNvxm5suOpDkZALeVAjmRCw7+OC7RHQWa9k0+
640
+ bw8HHa8sHo9gOeL6NlMTOdReJivbPagUvTLrGAMoUgRx5aszPeE4uwc2hGKceeoW
641
+ MPRfwCvocWvk+QIDAQABo1MwUTAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTA
642
+ ephojYn7qwVkDBF9qn1luMrMTjAfBgNVHSMEGDAWgBTAephojYn7qwVkDBF9qn1l
643
+ uMrMTjANBgkqhkiG9w0BAQUFAAOCAQEANeMpauUvXVSOKVCUn5kaFOSPeCpilKIn
644
+ Z57QzxpeR+nBsqTP3UEaBU6bS+5Kb1VSsyShNwrrZHYqLizz/Tt1kL/6cdjHPTfS
645
+ tQWVYrmm3ok9Nns4d0iXrKYgjy6myQzCsplFAMfOEVEiIuCl6rYVSAlk6l5PdPcF
646
+ PseKUgzbFbS9bZvlxrFUaKnjaZC2mqUPuLk/IH2uSrW4nOQdtqvmlKXBx4Ot2/Un
647
+ hw4EbNX/3aBd7YdStysVAq45pmp06drE57xNNB6pXE0zX5IJL4hmXXeXxx12E6nV
648
+ 5fEWCRE11azbJHFwLJhWC9kXtNHjUStedejV0NxPNO3CBWaAocvmMw==
649
+ -----END CERTIFICATE-----
650
+ EOM
651
+
652
+ install_cert_on_windows(sut, 'geotrustglobal', geotrust_global_ca)
592
653
  else
593
654
  linux_errata(sut)
594
655
  end
@@ -795,10 +856,61 @@ done
795
856
  end
796
857
  end
797
858
 
859
+ # Return the contents of a file on the remote host
860
+ #
861
+ # @param sut [Host] the host upon which to operate
862
+ # @param path [String] the path to the target file
863
+ # @param trim [Boolean] remove leading and trailing whitespace
864
+ #
865
+ # @return [String, nil] the contents of the remote file
866
+ def file_content_on(sut, path, trim=true)
867
+ file_content = nil
868
+
869
+ if file_exists_on(sut, path)
870
+ Dir.mktempdir do |dir|
871
+ scp_from(host, path, dir)
872
+
873
+ file_content = File.read(File.basename(path))
874
+ end
875
+ end
876
+
877
+ return file_content
878
+ end
879
+
880
+ # Retrieve the default hiera.yaml path
881
+ #
882
+ # @param sut [Host] one host to act upon
883
+ #
884
+ # @returns [Hash] path to the default environment's hiera.yaml
885
+ def hiera_config_path_on(sut)
886
+ File.join(puppet_environment_path_on(sut), 'hiera.yaml')
887
+ end
888
+
889
+ # Retrieve the default environment hiera.yaml
890
+ #
891
+ # @param sut [Host] one host to act upon
892
+ #
893
+ # @returns [Hash] content of the default environment's hiera.yaml
894
+ def get_hiera_config_on(sut)
895
+ file_content_on(sut, hiera_config_path_on(sut))
896
+ end
897
+
898
+ # Updates the default environment hiera.yaml
899
+ #
900
+ # @param sut [Host] One host to act upon
901
+ # @param hiera_yaml [Hash, String] The data to place into hiera.yaml
902
+ #
903
+ # @returns [void]
904
+ def set_hiera_config_on(sut, hiera_yaml)
905
+ hiera_yaml = hiera_yaml.to_yaml if hiera_yaml.is_a?(Hash)
906
+
907
+ create_remote_file(sut, hiera_config_path_on(sut), hiera_yaml)
908
+ end
909
+
798
910
  # Writes a YAML file in the Hiera :datadir of a Beaker::Host.
799
911
  #
800
912
  # @note This is useless unless Hiera is configured to use the data file.
801
- # @see `#write_hiera_config_on`
913
+ # @see `#set_hiera_config_on`
802
914
  #
803
915
  # @param sut [Array<Host>, String, Symbol] One or more hosts to act upon.
804
916
  #
@@ -844,7 +956,7 @@ done
844
956
  # Note: This may not work if you've shoved data somewhere that is not the
845
957
  # default and/or are manipulating the default hiera.yaml.
846
958
  #
847
- # @param sut [Host] One host to act upon
959
+ # @param sut [Host] One host to act upon
848
960
  #
849
961
  # @returns [String] Path to the Hieradata directory on the target system
850
962
  def hiera_datadir(sut)
@@ -855,7 +967,7 @@ done
855
967
  fail("No output returned from `puppet config print manifest` on #{sut}")
856
968
  end
857
969
 
858
- puppet_env_path = File.dirname(sut.puppet_configprint['manifest'])
970
+ puppet_env_path = puppet_environment_path_on(sut)
859
971
 
860
972
  # We'll just take the first match since Hiera will find things there
861
973
  puppet_lookup_info = puppet_lookup_info.grep(/Path "/).grep(Regexp.new(puppet_env_path))
@@ -1,5 +1,5 @@
1
1
  module Simp; end
2
2
 
3
3
  module Simp::BeakerHelpers
4
- VERSION = '1.17.0'
4
+ VERSION = '1.18.0'
5
5
  end
@@ -2,7 +2,8 @@ require 'rake'
2
2
  require 'rake/clean'
3
3
  require 'rake/tasklib'
4
4
  require 'fileutils'
5
- require 'puppetlabs_spec_helper/rake_tasks'
5
+ require 'puppetlabs_spec_helper/tasks/beaker'
6
+ require 'puppetlabs_spec_helper/tasks/fixtures'
6
7
 
7
8
  module Simp; end
8
9
  module Simp::Rake
@@ -18,11 +18,11 @@ Gem::Specification.new do |s|
18
18
  s.metadata = {
19
19
  'issue_tracker' => 'https://simp-project.atlassian.net'
20
20
  }
21
- s.add_runtime_dependency 'beaker' , '~> 4.0'
21
+ s.add_runtime_dependency 'beaker' , ['>= 4.16.0', '< 5.0.0']
22
22
  s.add_runtime_dependency 'beaker-rspec' , '~> 6.2'
23
- s.add_runtime_dependency 'beaker-puppet' , '~> 1.0'
23
+ s.add_runtime_dependency 'beaker-puppet' , ['>= 1.18.12', '< 2.0.0']
24
24
  s.add_runtime_dependency 'beaker-docker' , '~> 0.3'
25
- s.add_runtime_dependency 'beaker-vagrant' , '~> 0.5'
25
+ s.add_runtime_dependency 'beaker-vagrant' , ['0.6.4', '< 2.0.0']
26
26
  s.add_runtime_dependency 'beaker-puppet_install_helper', '~> 0.9'
27
27
  s.add_runtime_dependency 'highline' , '~> 2.0'
28
28
  s.add_runtime_dependency 'nokogiri' , '~> 1.8'
@@ -6,54 +6,20 @@ require 'simp/beaker_helpers'
6
6
  include Simp::BeakerHelpers
7
7
 
8
8
  require 'beaker/puppet_install_helper'
9
- require 'beaker-windows'
10
- include BeakerWindows::Path
11
- include BeakerWindows::Powershell
12
- include BeakerWindows::Registry
13
- include BeakerWindows::WindowsFeature
14
9
 
15
10
  unless ENV['BEAKER_provision'] == 'no'
16
11
  hosts.each do |host|
17
- # Install Puppet
18
- if host.is_pe?
19
- install_pe
20
- else
21
- install_puppet
12
+ unless Simp::BeakerHelpers::Snapshot.exist?(host, 'puppet_installed')
13
+ # Install Puppet
14
+ if host.is_pe?
15
+ install_pe
16
+ else
17
+ install_puppet
18
+ end
22
19
  end
23
20
  end
24
21
  end
25
22
 
26
- hosts.each do |host|
27
- # https://petersouter.co.uk/testing-windows-puppet-with-beaker/
28
- case host['platform']
29
- when /windows/
30
- GEOTRUST_GLOBAL_CA = <<-EOM.freeze
31
- -----BEGIN CERTIFICATE-----
32
- MIIDVDCCAjygAwIBAgIDAjRWMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVT
33
- MRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9i
34
- YWwgQ0EwHhcNMDIwNTIxMDQwMDAwWhcNMjIwNTIxMDQwMDAwWjBCMQswCQYDVQQG
35
- EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEbMBkGA1UEAxMSR2VvVHJ1c3Qg
36
- R2xvYmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2swYYzD9
37
- 9BcjGlZ+W988bDjkcbd4kdS8odhM+KhDtgPpTSEHCIjaWC9mOSm9BXiLnTjoBbdq
38
- fnGk5sRgprDvgOSJKA+eJdbtg/OtppHHmMlCGDUUna2YRpIuT8rxh0PBFpVXLVDv
39
- iS2Aelet8u5fa9IAjbkU+BQVNdnARqN7csiRv8lVK83Qlz6cJmTM386DGXHKTubU
40
- 1XupGc1V3sjs0l44U+VcT4wt/lAjNvxm5suOpDkZALeVAjmRCw7+OC7RHQWa9k0+
41
- bw8HHa8sHo9gOeL6NlMTOdReJivbPagUvTLrGAMoUgRx5aszPeE4uwc2hGKceeoW
42
- MPRfwCvocWvk+QIDAQABo1MwUTAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTA
43
- ephojYn7qwVkDBF9qn1luMrMTjAfBgNVHSMEGDAWgBTAephojYn7qwVkDBF9qn1l
44
- uMrMTjANBgkqhkiG9w0BAQUFAAOCAQEANeMpauUvXVSOKVCUn5kaFOSPeCpilKIn
45
- Z57QzxpeR+nBsqTP3UEaBU6bS+5Kb1VSsyShNwrrZHYqLizz/Tt1kL/6cdjHPTfS
46
- tQWVYrmm3ok9Nns4d0iXrKYgjy6myQzCsplFAMfOEVEiIuCl6rYVSAlk6l5PdPcF
47
- PseKUgzbFbS9bZvlxrFUaKnjaZC2mqUPuLk/IH2uSrW4nOQdtqvmlKXBx4Ot2/Un
48
- hw4EbNX/3aBd7YdStysVAq45pmp06drE57xNNB6pXE0zX5IJL4hmXXeXxx12E6nV
49
- 5fEWCRE11azbJHFwLJhWC9kXtNHjUStedejV0NxPNO3CBWaAocvmMw==
50
- -----END CERTIFICATE-----
51
- EOM
52
- install_cert_on_windows(host, 'geotrustglobal', GEOTRUST_GLOBAL_CA)
53
- end
54
- end
55
-
56
-
57
23
  RSpec.configure do |c|
58
24
  # ensure that environment OS is ready on each host
59
25
  fix_errata_on(hosts)
@@ -64,10 +30,11 @@ RSpec.configure do |c|
64
30
  # Configure all nodes in nodeset
65
31
  c.before :suite do
66
32
  begin
33
+ copy_fixture_modules_to( hosts )
34
+
67
35
  nonwin = hosts.dup
68
36
  nonwin.delete_if {|h| h[:platform] =~ /windows/ }
69
- # Install modules and dependencies from spec/fixtures/modules
70
- copy_fixture_modules_to( nonwin )
37
+
71
38
  begin
72
39
  server = only_host_with_role(nonwin, 'server')
73
40
  rescue ArgumentError => e
@@ -91,12 +58,61 @@ RSpec.configure do |c|
91
58
  end
92
59
  end
93
60
 
61
+ describe 'windows' do
62
+
63
+ let(:hieradata){{
64
+ 'test::foo' => 'test'
65
+ }}
66
+
67
+ let(:manifest){ 'notify { "test": message => lookup("test::foo")}' }
94
68
 
95
- hosts.each do |host|
96
- describe 'windows hosts coexising with linux hosts' do
69
+ hosts.each do |host|
97
70
  context "on #{host}" do
98
- it 'should have puppet installed' do
99
- on(host, 'puppet --version')
71
+
72
+ let(:hiera_config){{
73
+ 'version' => 5,
74
+ 'hierarchy' => [
75
+ {
76
+ 'name' => 'Common',
77
+ 'path' => 'common.yaml'
78
+ },
79
+ {
80
+ 'name' => 'SIMP Compliance Engine',
81
+ 'lookup_key' => 'compliance_markup::enforcement'
82
+ }
83
+ ],
84
+ 'defaults' => {
85
+ 'data_hash' => 'yaml_data',
86
+ 'datadir' => hiera_datadir(host)
87
+ }
88
+ }}
89
+
90
+ if Simp::BeakerHelpers::Snapshot.exist?(host, 'puppet_installed')
91
+ Simp::BeakerHelpers::Snapshot.restore(host, 'puppet_installed')
92
+ else
93
+ Simp::BeakerHelpers::Snapshot.save(host, 'puppet_installed')
94
+ end
95
+
96
+ describe 'windows hosts coexising with linux hosts' do
97
+ context "on #{host}" do
98
+ it 'should have puppet installed' do
99
+ on(host, 'puppet --version')
100
+ end
101
+
102
+ it 'should be able to set the hiera config' do
103
+ set_hiera_config_on(host, hiera_config)
104
+ end
105
+
106
+ it 'should be able to set the hieradata' do
107
+ set_hieradata_on(host, hieradata)
108
+ end
109
+
110
+ it 'should be able to run puppet' do
111
+ output = apply_manifest_on(host, manifest).stdout
112
+
113
+ expect(output).to include "defined 'message' as 'test'"
114
+ end
115
+ end
100
116
  end
101
117
  end
102
118
  end
@@ -9,28 +9,21 @@ HOSTS:
9
9
  win:
10
10
  roles:
11
11
  - windows
12
- - ad
13
12
  platform: windows-server-amd64
14
13
  box: opentable/win-2012r2-standard-amd64-nocm # VBOX ONLY
15
14
  hypervisor: <%= hypervisor %>
16
15
  vagrant_memsize: 2048
17
16
  vagrant_cpus: 2
18
17
  user: vagrant
19
- communicator: winrm
20
18
  is_cygwin: false
21
- centos7:
19
+
20
+ el7:
22
21
  roles:
23
22
  - default
24
- - client
25
23
  platform: el-7-x86_64
26
24
  box: centos/7
27
25
  hypervisor: <%= hypervisor %>
28
- centos6:
29
- roles:
30
- - client
31
- platform: el-6-x86_64
32
- box: centos/6
33
- hypervisor: <%= hypervisor %>
26
+
34
27
  CONFIG:
35
28
  log_level: verbose
36
29
  type: aio
@@ -0,0 +1,35 @@
1
+ <%
2
+ if ENV['BEAKER_HYPERVISOR']
3
+ hypervisor = ENV['BEAKER_HYPERVISOR']
4
+ else
5
+ hypervisor = 'vagrant'
6
+ end
7
+ -%>
8
+ HOSTS:
9
+ win:
10
+ roles:
11
+ - windows
12
+ platform: windows-server-amd64
13
+ box: gusztavvargadr/windows-server
14
+ box_version: 1607.0.1909
15
+ hypervisor: <%= hypervisor %>
16
+ vagrant_memsize: 2048
17
+ vagrant_cpus: 2
18
+ user: vagrant
19
+ communicator: winrm
20
+ is_cygwin: false
21
+
22
+ el7:
23
+ roles:
24
+ - default
25
+ platform: el-7-x86_64
26
+ box: centos/7
27
+ hypervisor: <%= hypervisor %>
28
+
29
+ CONFIG:
30
+ log_level: verbose
31
+ type: aio
32
+ vagrant_memsize: 256
33
+ <% if ENV['BEAKER_PUPPET_ENVIRONMENT'] -%>
34
+ puppet_environment: <%= ENV['BEAKER_PUPPET_ENVIRONMENT'] %>
35
+ <% end -%>
@@ -0,0 +1,34 @@
1
+ <%
2
+ if ENV['BEAKER_HYPERVISOR']
3
+ hypervisor = ENV['BEAKER_HYPERVISOR']
4
+ else
5
+ hypervisor = 'vagrant'
6
+ end
7
+ -%>
8
+ HOSTS:
9
+ win:
10
+ roles:
11
+ - windows
12
+ platform: windows-server-amd64
13
+ box: gusztavvargadr/windows-server
14
+ hypervisor: <%= hypervisor %>
15
+ vagrant_memsize: 2048
16
+ vagrant_cpus: 2
17
+ user: vagrant
18
+ communicator: winrm
19
+ is_cygwin: false
20
+
21
+ el7:
22
+ roles:
23
+ - default
24
+ platform: el-7-x86_64
25
+ box: centos/7
26
+ hypervisor: <%= hypervisor %>
27
+
28
+ CONFIG:
29
+ log_level: verbose
30
+ type: aio
31
+ vagrant_memsize: 256
32
+ <% if ENV['BEAKER_PUPPET_ENVIRONMENT'] -%>
33
+ puppet_environment: <%= ENV['BEAKER_PUPPET_ENVIRONMENT'] %>
34
+ <% end -%>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simp-beaker-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.17.0
4
+ version: 1.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Tessmer
@@ -9,22 +9,28 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-10-22 00:00:00.000000000 Z
12
+ date: 2020-02-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: beaker
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - "~>"
18
+ - - ">="
19
+ - !ruby/object:Gem::Version
20
+ version: 4.16.0
21
+ - - "<"
19
22
  - !ruby/object:Gem::Version
20
- version: '4.0'
23
+ version: 5.0.0
21
24
  type: :runtime
22
25
  prerelease: false
23
26
  version_requirements: !ruby/object:Gem::Requirement
24
27
  requirements:
25
- - - "~>"
28
+ - - ">="
26
29
  - !ruby/object:Gem::Version
27
- version: '4.0'
30
+ version: 4.16.0
31
+ - - "<"
32
+ - !ruby/object:Gem::Version
33
+ version: 5.0.0
28
34
  - !ruby/object:Gem::Dependency
29
35
  name: beaker-rspec
30
36
  requirement: !ruby/object:Gem::Requirement
@@ -43,16 +49,22 @@ dependencies:
43
49
  name: beaker-puppet
44
50
  requirement: !ruby/object:Gem::Requirement
45
51
  requirements:
46
- - - "~>"
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: 1.18.12
55
+ - - "<"
47
56
  - !ruby/object:Gem::Version
48
- version: '1.0'
57
+ version: 2.0.0
49
58
  type: :runtime
50
59
  prerelease: false
51
60
  version_requirements: !ruby/object:Gem::Requirement
52
61
  requirements:
53
- - - "~>"
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ version: 1.18.12
65
+ - - "<"
54
66
  - !ruby/object:Gem::Version
55
- version: '1.0'
67
+ version: 2.0.0
56
68
  - !ruby/object:Gem::Dependency
57
69
  name: beaker-docker
58
70
  requirement: !ruby/object:Gem::Requirement
@@ -71,16 +83,22 @@ dependencies:
71
83
  name: beaker-vagrant
72
84
  requirement: !ruby/object:Gem::Requirement
73
85
  requirements:
74
- - - "~>"
86
+ - - '='
75
87
  - !ruby/object:Gem::Version
76
- version: '0.5'
88
+ version: 0.6.4
89
+ - - "<"
90
+ - !ruby/object:Gem::Version
91
+ version: 2.0.0
77
92
  type: :runtime
78
93
  prerelease: false
79
94
  version_requirements: !ruby/object:Gem::Requirement
80
95
  requirements:
81
- - - "~>"
96
+ - - '='
97
+ - !ruby/object:Gem::Version
98
+ version: 0.6.4
99
+ - - "<"
82
100
  - !ruby/object:Gem::Version
83
- version: '0.5'
101
+ version: 2.0.0
84
102
  - !ruby/object:Gem::Dependency
85
103
  name: beaker-puppet_install_helper
86
104
  requirement: !ruby/object:Gem::Requirement
@@ -191,6 +209,8 @@ files:
191
209
  - spec/acceptance/suites/windows/00_default_spec.rb
192
210
  - spec/acceptance/suites/windows/metadata.yml
193
211
  - spec/acceptance/suites/windows/nodesets/default.yml
212
+ - spec/acceptance/suites/windows/nodesets/win2016.yml
213
+ - spec/acceptance/suites/windows/nodesets/win2019.yml
194
214
  - spec/lib/simp/beaker_helpers_spec.rb
195
215
  - spec/spec_helper.rb
196
216
  - spec/spec_helper_acceptance.rb