diff --git a/manifests/transport/wsgi.pp b/manifests/transport/wsgi.pp new file mode 100644 index 0000000..5e68daf --- /dev/null +++ b/manifests/transport/wsgi.pp @@ -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; + } + +} diff --git a/spec/classes/zaqar_transport_wsgi_spec.rb b/spec/classes/zaqar_transport_wsgi_spec.rb new file mode 100644 index 0000000..3b46f59 --- /dev/null +++ b/spec/classes/zaqar_transport_wsgi_spec.rb @@ -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