a8fc8c9722
This makes sure that the parameters which accept redis url are hidden from logs, because redis url can contain password as a URL element. example: redis://:password@127.0.0.1:6379 Closes-Bug: #2012246 Change-Id: Ief97f9e28ed7e318b56b27f03214ecc76de6798e
38 lines
890 B
Ruby
38 lines
890 B
Ruby
#
|
|
# Unit tests for gnocchi::storage::incoming::redis
|
|
#
|
|
|
|
require 'spec_helper'
|
|
|
|
describe 'gnocchi::storage::incoming::redis' do
|
|
|
|
let :params do
|
|
{ :redis_url => 'http://localhost:6378' }
|
|
end
|
|
|
|
shared_examples_for 'gnocchi storage redis' do
|
|
|
|
it { is_expected.to contain_class('gnocchi::deps') }
|
|
|
|
context 'with redis' do
|
|
it 'configures gnocchi incoming driver with redis' do
|
|
is_expected.to contain_gnocchi_config('incoming/driver').with_value('redis')
|
|
is_expected.to contain_gnocchi_config('incoming/redis_url').with_value('http://localhost:6378').with_secret(true)
|
|
end
|
|
end
|
|
end
|
|
|
|
on_supported_os({
|
|
:supported_os => OSDefaults.get_supported_os
|
|
}).each do |os,facts|
|
|
context "on #{os}" do
|
|
let (:facts) do
|
|
facts.merge!(OSDefaults.get_facts())
|
|
end
|
|
|
|
it_behaves_like 'gnocchi storage redis'
|
|
end
|
|
end
|
|
|
|
end
|