Skip to content

Commit

Permalink
removed ssh build
Browse files Browse the repository at this point in the history
  • Loading branch information
jaybrueder committed Jul 23, 2015
1 parent 49eb2b0 commit f280b6a
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 45 deletions.
2 changes: 0 additions & 2 deletions attributes/default.rb

This file was deleted.

2 changes: 1 addition & 1 deletion recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@
include_recipe "passenger_apache2"

# Choose build style
include_recipe "course_app::#{node['course_app']['build_style']}_build"
include_recipe "course_app::artifact_build"
22 changes: 0 additions & 22 deletions recipes/ssh_build.rb

This file was deleted.

21 changes: 1 addition & 20 deletions spec/unit/recipes/default_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,17 @@

describe 'course_app::default' do

context 'ssh build' do

let(:chef_run) do
ChefSpec::SoloRunner.new do |node|
node.set['course_app']['build_style'] = "ssh"
end.converge(described_recipe)
end

it 'uses the shh build if attribute is set' do
stub_command("/usr/sbin/apache2 -t")

expect(chef_run.node["course_app"]["build_style"]).to eq("ssh")
expect(chef_run).to include_recipe('course_app::ssh_build')
end
end

context 'artifact build' do

let(:chef_run) do
ChefSpec::SoloRunner.new do |node|
node.set['course_app']['build_style'] = "artifact"
end.converge(described_recipe)
ChefSpec::SoloRunner.new.converge(described_recipe)
end

it 'uses the artifact build if attribute is set' do
stub_command("/usr/sbin/apache2 -t")
stub_search("node", "role:database_server").and_return([])
stub_search("node", "role:jenkins_server").and_return([])

expect(chef_run.node["course_app"]["build_style"]).to eq("artifact")
expect(chef_run).to include_recipe('course_app::artifact_build')
end
end
Expand Down

0 comments on commit f280b6a

Please sign in to comment.