Skip to content

Commit

Permalink
TestLab#info doesn't need full bootstrap.
Browse files Browse the repository at this point in the history
  • Loading branch information
Atalanta committed Jun 24, 2011
1 parent acb44d0 commit e5929ca
Showing 1 changed file with 4 additions and 21 deletions.
25 changes: 4 additions & 21 deletions spec/cucumber/chef/test_lab_spec.rb
Expand Up @@ -30,6 +30,10 @@
}.to raise_error(Cucumber::Chef::TestLabError)
end

it "should report its public ip address", :slow => true do
server = subject.build(StringIO.new)
subject.info.should == server.public_ip_address
end
end

describe "destroy" do
Expand All @@ -39,26 +43,5 @@
subject.exists?.should_not be
end
end

describe "against a bootstrapped lab" do
before(:each) do
provisioner = Cucumber::Chef::Provisioner.new
server = provisioner.build_test_lab(@config, StringIO.new)
@dns_name = server.dns_name
@public_ip_address = server.public_ip_address
puts "Hanging around..." until tcp_test_ssh(server.public_ip_address)
puts "Got ssh..."
sleep(10)
provisioner.upload_cookbook(@config)
provisioner.upload_role(@config)
provisioner.bootstrap_node(@dns_name, @config)
end

after(:each) { subject.destroy }

it "should report its public ip address", :slow => true do
subject.info.should match(/#{@public_ip_address}/)
end
end
end

0 comments on commit e5929ca

Please sign in to comment.