summaryrefslogtreecommitdiff
path: root/spec/defines/openvpn_server_spec.rb
diff options
context:
space:
mode:
authorJustin Lambert <jlambert@eml.cc>2013-01-11 07:08:56 -0700
committerJustin Lambert <jlambert@eml.cc>2013-01-11 07:08:56 -0700
commit2dce9ca4c11ffeb43aaafe7551d3fa098fad75c4 (patch)
tree5a8873cde7fa6e92b05e2af04dae732942124c16 /spec/defines/openvpn_server_spec.rb
parent48bbd0cd422d57b4f6278d3b64e53aaf5de787cf (diff)
spec tests catching up with code. got commit happy before
Diffstat (limited to 'spec/defines/openvpn_server_spec.rb')
-rw-r--r--spec/defines/openvpn_server_spec.rb13
1 files changed, 6 insertions, 7 deletions
diff --git a/spec/defines/openvpn_server_spec.rb b/spec/defines/openvpn_server_spec.rb
index 85dadf2..b48c738 100644
--- a/spec/defines/openvpn_server_spec.rb
+++ b/spec/defines/openvpn_server_spec.rb
@@ -38,12 +38,6 @@ describe 'openvpn::server', :type => :define do
it { should contain_exec('generate dh param test_server') }
it { should contain_exec('initca test_server') }
it { should contain_exec('generate server cert test_server') }
-
- # Configure to start vpn session
- it { should contain_concat__fragment('openvpn.default.autostart.test_server').with(
- 'content' => "AUTOSTART=\"$AUTOSTART test_server\"\n",
- 'target' => '/etc/default/openvpn'
- )}
# VPN server config file itself
it { should contain_file('/etc/openvpn/test_server.conf').with_content(/^mode\s+server$/) }
@@ -61,7 +55,6 @@ 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 contain_file('/etc/openvpn/test_server.conf').with_content(/^server\s+1\.2\.3\.0\s+255\.255\.255\.0$/) }
end
context "creating a server setting all parameters" do
@@ -153,6 +146,12 @@ describe 'openvpn::server', :type => :define do
it { should contain_exec('copy easy-rsa to openvpn config folder test_server').with(
'command' => '/bin/cp -r /usr/share/doc/openvpn/examples/easy-rsa/2.0 /etc/openvpn/test_server/easy-rsa'
)}
+
+ # Configure to start vpn session
+ it { should contain_concat__fragment('openvpn.default.autostart.test_server').with(
+ 'content' => "AUTOSTART=\"$AUTOSTART test_server\"\n",
+ 'target' => '/etc/default/openvpn'
+ )}
end