| 1 |
require 'spec_helper' |
| 2 |
|
| 3 |
describe 'nova::wsgi::uwsgi_api_metadata' do |
| 4 |
|
| 5 |
shared_examples 'nova::wsgi::uwsgi_api_metadata' do |
| 6 |
context 'with default parameters' do |
| 7 |
it { |
| 8 |
should contain_class('nova::deps') |
| 9 |
} |
| 10 |
|
| 11 |
it { |
| 12 |
is_expected.to contain_nova_api_metadata_uwsgi_config('uwsgi/processes').with_value(facts[:os_workers]) |
| 13 |
is_expected.to contain_nova_api_metadata_uwsgi_config('uwsgi/threads').with_value('1') |
| 14 |
is_expected.to contain_nova_api_metadata_uwsgi_config('uwsgi/listen').with_value('100') |
| 15 |
} |
| 16 |
end |
| 17 |
end |
| 18 |
|
| 19 |
on_supported_os({ |
| 20 |
:supported_os => OSDefaults.get_supported_os |
| 21 |
}).each do |os,facts| |
| 22 |
context "on #{os}" do |
| 23 |
let (:facts) do |
| 24 |
facts.merge!(OSDefaults.get_facts({ |
| 25 |
:os_workers => 8, |
| 26 |
})) |
| 27 |
end |
| 28 |
it_behaves_like 'nova::wsgi::uwsgi_api_metadata' |
| 29 |
end |
| 30 |
end |
| 31 |
end |