Add zaqar::transport::wsgi class

This class helps manage zaqar transport settings for wsgi.

Change-Id: I668ecc79f1684438beff620394711c6bb8f2cc34
This commit is contained in:
Dan Prince 2016-02-12 14:38:46 -05:00
parent 623ed3789b
commit 6c05509bcc
2 changed files with 44 additions and 0 deletions

View File

@ -0,0 +1,21 @@
# == class: zaqar::transport::wsgi
#
# [*bind*]
# Address on which the self-hosting server will listen.
# Defaults to $::os_service_default.
#
# [*port*]
# Port on which the self-hosting server will listen.
# Defaults to $::os_service_default.
#
class zaqar::transport::wsgi(
$bind = $::os_service_default,
$port = $::os_service_default,
) {
zaqar_config {
'drivers:transport:wsgi/bind': value => $bind;
'drivers:transport:wsgi/port': value => $port;
}
}

View File

@ -0,0 +1,23 @@
require 'spec_helper'
describe 'zaqar::transport::wsgi' do
let :facts do
{ :osfamily => 'RedHat' }
end
describe 'with custom values' do
let :params do
{
:bind => '1',
:port => '2',
}
end
it 'configures custom values' do
is_expected.to contain_zaqar_config('drivers:transport:wsgi/bind').with_value('1')
is_expected.to contain_zaqar_config('drivers:transport:wsgi/port').with_value('2')
end
end
end