Sha256: 639f117a701280ef77f5d9da9ec528be0e8311252b7d5a310fa54dbb68e6a629

Contents?: true

Size: 845 Bytes

Versions: 56

Compression:

Stored size: 845 Bytes

Contents

require 'spec_helper'

ironfan_go!
require 'chef/knife/cluster_launch'

describe Chef::Knife::ClusterLaunch 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.config[:yes] = true
      subject.config[:bootstrap] = true
    end
    context 'full slice' do
      let(:slice){ ['gunbai'] }
      it 'fails if there are multiple environments' do
        expect{ subject.run }.to raise_error("Cannot bootstrap multiple chef environments")
      end
    end

  end
end

Version data entries

56 entries across 56 versions & 1 rubygems

Version Path
ironfan-5.0.11 spec/chef/cluster_launch_spec.rb
ironfan-5.0.10 spec/chef/cluster_launch_spec.rb
ironfan-5.0.8 spec/chef/cluster_launch_spec.rb
ironfan-5.0.5 spec/chef/cluster_launch_spec.rb
ironfan-5.0.4 spec/chef/cluster_launch_spec.rb
ironfan-5.0.3 spec/chef/cluster_launch_spec.rb
ironfan-5.0.2 spec/chef/cluster_launch_spec.rb
ironfan-5.0.1 spec/chef/cluster_launch_spec.rb
ironfan-5.0.0 spec/chef/cluster_launch_spec.rb
ironfan-4.12.3 spec/chef/cluster_launch_spec.rb
ironfan-4.12.2 spec/chef/cluster_launch_spec.rb
ironfan-4.12.1 spec/chef/cluster_launch_spec.rb
ironfan-4.12.0 spec/chef/cluster_launch_spec.rb
ironfan-4.11.5 spec/chef/cluster_launch_spec.rb
ironfan-4.11.4 spec/chef/cluster_launch_spec.rb
ironfan-4.11.3 spec/chef/cluster_launch_spec.rb
ironfan-4.11.2 spec/chef/cluster_launch_spec.rb
ironfan-4.11.2.pre3 spec/chef/cluster_launch_spec.rb
ironfan-4.11.2.pre2 spec/chef/cluster_launch_spec.rb
ironfan-4.11.2.pre spec/chef/cluster_launch_spec.rb