beaker 3.31.0 → 3.32.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
  SHA1:
3
- metadata.gz: 34dbd998615fd6ab9d882e345bf19b94aa38b085
4
- data.tar.gz: 4f472e8f75d72030b3ee87422c4b82e5bd5b4efb
3
+ metadata.gz: 63718888ab30bc62003ce3294ba8537125384e0f
4
+ data.tar.gz: 69905b24c7dbbfb1282803f8c9f08c5d7e47b826
5
5
  SHA512:
6
- metadata.gz: ae8661f6efcb5299680a351f1cff6f8bb4ca51f07d42a7c7601649538a949abf2bc534fa5956ebbeca492500e19bff58e2a5b2a39eb1d3dccdb9433066bb84c2
7
- data.tar.gz: '0890f0e10493fe424309af1d539bc1f6879b60c939a97de2b608381a22193353aeba5a328a2d2a1f6ecae0f05fa5c5d99880bf5e07a6623d00002136815db096'
6
+ metadata.gz: bb3dc383b35d8037283e4b0d9c0b13f9eb84dda48ea235c5bc305b6c71551d792a15e8a6bbc201e398f76da04e8d0bfff18de1b788a8c16838b9eb08a5b8cc76
7
+ data.tar.gz: 17148bf32c0a504eaa38b62bcc620d6003ed2c952b18a16c54d209aeca8f485b035b9dc5097c1350f626540f1197ffa7c7276a8df3ca09023af4959540be55d1
@@ -11,9 +11,21 @@ Tracking in this Changelog began for this project in version 3.25.0.
11
11
  If you're looking for changes from before this, refer to the project's
12
12
  git logs & PR history.
13
13
 
14
- # [Unreleased](https://github.com/puppetlabs/beaker/compare/3.31.0...master)
14
+ # [Unreleased](https://github.com/puppetlabs/beaker/compare/3.32.0...master)
15
15
 
16
- # [3.30.0](https://github.com/puppetlabs/beaker/compare/3.30.0...3.31.0) - 2018-01-22
16
+ # [3.32.0](https://github.com/puppetlabs/beaker/compare/3.31.0...3.32.0) - 2018-02-22
17
+
18
+ ### Changed
19
+
20
+ - Fully qualify sles ssh restart cmd
21
+ - Deprecated deploy_package_repo methods
22
+ - Configuration of host type in host_prebuilt_steps
23
+
24
+ ### Added
25
+
26
+ - Added missing beaker options for subcommand passthorugh
27
+
28
+ # [3.31.0](https://github.com/puppetlabs/beaker/compare/3.30.0...3.31.0) - 2018-01-22
17
29
 
18
30
  ### Changed
19
31
 
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env bash
2
+
3
+ top_level=$(git rev-parse --show-toplevel)
4
+ acceptance_test_base="$top_level/acceptance/tests/base"
5
+
6
+ find $acceptance_test_base -type f -name '*.rb' |
7
+ grep -v host_test.rb |
8
+ awk 'BEGIN {
9
+ comma_index = 1
10
+ } {
11
+ if (comma_index == 1) {
12
+ comma_string = $0
13
+ } else {
14
+ comma_string = comma_string "," $0
15
+ }
16
+ comma_index = comma_index + 1
17
+ } END {
18
+ print comma_string
19
+ }'
@@ -27,7 +27,7 @@ Gem::Specification.new do |s|
27
27
  s.add_development_dependency 'rake', '~> 10.0'
28
28
 
29
29
  # Documentation dependencies
30
- s.add_development_dependency 'yard', '< 0.9.6'
30
+ s.add_development_dependency 'yard', '~> 0.9.11'
31
31
 
32
32
  # Run time dependencies
33
33
  s.add_runtime_dependency 'minitest', '~> 5.4'
@@ -297,6 +297,8 @@ module Beaker
297
297
  # packaging tools. This can be determined with
298
298
  # `rake pl:print_build_params` from the packaging
299
299
  # repo.
300
+ # @deprecated no longer used in beaker, beaker-puppet, or beaker-pe
301
+ # @visibility private
300
302
  def deploy_package_repo host, path, name, version
301
303
  host.deploy_package_repo path, name, version
302
304
  end
@@ -22,7 +22,7 @@ module Beaker
22
22
  # @param [Block] block This method will yield to a block of code passed by the caller
23
23
  #
24
24
  # @return [Array<Result>, Result, nil] An array of results, a result object, or nil.
25
- # Check {#run_block_on} for more details on this.
25
+ # Check {Beaker::Shared::HostManager#run_block_on} for more details on this.
26
26
  def block_on hosts_or_filter, opts={}, &block
27
27
  block_hosts = nil
28
28
  if defined? hosts
@@ -171,7 +171,7 @@ module Unix::Exec
171
171
  when /el-|centos|fedora|redhat|oracle|scientific|eos/
172
172
  exec(Beaker::Command.new("/sbin/service sshd restart"))
173
173
  when /sles/
174
- exec(Beaker::Command.new("rcsshd restart"))
174
+ exec(Beaker::Command.new("/usr/sbin/rcsshd restart"))
175
175
  when /solaris/
