beaker-puppet 1.6.0 → 1.7.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 91f9dff9d57b28cd3bd634842fdb9cadb179139c
|
4
|
+
data.tar.gz: 94a363edc67c9d806dcd97f99d331bb3ad7a21d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea5fa35c971236f41bdc364f2d6c9f1d73f8009fda38a30da915ff5d36d4033e77f716dbd5ac3b31b59d155bbf0eaa29dbb88984fcdd51b75dfd3b2b443f28f0
|
7
|
+
data.tar.gz: 9b6ddd716275eb8ce105ebc3b36c035e2d835c24ab8a342db70a8740b532fa3e5286e86b631c2cd7cdf92d2f3b003168910c509ab23902fe4f29a247ad69e529
|
data/beaker-puppet.gemspec
CHANGED
@@ -34,6 +34,7 @@ Gem::Specification.new do |s|
|
|
34
34
|
s.add_development_dependency 'thin'
|
35
35
|
|
36
36
|
# Run time dependencies
|
37
|
+
s.add_runtime_dependency 'beaker', '~> 4.1'
|
37
38
|
s.add_runtime_dependency 'stringify-hash', '~> 0.0.0'
|
38
39
|
s.add_runtime_dependency 'in-parallel', '~> 0.1'
|
39
40
|
s.add_runtime_dependency 'oga'
|
@@ -37,13 +37,14 @@ module Beaker
|
|
37
37
|
# @return String The value of the fact 'name' on the provided host
|
38
38
|
# @raise [FailTest] Raises an exception if call to facter fails
|
39
39
|
def fact_on(host, name, opts = {})
|
40
|
+
raise(ArgumentError, "fact_on's `name` option must be a String. You provided a #{name.class}: '#{name}'") unless name.is_a?(String)
|
40
41
|
if opts.kind_of?(Hash)
|
41
42
|
opts.merge!({json: nil})
|
42
43
|
else
|
43
44
|
opts << ' --json'
|
44
45
|
end
|
45
46
|
|
46
|
-
result = on host, facter(name, opts)
|
47
|
+
result = on host, facter("\"#{name}\"", opts)
|
47
48
|
if result.kind_of?(Array)
|
48
49
|
result.map { |res| JSON.parse(res.stdout)[name] }
|
49
50
|
else
|
@@ -34,7 +34,7 @@ describe ClassMixedWithDSLHelpers do
|
|
34
34
|
describe '#fact_on' do
|
35
35
|
it 'retrieves a fact on a single host' do
|
36
36
|
result.stdout = "{\"osfamily\": \"family\"}\n"
|
37
|
-
expect( subject ).to receive(:facter).with('osfamily',{json: nil}).once
|
37
|
+
expect( subject ).to receive(:facter).with('"osfamily"',{json: nil}).once
|
38
38
|
expect( subject ).to receive(:on).and_return(result)
|
39
39
|
|
40
40
|
expect( subject.fact_on('host','osfamily') ).to be === JSON.parse(result.stdout)['osfamily']
|
@@ -67,6 +67,11 @@ describe ClassMixedWithDSLHelpers do
|
|
67
67
|
expect(structured_fact['user'].class).to be String
|
68
68
|
expect(structured_fact['privileged'].class).to be (TrueClass or FalseClass)
|
69
69
|
end
|
70
|
+
|
71
|
+
it 'raises an error when it receives a symbol for a fact' do
|
72
|
+
expect { subject.fact_on('host', :osfamily) }
|
73
|
+
.to raise_error(ArgumentError, /fact_on's `name` option must be a String. You provided a Symbol: 'osfamily'/)
|
74
|
+
end
|
70
75
|
end
|
71
76
|
|
72
77
|
describe '#fact' do
|
data/tasks/ci.rake
CHANGED
@@ -234,8 +234,8 @@ end
|
|
234
234
|
def beaker_suite(type)
|
235
235
|
beaker(:init, '--hosts', ENV['HOSTS'], '--options-file', "config/#{String(type)}/options.rb")
|
236
236
|
beaker(:provision)
|
237
|
-
beaker(:exec, 'pre-suite', '--pre-suite', pre_suites(type))
|
238
|
-
beaker(:exec, 'pre-suite')
|
237
|
+
beaker(:exec, 'pre-suite', '--preserve-state', '--pre-suite', pre_suites(type))
|
238
|
+
beaker(:exec, 'pre-suite', '--preserve-state')
|
239
239
|
beaker(:exec, ENV['TESTS'])
|
240
240
|
beaker(:exec, 'post-suite')
|
241
241
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beaker-puppet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.7.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
|
+
date: 2018-10-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -156,6 +156,20 @@ dependencies:
|
|
156
156
|
- - ">="
|
157
157
|
- !ruby/object:Gem::Version
|
158
158
|
version: '0'
|
159
|
+
- !ruby/object:Gem::Dependency
|
160
|
+
name: beaker
|
161
|
+
requirement: !ruby/object:Gem::Requirement
|
162
|
+
requirements:
|
163
|
+
- - "~>"
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
version: '4.1'
|
166
|
+
type: :runtime
|
167
|
+
prerelease: false
|
168
|
+
version_requirements: !ruby/object:Gem::Requirement
|
169
|
+
requirements:
|
170
|
+
- - "~>"
|
171
|
+
- !ruby/object:Gem::Version
|
172
|
+
version: '4.1'
|
159
173
|
- !ruby/object:Gem::Dependency
|
160
174
|
name: stringify-hash
|
161
175
|
requirement: !ruby/object:Gem::Requirement
|