Skip to content

Commit cc3f2aa

Browse files
Merge pull request #165 from puppetlabs/resolvelintissues
Resolving linting issues
2 parents 2c7b3db + e54a8c8 commit cc3f2aa

File tree

2 files changed

+22
-23
lines changed

2 files changed

+22
-23
lines changed

spec/plans/convert_spec.rb

+15-15
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,20 @@
88
JSON.parse File.read(File.expand_path(File.join(fixtures, 'plans', 'trusted_facts.json')))
99
end
1010

11-
it 'single primary no dr valid' do
12-
expect_out_message()
13-
expect_task('peadm::trusted_facts').return_for_targets(
11+
it 'single primary no dr valid' do
12+
expect_out_message
13+
expect_task('peadm::trusted_facts').return_for_targets(
1414

15-
'primary' => trustedjson,
16-
)
17-
pending('a lack of support for functions requires a workaround to be written')
18-
expect_task('peadm::read_file').always_return({'content' => '2019.2.4'})
19-
expect_command('systemctl is-active puppet.service')
20-
expect_command('systemctl stop puppet.service')
21-
#expect_plan('peadm::util::add_cert_extensions')
22-
allow_apply()
23-
expect_task('peadm::cert_data')
24-
expect_task('peadm::puppet_runonce')
25-
expect(run_plan('peadm::convert', 'primary_host' => 'primary')).to be_ok
15+
'primary' => trustedjson,
16+
)
17+
pending('a lack of support for functions requires a workaround to be written')
18+
expect_task('peadm::read_file').always_return({ 'content' => '2019.2.4' })
19+
expect_command('systemctl is-active puppet.service')
20+
expect_command('systemctl stop puppet.service')
21+
# expect_plan('peadm::util::add_cert_extensions')
22+
allow_apply
23+
expect_task('peadm::cert_data')
24+
expect_task('peadm::puppet_runonce')
25+
expect(run_plan('peadm::convert', 'primary_host' => 'primary')).to be_ok
2626
end
27-
end
27+
end
+7-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# spec/spec_helper.rb
22

3-
43
describe 'peadm::util::sanitize_pg_pe_conf ' do
54
# Include the BoltSpec library functions
65
include BoltSpec::Plans
@@ -9,12 +8,12 @@
98
JSON.parse File.read(File.expand_path(File.join(fixtures, 'plans', 'pe_conf.json')))
109
end
1110

12-
it 'Runs' do
13-
# 1) peadm::util::sanitize_pg_pe_conf Runs
14-
#Failure/Error: expect(run_plan('peadm::util::sanitize_pg_pe_conf', 'targets' => 'foo,bar', 'primary_host' => 'pe-server-d8b317-0.us-west1-a.c.davidsand.internal')).to be_ok
15-
#expected `#<Bolt::PlanResult:0x00007fd37d94b8a0 @value=#<Bolt::PAL::PALError: undefined method `start_with?' for #<Hash:0x00007fd36e30b350>>, @status="failure">.ok?` to be truthy, got false
16-
pending('a lack of support for functions requires a workaround to be written')
17-
expect_task('peadm::read_file').always_return('content' => pe_conf_json)
18-
expect(run_plan('peadm::util::sanitize_pg_pe_conf', 'targets' => 'foo,bar', 'primary_host' => 'pe-server-d8b317-0.us-west1-a.c.davidsand.internal')).to be_ok
11+
it 'Runs' do
12+
# 1) peadm::util::sanitize_pg_pe_conf Runs
13+
# Failure/Error: expect(run_plan('peadm::util::sanitize_pg_pe_conf', 'targets' => 'foo,bar', 'primary_host' => 'pe-server-d8b317-0.us-west1-a.c.davidsand.internal')).to be_ok
14+
# expected `#<Bolt::PlanResult:0x00007fd37d94b8a0 @value=#<Bolt::PAL::PALError: undefined method `start_with?' for #<Hash:0x00007fd36e30b350>>, @status="failure">.ok?` to be truthy, got false
15+
pending('a lack of support for functions requires a workaround to be written')
16+
expect_task('peadm::read_file').always_return('content' => pe_conf_json)
17+
expect(run_plan('peadm::util::sanitize_pg_pe_conf', 'targets' => 'foo,bar', 'primary_host' => 'pe-server-d8b317-0.us-west1-a.c.davidsand.internal')).to be_ok
1918
end
2019
end

0 commit comments

Comments
 (0)