Sha256: 38a004d63de1d1e6acd424f8e389473d079b37eab46a719d6466f556a823330b
Contents?: true
Size: 1000 Bytes
Versions: 16
Compression:
Stored size: 1000 Bytes
Contents
require 'spec_helper' ironfan_go! describe Chef::Knife::ClusterBootstrap do let(:cluster) do Ironfan.load_cluster(:gunbai) end let(:target) do Ironfan.broker.discover!(cluster) end let(:computers) do Ironfan::Broker::Computers.receive( MultiJson.load( File.open(Pathname.path_to(:fixtures, 'gunbai_slice.json')))) end subject do described_class.new(slice) end context 'getting slice' do before do subject.stub(:relevant?){ true } subject.stub(:run_bootstrap) subject.config[:yes] = true end context 'full slice' do let(:slice){ ['samurai-gunbai'] } it 'fails if there are multiple environments' do expect{ subject.run }.to raise_error("Cannot bootstrap multiple chef environments") end end context 'partial slice' do let(:slice){ ['samurai-gunbai-hub'] } it 'runs' do subject.should_receive(:run_bootstrap).once subject.run end end end end
Version data entries
16 entries across 16 versions & 1 rubygems