beaker 4.10.0 → 4.11.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: e7c29f137a2fc6b34d0503cd2e0db009a3b42dff
4
- data.tar.gz: 8036e85ce20e94d978d300d257dba7480cd13a98
3
+ metadata.gz: 6e9ddb99c16ca4103cc2836b35a440dc9db6db6f
4
+ data.tar.gz: eff6a1f77989d1a28e1e488d99eaa7d89677ded0
5
5
  SHA512:
6
- metadata.gz: 692f011aa278495d2d45790412abe987e54b36297088f0826527f1e267df9b9e5d9d17858cf070c97a691e5de9fd1bb3d68b6f2f97c3374dfd00c9057a8a6354
7
- data.tar.gz: 7ac79722b6a8679366cb4f73517b13a2b0e410846b6c1ff4ce7e0d51dca8c7a2ead15e29c9b25347a68b356f80d71ce8c58126807dea7d9d92c937ad39af8fbe
6
+ metadata.gz: f19c58ffdfb656152da9c875e61dd12b8ac7b2a96b8186c04c5b791ffc907e7571c23be0b8db3b0c37751d0d25585f681226239847b88d5c1819a496cc97fa58
7
+ data.tar.gz: fe6f360fd641e876a0193d1561506ffe8efa716d9904be6a13ba55763a65050e7e16881077c5f22ca796bfce9cb34601046e5970bd31c9dab12a9ee5920d61a8
@@ -11,7 +11,20 @@ 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.9.0...master)
14
+ # [Unreleased](https://github.com/puppetlabs/beaker/compare/4.11.0...master)
15
+
16
+ # [4.11.0](https://github.com/puppetlabs/beaker/compare/4.10.0...4.11.0) - 2019-07-22
17
+
18
+ ### Added
19
+
20
+ - FIPS detection host method (BKR-1604)
21
+ - PassTest exception catching for standard reporting
22
+
23
+ # [4.10.0](https://github.com/puppetlabs/beaker/compare/4.9.0...4.10.0) - 2019-07-01
24
+
25
+ ### Added
26
+
27
+ - Down & Up Checking to Host#reboot (BKR-1595)
15
28
 
16
29
  # [4.9.0](https://github.com/puppetlabs/beaker/compare/4.8.0...4.9.0) - 2019-06-19
17
30
 
@@ -209,6 +209,20 @@ module Beaker
209
209
  graceful
210
210
  end
211
211
 
212
+ # Returns true if the host is running in FIPS mode.
213
+ #
214
+ # We currently only test FIPS mode on Redhat 7. Other detection
215
+ # modes should be added here if we expand FIPS support to other
216
+ # platforms.
217
+ def fips_mode?
218
+ case self['platform']
219
+ when /el-7/
220
+ execute("cat /proc/sys/crypto/fips_enabled") == "1"
221
+ else
222
+ false
223
+ end
224
+ end
225
+
212
226
  # Modifies the host settings to indicate that it will be using passenger service scripts,
213
227
  # (apache2) by default. Does nothing if this is a PE host, since it is already using
214
228
  # passenger.
@@ -133,6 +133,8 @@ module Beaker
133
133
  eval test,nil,path,1
134
134
  rescue FailTest, TEST_EXCEPTION_CLASS => e
135
135
  log_and_fail_test(e, :fail)
136
+ rescue PassTest
137
+ @test_status = :pass
136
138
  rescue PendingTest
137
139
  @test_status = :pending
138
140
  rescue SkipTest
@@ -1,5 +1,5 @@
1
1
  module Beaker
2
2
  module Version
3
- STRING = '4.10.0'
3
+ STRING = '4.11.0'
4
4
  end
5
5
  end
@@ -849,5 +849,24 @@ module Beaker
849
849
  expect(host.down?).to be true
850
850
  end
851
851
  end
852
+
853
+ describe "#fips_mode?" do
854
+ it 'returns false on non-el7 hosts' do
855
+ @platform = 'windows'
856
+ expect(host.fips_mode?).to be false
857
+ end
858
+
859
+ it 'returns true when the `fips_enabled` file is present and contains "1"' do
860
+ @platform = 'el-7'
861
+ expect(host).to receive(:execute).with("cat /proc/sys/crypto/fips_enabled").and_return("1")
862
+ expect(host.fips_mode?).to be true
863
+ end
864
+
865
+ it 'returns false when the `fips_enabled` file is present and contains "0"' do
866
+ @platform = 'el-7'
867
+ expect(host).to receive(:execute).with("cat /proc/sys/crypto/fips_enabled").and_return("0")
868
+ expect(host.fips_mode?).to be false
869
+ end
870
+ end
852
871
  end
853
872
  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.10.0
4
+ version: 4.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-01 00:00:00.000000000 Z
11
+ date: 2019-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec