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/classes | |
parent | 48bbd0cd422d57b4f6278d3b64e53aaf5de787cf (diff) |
spec tests catching up with code. got commit happy before
Diffstat (limited to 'spec/classes')
-rw-r--r-- | spec/classes/openvpn_config_spec.rb | 15 | ||||
-rw-r--r-- | spec/classes/openvpn_init_spec.rb | 11 | ||||
-rw-r--r-- | spec/classes/openvpn_install_spec.rb | 11 | ||||
-rw-r--r-- | spec/classes/openvpn_service_spec.rb | 13 |
4 files changed, 39 insertions, 11 deletions
diff --git a/spec/classes/openvpn_config_spec.rb b/spec/classes/openvpn_config_spec.rb new file mode 100644 index 0000000..bbb63a7 --- /dev/null +++ b/spec/classes/openvpn_config_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +describe 'openvpn::config', :type => :class do + + it { should create_class('openvpn::config') } + + context "on Debian based machines" do + let (:facts) { { :osfamily => 'Debian', :concat_basedir => '/var/lib/puppet/concat' } } + + it { should contain_class('concat::setup') } + it { should contain_concat('/etc/default/openvpn') } + it { should contain_concat__fragment('openvpn.default.header') } + end + +end diff --git a/spec/classes/openvpn_init_spec.rb b/spec/classes/openvpn_init_spec.rb index cdfdea1..45dcc9b 100644 --- a/spec/classes/openvpn_init_spec.rb +++ b/spec/classes/openvpn_init_spec.rb @@ -5,16 +5,5 @@ describe 'openvpn', :type => :class do let (:facts) { { :concat_basedir => '/var/lib/puppet/concat' } } it { should create_class('openvpn') } - it { should contain_class('concat::setup') } - it { should contain_package('openvpn') } - it { should contain_service('openvpn').with( - 'ensure' => 'running', - 'enable' => true - ) } - - it { should contain_file('/etc/openvpn').with('ensure' => 'directory') } - it { should contain_file('/etc/openvpn/keys').with('ensure' => 'directory') } - - it { should contain_concat__fragment('openvpn.default.header') } end diff --git a/spec/classes/openvpn_install_spec.rb b/spec/classes/openvpn_install_spec.rb new file mode 100644 index 0000000..cdb3135 --- /dev/null +++ b/spec/classes/openvpn_install_spec.rb @@ -0,0 +1,11 @@ +require 'spec_helper' + +describe 'openvpn::install', :type => :class do + + it { should create_class('openvpn::install') } + it { should contain_package('openvpn') } + + it { should contain_file('/etc/openvpn').with('ensure' => 'directory') } + it { should contain_file('/etc/openvpn/keys').with('ensure' => 'directory') } + +end diff --git a/spec/classes/openvpn_service_spec.rb b/spec/classes/openvpn_service_spec.rb new file mode 100644 index 0000000..f427e7f --- /dev/null +++ b/spec/classes/openvpn_service_spec.rb @@ -0,0 +1,13 @@ +require 'spec_helper' + +describe 'openvpn::service', :type => :class do + + let (:facts) { { :concat_basedir => '/var/lib/puppet/concat' } } + + it { should create_class('openvpn::service') } + it { should contain_service('openvpn').with( + 'ensure' => 'running', + 'enable' => true + ) } + +end |