176
176
  exec(Beaker::Command.new("svcadm restart svc:/network/ssh:default"))
177
177
  when /(free|open)bsd/
@@ -227,6 +227,8 @@ module Unix::Pkg
227
227
  #
228
228
  # @note See {Beaker::DSL::Helpers::HostHelpers#deploy_package_repo} for info on
229
229
  # params
230
+ # @deprecated no longer used in beaker, beaker-puppet, or beaker-pe
231
+ # @visibility private
230
232
  def deploy_apt_repo(path, name, version)
231
233
  codename = self['platform'].codename
232
234
 
@@ -244,6 +246,8 @@ module Unix::Pkg
244
246
  #
245
247
  # @note See {Beaker::DSL::Helpers::HostHelpers#deploy_package_repo} for info on
246
248
  # params
249
+ # @deprecated no longer used in beaker, beaker-puppet, or beaker-pe
250
+ # @visibility private
247
251
  def deploy_yum_repo(path, name, version)
248
252
  repo_file = "#{path}/rpm/pl-#{name}-#{version}-repos-pe-#{self['platform']}.repo"
249
253
  do_scp_to repo_file, "/etc/yum.repos.d/#{name}.repo", {}
@@ -253,6 +257,8 @@ module Unix::Pkg
253
257
  #
254
258
  # @note See {Beaker::DSL::Helpers::HostHelpers#deploy_package_repo} for info on
255
259
  # params
260
+ # @deprecated no longer used in beaker, beaker-puppet, or beaker-pe
261
+ # @visibility private
256
262
  def deploy_zyp_repo(path, name, version)
257
263
  repo_file = "#{path}/rpm/pl-#{name}-#{version}-repos-pe-#{self['platform']}.repo"
258
264
  repo = IniFile.load(repo_file)
@@ -268,6 +274,8 @@ module Unix::Pkg
268
274
  #
269
275
  # @note See {Beaker::DSL::Helpers::HostHelpers#deploy_package_repo} for info on
270
276
  # params
277
+ # @deprecated no longer used in beaker, beaker-puppet, or beaker-pe
278
+ # @visibility private
271
279
  def deploy_package_repo(path, name, version)
272
280
  if not File.exists? path
273
281
  @logger.warn "Was asked to deploy package repository from #{path}, but it doesn't exist!"
@@ -558,32 +558,32 @@ module Beaker
558
558
 
559
559
  block_on host do |host|
560
560
  skip_msg = host.skip_set_env?
561
- unless skip_msg.nil?
562
- logger.debug( skip_msg )
563
- next
564
- end
565
-
566
- env = construct_env(host, opts)
567
- logger.debug("setting local environment on #{host.name}")
568
- if host['platform'] =~ /windows/ and host.is_cygwin?
569
- env['CYGWIN'] = 'nodosfilewarning'
561
+ if skip_msg.nil?
562
+ env = construct_env(host, opts)
563
+ logger.debug("setting local environment on #{host.name}")
564
+ if host['platform'] =~ /windows/ and host.is_cygwin?
565
+ env['CYGWIN'] = 'nodosfilewarning'
566
+ end
567
+ host.ssh_permit_user_environment
568
+ host.ssh_set_user_environment(env)
569
+ else
570
+ logger.debug(skip_msg)
570
571
  end
571
- host.ssh_permit_user_environment()
572
-
573
- host.ssh_set_user_environment(env)
574
572
 
575
573
  # REMOVE POST BEAKER 3: backwards compatability, do some setup based upon the global type
576
574
  # this is the worst and i hate it
577
575
  Class.new.extend(Beaker::DSL).configure_type_defaults_on(host)
578
576
 
579
- #close the host to re-establish the connection with the new sshd settings
580
- host.close
577
+ if skip_msg.nil?
578
+ #close the host to re-establish the connection with the new sshd settings
579
+ host.close
581
580
 
582
- # print out the working env
583
- if host.is_powershell?
584
- host.exec(Command.new("SET"))
585
- else
586
- host.exec(Command.new("cat #{host[:ssh_env_file]}"))
581
+ # print out the working env
582
+ if host.is_powershell?
583
+ host.exec(Command.new("SET"))
584
+ else
585
+ host.exec(Command.new("cat #{host[:ssh_env_file]}"))
586
+ end
587
587
  end
588
588
 
589
589
  end
@@ -53,6 +53,9 @@ module Beaker
53
53
  class_option :'xml-time-order', :type => :boolean, :group => 'Beaker run'
54
54
  class_option :'debug-errors', :type => :boolean, :group => 'Beaker run'
55
55
  class_option :'exec_manual_tests', :type => :boolean, :group => 'Beaker run'
56
+ class_option :'test-tag-exclude', :type => :string, :group => 'Beaker run'
57
+ class_option :'test-tag-and', :type => :string, :group => 'Beaker run'
58
+ class_option :'test-tag-or', :type => :string, :group => 'Beaker run'
56
59
 
57
60
  # The following are listed as deprecated in beaker --help, but needed now for
