From f73bb7876561d47609bf21e6a37a25ec48fc3edd Mon Sep 17 00:00:00 2001 From: Aaron McCracken Date: Tue, 30 Jan 2024 16:22:04 +0000 Subject: [PATCH] tests passing successfully --- spec/classes/pg_repack_spec.rb | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/spec/classes/pg_repack_spec.rb b/spec/classes/pg_repack_spec.rb index bfd85c6..18f05d9 100644 --- a/spec/classes/pg_repack_spec.rb +++ b/spec/classes/pg_repack_spec.rb @@ -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 @@ -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('\\', ''), ) @@ -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]}}, ) [