summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorRaffael Schmid <raffael@yux.ch>2013-01-19 15:09:01 +0100
committerRaffael Schmid <raffael@yux.ch>2013-01-19 15:09:01 +0100
commit75d3fd74c83a7c172211c8ea681f527652ef4521 (patch)
treec283953c074af176062db1ae0d9737f0267bfd15 /spec
parent7c68d290a90f4f422e4279ec2218eb5620c585fe (diff)
fix using of a tcp-server
Diffstat (limited to 'spec')
-rw-r--r--spec/defines/openvpn_server_spec.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/defines/openvpn_server_spec.rb b/spec/defines/openvpn_server_spec.rb
index ca72fc4..da50786 100644
--- a/spec/defines/openvpn_server_spec.rb
+++ b/spec/defines/openvpn_server_spec.rb
@@ -47,6 +47,7 @@ describe 'openvpn::server', :type => :define do
it { should contain_file('/etc/openvpn/test_server.conf').with_content(/^key\s+\/etc\/openvpn\/test_server\/keys\/server.key$/) }
it { should contain_file('/etc/openvpn/test_server.conf').with_content(/^dh\s+\/etc\/openvpn\/test_server\/keys\/dh1024.pem$/) }
it { should contain_file('/etc/openvpn/test_server.conf').with_content(/^proto\s+tcp-server$/) }
+ it { should contain_file('/etc/openvpn/test_server.conf').with_content(/^tls-server$/) }
it { should contain_file('/etc/openvpn/test_server.conf').with_content(/^port\s+1194$/) }
it { should contain_file('/etc/openvpn/test_server.conf').with_content(/^comp-lzo$/) }
it { should contain_file('/etc/openvpn/test_server.conf').with_content(/^group\s+nobody$/) }
@@ -55,6 +56,7 @@ describe 'openvpn::server', :type => :define do
it { should contain_file('/etc/openvpn/test_server.conf').with_content(/^status\s+test_server\/openvpn\-status\.log$/) }
it { should contain_file('/etc/openvpn/test_server.conf').with_content(/^dev\s+tun0$/) }
it { should contain_file('/etc/openvpn/test_server.conf').with_content(/^local\s+1\.2\.3\.4$/) }
+ it { should_not contain_file('/etc/openvpn/test_server.conf').with_content(/^ifconfig-pool-persist/) }
end
context "creating a server setting all parameters" do
@@ -91,7 +93,8 @@ describe 'openvpn::server', :type => :define do
it { should contain_file('/etc/openvpn/test_server.conf').with_content(/^cert\s+\/etc\/openvpn\/test_server\/keys\/server.crt$/) }
it { should contain_file('/etc/openvpn/test_server.conf').with_content(/^key\s+\/etc\/openvpn\/test_server\/keys\/server.key$/) }
it { should contain_file('/etc/openvpn/test_server.conf').with_content(/^dh\s+\/etc\/openvpn\/test_server\/keys\/dh1024.pem$/) }
- it { should contain_file('/etc/openvpn/test_server.conf').with_content(/^proto\s+udp$/) }
+ it { should contain_file('/etc/openvpn/test_server.conf').with_content(/^proto\s+udp-server$/) }
+ it { should_not contain_file('/etc/openvpn/test_server.conf').with_content(/^proto\s+tls-server$/) }
it { should contain_file('/etc/openvpn/test_server.conf').with_content(/^port\s+123$/) }
it { should contain_file('/etc/openvpn/test_server.conf').with_content(/^fake_compression$/) }
it { should contain_file('/etc/openvpn/test_server.conf').with_content(/^group\s+someone$/) }
@@ -153,6 +156,7 @@ describe 'openvpn::server', :type => :define do
'target' => '/etc/default/openvpn'
)}
+
end
end