beaker 4.2.0 → 4.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 700b4229c8f566623b2a3a3caf5ae26308c4bb82
4
- data.tar.gz: 27a0432eaba2fd5cb77080b86faac0c1b337062f
3
+ metadata.gz: 42f1138cc5ec8c7a9061bc89231e3eaeb8eec7f8
4
+ data.tar.gz: b9bc35774979598ad0b93cfc6034a5112a47c637
5
5
  SHA512:
6
- metadata.gz: 906361a2f47a868f2062684db26eac305079df40c11aefbc081316d01722a82ed18f94f808aba9167bbe52a656a4c6d3f07c9a27ec1cc2dd341d1b0bd90a5171
7
- data.tar.gz: b763ee73c7882b8280da83dbab6fcbc7817c1d2b19ff5ea7aa43b7fedcf90e0bf5c3c44d8a397b519d437b7f0c36f81051b94377b275e3511481bfadadb2bad8
6
+ metadata.gz: 58a79da7a9579907481842211a661163c4fd82cf6f4da34c644e32997fb5c2193f7064cfce6832e014c4c9405163176898d4fe94593333530985bfa100bbb2a2
7
+ data.tar.gz: 1ef6ae9adb6da65eb28bdc01c7e920b55d633debc1036dfe62d0778b852dbd5d3c394b2829e1709a934acb0f1f0138ca681f5d5324b92614263c4085cf2b4f7c
@@ -11,7 +11,14 @@ 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/4.2.0...master)
14
+ # [Unreleased](https://github.com/puppetlabs/beaker/compare/4.3.0...master)
15
+
16
+ # [4.3.0](https://github.com/puppetlabs/beaker/compare/4.2.0...4.3.0) - 2018.12.12
17
+
18
+ ### Added
19
+
20
+ - Use zypper to install RPM packages on SLES (PA-2336)
21
+ - Add only-fails capability to beaker (BKR-1523)
15
22
 
16
23
  # [4.2.0](https://github.com/puppetlabs/beaker/compare/4.1.0...4.2.0) - 2018.11.28
17
24
 
@@ -514,7 +514,7 @@ module Unix::Pkg
514
514
  command_name = 'dnf 'if variant == 'fedora' && version > 21 && version <= 29
515
515
  execute("#{command_name} --nogpgcheck localinstall -y #{onhost_package_file}")
516
516
  when /^(sles)$/
517
- execute("rpm -ihv #{onhost_package_file}")
517
+ execute("zypper --non-interactive --no-gpg-checks in #{onhost_package_file}")
518
518
  when /^(debian|ubuntu|cumulus)$/
519
519
  execute("dpkg -i --force-all #{onhost_package_file}")
520
520
  execute("apt-get update")
@@ -194,6 +194,12 @@ module Beaker
194
194
  @cmd_options[:fail_mode] = mode =~ /stop/ ? 'fast' : mode
195
195
  end
196
196
 
197
+ opts.on '--test-results-file /FILE/TO/SAVE/TO.rb',
198
+ 'Path to persist errors/failures from the current run to',
199
+ '(default: not saved)' do |value|
200
+ @cmd_options[:test_results_file] = value
201
+ end
202
+
197
203
  opts.on '--[no-]ntp',
198
204
  'Sync time on SUTs before testing',
199
205
  '(default: false)' do |bool|
@@ -164,6 +164,7 @@ module Beaker
164
164
  :test_tag_exclude => '',
165
165
  :timeout => 900, # 15 minutes
166
166
  :fail_mode => 'slow',
167
+ :test_results_file => '',
167
168
  :accept_all_exit_codes => false,
168
169
  :timesync => false,
169
170
  :disable_iptables => false,
@@ -43,6 +43,7 @@ module Beaker
43
43
  class_option :'log-prefix', :type => :string, :group => 'Beaker run'
44
44
  class_option :'dry-run', :type => :boolean, :group => 'Beaker run'
45
45
  class_option :'fail-mode', :type => :string, :group => 'Beaker run'
46
+ class_option :'test-results-file', :type => :string, :group => 'Beaker run'
46
47
  class_option :ntp, :type => :boolean, :group => 'Beaker run'
47
48
  class_option :'repo-proxy', :type => :boolean, :group => 'Beaker run'
48
49
  class_option :'add-el-extras', :type => :boolean, :group => 'Beaker run'
@@ -98,6 +98,9 @@ module Beaker
98
98
  else
99
99
  @test_suite_results.write_junit_xml( junit_file_log )
100
100
  end
101
+
102
+ @test_suite_results.persist_test_results(@options[:test_results_file])
103
+
101
104
  #All done with this run, remove run log
102
105
  @logger.remove_destination(run_log)
103
106
 
@@ -150,6 +150,17 @@ module Beaker
150
150
  " Test Case #{test_case.path} #{test_reported}"
151
151
  end
152
152
 
153
+ # Saves failure and error cases as a JSON file for only-failures processing
154
+ #
155
+ # @param [String] filepath Where to put the results
156
+ #
157
+ def persist_test_results(filepath)
158
+ return if filepath.empty?
159
+
160
+ results = @test_cases.select { |c| [:fail, :error].include? c.test_status }.map(&:path)
161
+ File.open(filepath, 'w') { |file| file.puts JSON.dump(results) }
162
+ end
163
+
153
164
  # Writes Junit XML of this {TestSuiteResult}
154
165
  #
155
166
  # @param [String] xml_file Path to the XML file (from Beaker's running directory)
@@ -1,5 +1,5 @@
1
1
  module Beaker
2
2
  module Version
3
- STRING = '4.2.0'
3
+ STRING = '4.3.0'
4
4
  end
5
5
  end
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: 4.2.0
4
+ version: 4.3.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-11-28 00:00:00.000000000 Z
11
+ date: 2018-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec