Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolving linting issues #165

Merged
merged 1 commit into from
Jun 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions spec/plans/convert_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@
JSON.parse File.read(File.expand_path(File.join(fixtures, 'plans', 'trusted_facts.json')))
end

it 'single primary no dr valid' do
expect_out_message()
expect_task('peadm::trusted_facts').return_for_targets(
it 'single primary no dr valid' do
expect_out_message
expect_task('peadm::trusted_facts').return_for_targets(

'primary' => trustedjson,
)
pending('a lack of support for functions requires a workaround to be written')
expect_task('peadm::read_file').always_return({'content' => '2019.2.4'})
expect_command('systemctl is-active puppet.service')
expect_command('systemctl stop puppet.service')
#expect_plan('peadm::util::add_cert_extensions')
allow_apply()
expect_task('peadm::cert_data')
expect_task('peadm::puppet_runonce')
expect(run_plan('peadm::convert', 'primary_host' => 'primary')).to be_ok
'primary' => trustedjson,
)
pending('a lack of support for functions requires a workaround to be written')
expect_task('peadm::read_file').always_return({ 'content' => '2019.2.4' })
expect_command('systemctl is-active puppet.service')
expect_command('systemctl stop puppet.service')
# expect_plan('peadm::util::add_cert_extensions')
allow_apply
expect_task('peadm::cert_data')
expect_task('peadm::puppet_runonce')
expect(run_plan('peadm::convert', 'primary_host' => 'primary')).to be_ok
end
end
end
15 changes: 7 additions & 8 deletions spec/plans/util/sanitize_pg_pe_conf_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# spec/spec_helper.rb


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

it 'Runs' do
# 1) peadm::util::sanitize_pg_pe_conf Runs
#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
#expected `#<Bolt::PlanResult:0x00007fd37d94b8a0 @value=#<Bolt::PAL::PALError: undefined method `start_with?' for #<Hash:0x00007fd36e30b350>>, @status="failure">.ok?` to be truthy, got false
pending('a lack of support for functions requires a workaround to be written')
expect_task('peadm::read_file').always_return('content' => pe_conf_json)
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
it 'Runs' do
# 1) peadm::util::sanitize_pg_pe_conf Runs
# 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
# expected `#<Bolt::PlanResult:0x00007fd37d94b8a0 @value=#<Bolt::PAL::PALError: undefined method `start_with?' for #<Hash:0x00007fd36e30b350>>, @status="failure">.ok?` to be truthy, got false
pending('a lack of support for functions requires a workaround to be written')
expect_task('peadm::read_file').always_return('content' => pe_conf_json)
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
end
end