Skip to content

Commit

Permalink
tests passing successfully
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaronoftheages committed Jan 30, 2024
1 parent e2ed071 commit f73bb78
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions spec/classes/pg_repack_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,21 @@
tables: '-t factsets -t fact_paths',
schedule: 'Tue,Sat \*-\*-\* 04:30:00',
database: '-d pe-puppetdb',
log: '--elevel DEBUG -d pe-puppetdb'
},
catalogs: {
tables: '-t catalogs -t catalog_resources -t catalog_inputs -t edges -t certnames',
schedule: 'Sun,Thu \*-\*-\* 04:30:00',
database: '-d pe-puppetdb',
log: '--elevel DEBUG -d pe-puppetdb'
},
other: {
tables: '-t producers -t resource_params -t resource_params_cache',
schedule: '\*-\*-20 05:30:00',
database: '-d pe-puppetdb',
log: '--elevel DEBUG -d pe-puppetdb'
},
activity: {
tables: '-t events -t event_commits',
schedule: 'Wed,Fri \*-\*-\* 04:30:00',
database: '-d pe-activity',
log: '--elevel DEBUG -d pe-puppetdb'
}
}
end
Expand Down Expand Up @@ -60,9 +56,7 @@
tables_hash.each do |name, val|
is_expected.to contain_pe_databases__collect(name).with(
disable_maintenance: false,
enable_echo: true,
repack_log_level: 'DEBUG',
command: "#{repack_cmd} #{val[:database]}",
command: "#{repack_cmd} --elevel DEBUG --echo #{val[:database]}",
# Strip the backslash character because this is not a regex
on_cal: (val[:schedule]).to_s.tr('\\', ''),
)
Expand All @@ -72,7 +66,7 @@

is_expected.to contain_file("/etc/systemd/system/pe_databases-#{name}.timer").with_content(%r{OnCalendar=#{val[:schedule]}})
is_expected.to contain_file("/etc/systemd/system/pe_databases-#{name}.service").with_content(
%r{ExecStart=#{repack_cmd} #{val[:database]} #{val[:tables]}},
%r{ExecStart=#{repack_cmd} --elevel DEBUG --echo #{val[:database]} #{val[:tables]}},
)

[
Expand Down

0 comments on commit f73bb78

Please sign in to comment.