Skip to content

Commit

Permalink
Make sure that the interval ends up in the conf
Browse files Browse the repository at this point in the history
  • Loading branch information
nbarrientos committed Oct 10, 2018
1 parent 8ae05df commit f9b83ce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spec/classes/collectd_plugin_postgresql_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
'user' => 'postgres',
'password' => 'postgres',
'sslmode' => 'disable',
'query' => %w[disk_io log_delay]
'query' => %w[disk_io log_delay],
'interval' => 60
}
},
queries: {
Expand All @@ -61,6 +62,7 @@
it "Will create #{options[:plugin_conf_dir]}/postgresql-config.conf" do
is_expected.to contain_concat__fragment('collectd_plugin_postgresql_conf_db_postgres').with(content: %r{Host \"localhost\"})
is_expected.to contain_concat__fragment('collectd_plugin_postgresql_conf_db_postgres').with(content: %r{Query \"disk_io\"})
is_expected.to contain_concat__fragment('collectd_plugin_postgresql_conf_db_postgres').with(content: %r{Interval 60})
is_expected.to contain_concat__fragment('collectd_plugin_postgresql_conf_query_log_delay').with(content: %r{Statement \"SELECT \* FROM log_delay_repli;\"\n})
is_expected.to contain_concat__fragment('collectd_plugin_postgresql_conf_query_log_delay').with(content: %r{<Result>\n})
is_expected.to contain_concat__fragment('collectd_plugin_postgresql_conf_query_log_delay').with(content: %r{Param \"database\"})
Expand Down

0 comments on commit f9b83ce

Please sign in to comment.