Merge "Fix additional override for file incoming driver"
This commit is contained in:
commit
72d8fb923e
@ -8,25 +8,17 @@
|
||||
# [*file_basepath*]
|
||||
# (optional) Path used to store gnocchi data files.
|
||||
# This parameter can be used only when gnocchi::storage::file is not used.
|
||||
# Defaults to undef
|
||||
# Defaults to $facts['os_service_default'].
|
||||
#
|
||||
class gnocchi::storage::incoming::file(
|
||||
$file_basepath = undef,
|
||||
$file_basepath = $facts['os_service_default'],
|
||||
) {
|
||||
|
||||
include gnocchi::deps
|
||||
|
||||
# Because the file_basepath parameter is maintained by two classes, here we
|
||||
# skip the parameter unless a user explicitly requests it, to avoid
|
||||
# duplicated declaration.
|
||||
if $file_basepath != undef {
|
||||
gnocchi_config {
|
||||
'storage/file_basepath': value => $file_basepath;
|
||||
}
|
||||
}
|
||||
|
||||
gnocchi_config {
|
||||
'incoming/driver': value => 'file';
|
||||
'incoming/driver': value => 'file';
|
||||
'incoming/file_basepath': value => $file_basepath;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ describe 'gnocchi::storage::incoming::file' do
|
||||
it 'configures gnocchi incoming driver with file' do
|
||||
is_expected.to contain_class('gnocchi::deps')
|
||||
is_expected.to contain_gnocchi_config('incoming/driver').with_value('file')
|
||||
is_expected.to_not contain_gnocchi_config('storage/file_basepath')
|
||||
is_expected.to contain_gnocchi_config('incoming/file_basepath').with_value('<SERVICE DEFAULT>')
|
||||
end
|
||||
end
|
||||
|
||||
@ -27,7 +27,7 @@ describe 'gnocchi::storage::incoming::file' do
|
||||
|
||||
it 'configures gnocchi incoming driver with file' do
|
||||
is_expected.to contain_gnocchi_config('incoming/driver').with_value('file')
|
||||
is_expected.to contain_gnocchi_config('storage/file_basepath').with_value('/var/lib/gnocchi')
|
||||
is_expected.to contain_gnocchi_config('incoming/file_basepath').with_value('/var/lib/gnocchi')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user