Sha256: 1c532a86eca6a6415a8d5f9b57e6da782bd1a139cc71e7970265dfa3b84611cf

Contents?: true

Size: 735 Bytes

Versions: 1

Compression:

Stored size: 735 Bytes

Contents

When(/^I get the server from "(.*?)"$/) do |label|
  @server_id = all_output.match(/#{label}\s([\w-]*)/)[1]
  puts "Server: #{@server_id}"
end

When(/^I load the server$/) do
  @server_id = all_output.strip.lines.to_a.last
  puts "Server: #{@server_id}"
end

Then(/^the server should be active$/) do
  unless Fog.mock? # unfortunately we can't assert this with Fog.mock!, since mocked objects do not persist from the subprocess
    assert_active @server_id
  end
end

Then(/^the server "(.+)" should be active$/) do |server_name|
  server = @compute.servers.all.find{|s| s.name == server_name}
  assert_active server.id
end

def assert_active server_id
  server = @compute.servers.get server_id
  server.state.should == 'available'
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vagrant-profitbricks-1.0.0 features/steps/server_steps.rb