Skip to content

Commit

Permalink
Fix Layout/ArgumentAlignment cop
Browse files Browse the repository at this point in the history
  • Loading branch information
archanaserver authored and ekohl committed Nov 23, 2023
1 parent dc3c195 commit b88004a
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion definitions/features/candlepin_database.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Features::CandlepinDatabase < ForemanMaintain::Feature
def services
[
system_service('postgresql', 10, :component => 'candlepin',
:db_feature => feature(:candlepin_database)),
:db_feature => feature(:candlepin_database)),
]
end

Expand Down
2 changes: 1 addition & 1 deletion definitions/features/foreman_database.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def config_dirs
def services
[
system_service('postgresql', 10, :component => 'foreman',
:db_feature => feature(:foreman_database)),
:db_feature => feature(:foreman_database)),
]
end

Expand Down
2 changes: 1 addition & 1 deletion definitions/features/pulpcore.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def configured_workers
names = names.map { |f| File.basename(f) }
names.map do |name|
system_service(name, 20, :skip_enablement => true,
:instance_parent_unit => 'pulpcore-worker@')
:instance_parent_unit => 'pulpcore-worker@')
end
end

Expand Down
2 changes: 1 addition & 1 deletion definitions/features/pulpcore_database.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def configuration
def services
[
system_service('postgresql', 10, :component => 'pulpcore',
:db_feature => feature(:pulpcore_database)),
:db_feature => feature(:pulpcore_database)),
]
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class SafetyConfirmation < ForemanMaintain::Procedure
description 'Data consistency warning'
tags :backup
param :include_db_dumps, 'Are database dumps included in backup', :flag => true,
:default => false
:default => false
end

def run
Expand Down
2 changes: 1 addition & 1 deletion definitions/scenarios/backup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def add_snapshot_backup_steps

def add_online_backup_steps
add_step_with_context(Procedures::Backup::ConfigFiles, :ignore_changed_files => true,
:online_backup => true)
:online_backup => true)
add_step_with_context(Procedures::Backup::Pulp, :ensure_unchanged => true)
add_steps_with_context(
Procedures::Backup::Online::CandlepinDB,
Expand Down
2 changes: 1 addition & 1 deletion lib/foreman_maintain/concerns/base_database.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def restore_dump(file, localdb, config = configuration)
' --no-privileges --clean --disable-triggers -n public ' \
"-d #{config['database']} #{file}"
execute!(dump_cmd, :hidden_patterns => [config['password']],
:valid_exit_statuses => [0, 1])
:valid_exit_statuses => [0, 1])
end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/foreman_maintain/concerns/system_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def packages_action(action, packages, options = {})
package_manager.install(packages, :assumeyes => options[:assumeyes])
when :update
package_manager.update(packages, :assumeyes => options[:assumeyes],
:dnf_options => options[:dnf_options])
:dnf_options => options[:dnf_options])
when :remove
package_manager.remove(packages, :assumeyes => options[:assumeyes])
else
Expand Down
2 changes: 1 addition & 1 deletion lib/foreman_maintain/executable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def update_from_hash(hash)
raise "The step is not matching the hash #{hash.inspect}" unless matches_hash?(hash)
raise "Can't update step that was already executed" if @_execution
@_execution = Runner::StoredExecution.new(self, :status => hash[:status],
:output => hash[:output])
:output => hash[:output])
end

def inspect
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@

it 'passes when no reports with association issues detected' do
assume_feature_present(:foreman_openscap, :report_ids_without_host => [],
:report_ids_without_proxy => [],
:report_ids_without_policy => [])
:report_ids_without_proxy => [],
:report_ids_without_policy => [])
result = run_check(subject)
assert result.success?, 'Check expected to succeed'
end

it 'fails when some reports with association issues detected' do
assume_feature_present(:foreman_openscap, :report_ids_without_host => [],
:report_ids_without_proxy => [25],
:report_ids_without_policy => [52])
:report_ids_without_proxy => [25],
:report_ids_without_policy => [52])
result = run_check(subject)
assert result.fail?, 'Check expected to fail'
assert_match 'There are 2 reports with issues that will be removed', result.output
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@

it 'passes when no any error in syntax as well as DHCP subnets' do
assume_feature_present(:foreman_proxy, :dhcpd_conf_exist? => true, :valid_dhcp_configs? => true,
:dhcp_isc_provider? => true)
:dhcp_isc_provider? => true)
result = run_check(subject)
assert result.success?, 'Check expected to succeed'
end

it 'fails when failure either in syntax or in DHCP subnets' do
assume_feature_present(:foreman_proxy, :dhcpd_conf_exist? => true,
:valid_dhcp_configs? => false,
:dhcp_isc_provider? => true)
:valid_dhcp_configs? => false,
:dhcp_isc_provider? => true)
result = run_check(subject)
assert result.fail?, 'Check expected to fail'
assert_match 'Please check and verify DHCP configurations.', result.output
Expand Down

0 comments on commit b88004a

Please sign in to comment.