Skip to content

Commit

Permalink
Made unit tests more thourough (voxpupuli#104).
Browse files Browse the repository at this point in the history
  • Loading branch information
dallinb committed Sep 11, 2015
1 parent 8a8b946 commit 7e2978e
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 8 deletions.
28 changes: 24 additions & 4 deletions spec/classes/cassandra_template1_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,29 @@
it { should contain_file('/etc/cassandra.yaml').with_content(/saved_caches_directory: saved_caches_directory/) }
it { should contain_file('/etc/cassandra.yaml').with_content(/ - datadir1/) }
it { should contain_file('/etc/cassandra.yaml').with_content(/ - datadir2/) }
it { should contain_file('commitlog_directory') }
it { should contain_file('saved_caches_directory') }
it { should contain_file('datadir1') }
it { should contain_file('datadir2') }
it { should contain_file('commitlog_directory').with({
'ensure' => 'directory',
'owner' => 'cassandra',
'group' => 'cassandra',
'mode' => '0750'
}) }
it { should contain_file('saved_caches_directory').with({
'ensure' => 'directory',
'owner' => 'cassandra',
'group' => 'cassandra',
'mode' => '0750'
}) }
it { should contain_file('datadir1').with({
'ensure' => 'directory',
'owner' => 'cassandra',
'group' => 'cassandra',
'mode' => '0750'
}) }
it { should contain_file('datadir2').with({
'ensure' => 'directory',
'owner' => 'cassandra',
'group' => 'cassandra',
'mode' => '0750'
}) }
end
end
28 changes: 24 additions & 4 deletions spec/classes/cassandra_template2_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,29 @@
it { should contain_file('/etc/cassandra.yaml').with_content(/saved_caches_directory: saved_caches_directory/) }
it { should contain_file('/etc/cassandra.yaml').with_content(/ - datadir1/) }
it { should contain_file('/etc/cassandra.yaml').with_content(/ - datadir2/) }
it { should contain_file('commitlog_directory') }
it { should contain_file('saved_caches_directory') }
it { should contain_file('datadir1') }
it { should contain_file('datadir2') }
it { should contain_file('commitlog_directory').with({
'ensure' => 'directory',
'owner' => 'cassandra',
'group' => 'cassandra',
'mode' => '0750'
}) }
it { should contain_file('saved_caches_directory').with({
'ensure' => 'directory',
'owner' => 'cassandra',
'group' => 'cassandra',
'mode' => '0750'
}) }
it { should contain_file('datadir1').with({
'ensure' => 'directory',
'owner' => 'cassandra',
'group' => 'cassandra',
'mode' => '0750'
}) }
it { should contain_file('datadir2').with({
'ensure' => 'directory',
'owner' => 'cassandra',
'group' => 'cassandra',
'mode' => '0750'
}) }
end
end

0 comments on commit 7e2978e

Please sign in to comment.