Skip to content

Commit 140c0a0

Browse files
committed
Add more chefspec tests
1 parent a48feea commit 140c0a0

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

spec/default_spec.rb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
55

66
it 'includes the threatstack::repo recipe' do
7-
expect(chef_run).to include_recipe("threatstack::repo")
7+
expect(chef_run).to include_recipe('threatstack::repo')
8+
end
9+
10+
it 'installs the threatstack-agent package' do
11+
expect(chef_run).to install_package('threatstack-agent')
12+
end
13+
14+
it 'executes the cloudsight setup' do
15+
expect(chef_rum).to run_execute('cloudsight setup')
816
end
917
end

spec/repo_spec.rb

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
require 'spec_helper'
2+
3+
describe 'threatstack::default' do
4+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
5+
6+
it 'includes the threatstack::repo recipe' do
7+
expect(chef_run).to include_recipe('threatstack::repo')
8+
end
9+
10+
it 'installs the threatstack-agent package' do
11+
expect(chef_run).to install_package('threatstack-agent')
12+
end
13+
14+
it 'executes the cloudsight setup' do
15+
expect(chef_rum).to run_execute('cloudsight setup')
16+
end
17+
end

0 commit comments

Comments
 (0)