diff options
author | Justin Lambert <jlambert@eml.cc> | 2013-01-11 07:08:56 -0700 |
---|---|---|
committer | Justin Lambert <jlambert@eml.cc> | 2013-01-11 07:08:56 -0700 |
commit | 2dce9ca4c11ffeb43aaafe7551d3fa098fad75c4 (patch) | |
tree | 5a8873cde7fa6e92b05e2af04dae732942124c16 /spec/defines/openvpn_client_spec.rb | |
parent | 48bbd0cd422d57b4f6278d3b64e53aaf5de787cf (diff) |
spec tests catching up with code. got commit happy before
Diffstat (limited to 'spec/defines/openvpn_client_spec.rb')
-rw-r--r-- | spec/defines/openvpn_client_spec.rb | 105 |
1 files changed, 9 insertions, 96 deletions
diff --git a/spec/defines/openvpn_client_spec.rb b/spec/defines/openvpn_client_spec.rb index 143b76f..a4b580e 100644 --- a/spec/defines/openvpn_client_spec.rb +++ b/spec/defines/openvpn_client_spec.rb @@ -4,6 +4,15 @@ describe 'openvpn::client', :type => :define do let(:title) { 'test_client' } let(:params) { { 'server' => 'test_server' } } let(:facts) { { :fqdn => 'somehost', :concat_basedir => '/var/lib/puppet/concat' } } + let(:pre_condition) do + 'openvpn::server { "test_server": + country => "CO", + province => "ST", + city => "Some City", + organization => "example.org", + email => "testemail@example.org" + }' + end it { should contain_exec('generate certificate for test_client in context of test_server') } @@ -53,7 +62,6 @@ describe 'openvpn::client', :type => :define do 'mute' => 10, 'mute_replay_warnings' => false, 'nobind' => false, - 'ns_cert_type' => 'client', 'persist_key' => false, 'persist_tun' => false, 'port' => '123', @@ -73,103 +81,8 @@ describe 'openvpn::client', :type => :define do it { should contain_file('/etc/openvpn/test_server/download-configs/test_client/test_client.conf').with_content(/^remote\s+somewhere\s+123$/)} it { should contain_file('/etc/openvpn/test_server/download-configs/test_client/test_client.conf').with_content(/^comp-something$/)} it { should contain_file('/etc/openvpn/test_server/download-configs/test_client/test_client.conf').with_content(/^resolv-retry\s+2m$/)} - it { should contain_file('/etc/openvpn/test_server/download-configs/test_client/test_client.conf').with_content(/^ns\-cert\-type\s+client$/)} it { should contain_file('/etc/openvpn/test_server/download-configs/test_client/test_client.conf').with_content(/^verb\s+1$/)} it { should contain_file('/etc/openvpn/test_server/download-configs/test_client/test_client.conf').with_content(/^mute\s+10$/)} end - - - - -# it { should contain_openvpn__option('ca test_server with test_client').with( -# 'server' => 'test_server', -# 'client' => 'test_client', -# 'key' => 'ca', -# 'value' => 'keys/ca.crt' -# )} -# it { should contain_openvpn__option('cert test_server with test_client').with( -# 'server' => 'test_server', -# 'client' => 'test_client', -# 'key' => 'cert', -# 'value' => 'keys/test_client.crt' -# )} -# it { should contain_openvpn__option('key test_server with test_client').with( -# 'server' => 'test_server', -# 'client' => 'test_client', -# 'key' => 'key', -# 'value' => 'keys/test_client.key' -# )} -# it { should contain_openvpn__option('client test_server with test_client').with( -# 'server' => 'test_server', -# 'client' => 'test_client', -# 'key' => 'client' -# )} -# it { should contain_openvpn__option('dev test_server with test_client').with( -# 'server' => 'test_server', -# 'client' => 'test_client', -# 'key' => 'dev', -# 'value' => 'tun' -# )} -# it { should contain_openvpn__option('proto test_server with test_client').with( -# 'server' => 'test_server', -# 'client' => 'test_client', -# 'key' => 'proto', -# 'value' => 'tcp' -# )} -# it { should contain_openvpn__option('remote test_server with test_client').with( -# 'server' => 'test_server', -# 'client' => 'test_client', -# 'key' => 'remote', -# 'value' => 'somehost 1194' -# )} -# it { should contain_openvpn__option('resolv-retry test_server with test_client').with( -# 'server' => 'test_server', -# 'client' => 'test_client', -# 'key' => 'resolv-retry', -# 'value' => 'infinite' -# )} -# it { should contain_openvpn__option('nobind test_server with test_client').with( -# 'server' => 'test_server', -# 'client' => 'test_client', -# 'key' => 'nobind' -# )} -# it { should contain_openvpn__option('persist-key test_server with test_client').with( -# 'server' => 'test_server', -# 'client' => 'test_client', -# 'key' => 'persist-key' -# )} -# it { should contain_openvpn__option('persist-tun test_server with test_client').with( -# 'server' => 'test_server', -# 'client' => 'test_client', -# 'key' => 'persist-tun' -# )} -# it { should contain_openvpn__option('mute-replay-warnings test_server with test_client').with( -# 'server' => 'test_server', -# 'client' => 'test_client', -# 'key' => 'mute-replay-warnings' -# )} -# it { should contain_openvpn__option('ns-cert-type test_server with test_client').with( -# 'server' => 'test_server', -# 'client' => 'test_client', -# 'key' => 'ns-cert-type', -# 'value' => 'server' -# )} -# it { should contain_openvpn__option('comp-lzo test_server with test_client').with( -# 'server' => 'test_server', -# 'client' => 'test_client', -# 'key' => 'comp-lzo' -# )} -# it { should contain_openvpn__option('verb test_server with test_client').with( -# 'server' => 'test_server', -# 'client' => 'test_client', -# 'key' => 'verb', -# 'value' => '3' -# )} -# it { should contain_openvpn__option('mute test_server with test_client').with( -# 'server' => 'test_server', -# 'client' => 'test_client', -# 'key' => 'mute', -# 'value' => '20' -# )} end |