Skip to content

Commit

Permalink
set expected config file permissions to be non-writable by prometheus
Browse files Browse the repository at this point in the history
  • Loading branch information
anarcat committed Jun 7, 2019
1 parent 40d696d commit e19b6e0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions spec/classes/prometheus_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
it {
is_expected.to contain_file('/etc/prometheus').with(
'ensure' => 'directory',
'owner' => 'prometheus',
'owner' => 'root',
'group' => 'prometheus',
'purge' => true,
'recurse' => true
Expand All @@ -167,9 +167,9 @@
is_expected.to contain_file('prometheus.yaml').with(
'ensure' => 'present',
'path' => '/etc/prometheus/prometheus.yaml',
'owner' => 'prometheus',
'owner' => 'root',
'group' => 'prometheus',
'mode' => '0660',
'mode' => '0640',
'content' => File.read(fixtures('files', "prometheus#{prom_major}.yaml"))
).that_notifies('Class[prometheus::service_reload]')
}
Expand Down Expand Up @@ -247,7 +247,7 @@
it {
is_expected.to contain_file('/etc/prometheus/alert.rules').with(
'ensure' => 'file',
'owner' => 'prometheus',
'owner' => 'root',
'group' => 'prometheus',
'content' => File.read(fixtures('files', "prometheus#{prom_major}.alert.rules"))
).that_notifies('Class[prometheus::service_reload]')
Expand Down Expand Up @@ -278,7 +278,7 @@
is_expected.to contain_file('prometheus.yaml').with(
'ensure' => 'present',
'path' => '/etc/prometheus/prometheus.yaml',
'owner' => 'prometheus',
'owner' => 'root',
'group' => 'prometheus',
'content' => %r{http://domain.tld/path}
)
Expand Down

0 comments on commit e19b6e0

Please sign in to comment.