Sha256: e2427a61a2584e84aed773e96412ff7916d92027a55b5efe73d87859438f1854

Contents?: true

Size: 1014 Bytes

Versions: 11

Compression:

Stored size: 1014 Bytes

Contents

require "helpers/integration_test_helper"
require "integration/factories/servers_factory"

class TestServers < FogIntegrationTest
  include TestCollection

  def setup
    @subject = Fog::Compute[:google].servers
    @factory = ServersFactory.new(namespaced_name)
  end

  def test_bootstrap_ssh_destroy
    resource_name = @factory.resource_name
    instance = @subject.bootstrap({:name => resource_name})
    assert instance.ready?
    instance.wait_for { sshable? }
    assert_match /Linux/, instance.ssh("uname").first.stdout
    assert_equal instance.destroy.operation_type, "delete"
    Fog.wait_for { !@subject.all.map(&:identity).include? instance.identity }
    # XXX clean up after bootstrap's automatic creation of disks
    # This should be removed when
    #     https://github.com/fog/fog-google/issues/17
    # is solved
    disk = Fog::Compute[:google].disks.get(resource_name)
    disk.destroy
    Fog.wait_for { !Fog::Compute[:google].disks.all.map(&:identity).include? disk.identity }
  end
end

Version data entries

11 entries across 9 versions & 3 rubygems

Version Path
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-google-0.1.0/test/integration/compute/test_servers.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-google-0.1.0/test/integration/compute/test_servers.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-google-0.1.0/test/integration/compute/test_servers.rb
fog-google-0.1.3 test/integration/compute/test_servers.rb
fog-google-0.1.2 test/integration/compute/test_servers.rb
fog-google-0.1.1 test/integration/compute/test_servers.rb
fog-google-0.1.0 test/integration/compute/test_servers.rb
fog-google-0.0.9 test/integration/compute/test_servers.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-google-0.0.7/test/integration/compute/test_servers.rb
fog-google-0.0.7 test/integration/compute/test_servers.rb
fog-google-0.0.6 test/integration/compute/test_servers.rb