58
61
  # feature parity for beaker 3.x.
@@ -1,5 +1,5 @@
1
1
  module Beaker
2
2
  module Version
3
- STRING = '3.31.0'
3
+ STRING = '3.32.0'
4
4
  end
5
5
  end
@@ -32,6 +32,76 @@ module Beaker
32
32
  end
33
33
  end
34
34
 
35
+ context 'ensure that beaker options can be passed through' do
36
+
37
+ let (:beaker_options_list) { [
38
+ 'options-file',
39
+ 'helper',
40
+ 'load-path',
41
+ 'tests',
42
+ 'pre-suite',
43
+ 'post-suite',
44
+ 'pre-cleanup',
45
+ 'provision',
46
+ 'preserve-hosts',
47
+ 'root-keys',
48
+ 'keyfile',
49
+ 'timeout',
50
+ 'install',
51
+ 'modules',
52
+ 'quiet',
53
+ 'color',
54
+ 'color-host-output',
55
+ 'log-level',
56
+ 'log-prefix',
57
+ 'dry-run',
58
+ 'fail-mode',
59
+ 'ntp',
60
+ 'repo-proxy',
61
+ 'add-el-extras',
62
+ 'package-proxy',
63
+ 'validate',
64
+ 'collect-perf-data',
65
+ 'parse-only',
66
+ 'tag',
67
+ 'exclude-tags',
68
+ 'xml-time-order',
69
+ 'debug-errors',
70
+ 'exec_manual_tests',
71
+ 'test-tag-exclude',
72
+ 'test-tag-and',
73
+ 'test-tag-or',
74
+ 'xml',
75
+ 'type',
76
+ 'debug',
77
+ ] }
78
+
79
+ let( :yaml_store_mock ) { double('yaml_store_mock') }
80
+
81
+ it 'should not error with valid beaker options' do
82
+ beaker_options_list.each do |option|
83
+ allow(YAML::Store).to receive(:new).with(SubcommandUtil::SUBCOMMAND_STATE).and_return(yaml_store_mock)
84
+ allow(yaml_store_mock).to receive(:transaction).and_yield
85
+ allow(yaml_store_mock).to receive(:[]=).with('provisioned', false)
86
+ allow(File).to receive(:open)
87
+ allow_any_instance_of(Beaker::Logger).to receive(:notify).twice
88
+ expect(SubcommandUtil::SUBCOMMAND_OPTIONS).to receive(:exist?).and_return(true)
89
+ expect(SubcommandUtil::SUBCOMMAND_STATE).to receive(:exist?).and_return(true)
90
+ expect {Beaker::Subcommand.start(['init', '--hosts', 'centos', "--#{option}"])}.to_not output(/ERROR/).to_stderr
91
+ end
92
+ end
93
+
94
+ it "should error with a bad option here" do
95
+ allow(YAML::Store).to receive(:new).with(SubcommandUtil::SUBCOMMAND_STATE).and_return(yaml_store_mock)
96
+ allow(yaml_store_mock).to receive(:transaction).and_yield
97
+ allow(yaml_store_mock).to receive(:[]=).with('provisioned', false)
98
+ expect(File).not_to receive(:open)
99
+ expect(SubcommandUtil::SUBCOMMAND_OPTIONS).to receive(:exist?).and_return(true)
100
+ expect(SubcommandUtil::SUBCOMMAND_STATE).to receive(:exist?).and_return(true)
101
+ expect {Beaker::Subcommand.start(['init', '--hosts', 'centos', '--bad-option'])}.to output(/ERROR/).to_stderr
102
+ end
103
+ end
104
+
35
105
  context '#init' do
36
106
  let( :cli ) { subcommand.instance_variable_get(:@cli) }
37
107
  let( :mock_options ) { {:timestamp => 'noon', :other_key => 'cordite'}}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beaker
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.31.0
4
+ version: 3.32.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-23 00:00:00.000000000 Z
11
+ date: 2018-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -84,16 +84,16 @@ dependencies:
84
84
  name: yard
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "<"
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 0.9.6
89
+ version: 0.9.11
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - "<"
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 0.9.6
96
+ version: 0.9.11
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: minitest
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -529,6 +529,7 @@ files:
529
529
  - acceptance/pre_suite/pe/install.rb
530
530
  - acceptance/pre_suite/subcommands/05_install_ruby.rb
531
531
  - acceptance/pre_suite/subcommands/08_install_beaker.rb
532
+ - acceptance/scripts/all_but_host_test.sh
532
533
  - acceptance/tests/base/README.md
533
534
  - acceptance/tests/base/dsl/helpers/configuration_test.rb
534
535
  - acceptance/tests/base/dsl/helpers/hocon_helpers_test.rb
@@ -806,7 +807,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
806
807
  version: '0'
807
808
  requirements: []
808
809
  rubyforge_project:
809
- rubygems_version: 2.6.12
810
+ rubygems_version: 2.5.1
810
811
  signing_key:
811
812
  specification_version: 4
812
813
  summary: Let's test Puppet!