Sha256: baae908c7e3a210480477785e03d3146a55317f05a22d848528c08450f04ecef

Contents?: true

Size: 884 Bytes

Versions: 13

Compression:

Stored size: 884 Bytes

Contents

Shindo.tests("Fog::Compute[:google] | server model", ['google']) do

  @zone = 'us-central1-a'
  @disk = create_test_disk(Fog::Compute[:google], @zone)

  model_tests(Fog::Compute[:google].servers, {:name => 'fogservername', :zone_name => @zone, :machine_type => 'n1-standard-1', :disks => [@disk]})

  tests('servers') do
    @instance = nil
    test('#bootstrap') do
      attributes = Fog.mocking? ? {:public_key_path => nil, :private_key_path => nil} : {}
      @instance = Fog::Compute[:google].servers.bootstrap(attributes)
      @instance.ready?
    end

    test('#sshable?') do
      @instance.wait_for { sshable? }
      @instance.sshable?
    end

    test('#ssh') do
      pending if Fog.mocking?
      @instance.ssh("uname") == "Linux"
    end

    test('#destroy') do
      response = @instance.destroy
      response.body['operationType'] == 'delete'
    end
  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
fog-1.22.0 tests/google/models/compute/server_tests.rb
fog-1.21.0 tests/google/models/compute/server_tests.rb
fog-maestrodev-1.20.0.20140305101839 tests/google/models/compute/server_tests.rb
fog-maestrodev-1.20.0.20140305101305 tests/google/models/compute/server_tests.rb
fog-maestrodev-1.19.0.20140212012611 tests/google/models/compute/server_tests.rb
fog-1.20.0 tests/google/models/compute/server_tests.rb
fog-maestrodev-1.19.0.20140110004459 tests/google/models/compute/server_tests.rb
fog-maestrodev-1.19.0.20140110003812 tests/google/models/compute/server_tests.rb
fog-maestrodev-1.19.0.20140109202555 tests/google/models/compute/server_tests.rb
fog-maestrodev-1.19.0.20140107192102 tests/google/models/compute/server_tests.rb
fog-maestrodev-1.19.0.20140107142106 tests/google/models/compute/server_tests.rb
fog-maestrodev-1.19.0.20131219203941 tests/google/models/compute/server_tests.rb
fog-maestrodev-1.18.0.20131219193542 tests/google/models/compute/server_tests.rb