Sha256: bb59cdd4e8d2a94ff3f79d4797bdf999bce5bd5e569ebc7d187898119426f5e2

Contents?: true

Size: 1.28 KB

Versions: 31

Compression:

Stored size: 1.28 KB

Contents

Shindo.tests('Fog::Compute[:digitalocean] | servers collection', ['digitalocean']) do
  service = Fog::Compute[:digitalocean]

  options = {
    :name => "#{fog_server_name}-#{Time.now.to_i.to_s}"
  }.merge fog_test_server_attributes

  public_key_path = File.join(File.dirname(__FILE__), '../../fixtures/id_rsa.pub')
  private_key_path = File.join(File.dirname(__FILE__), '../../fixtures/id_rsa')

  # Collection tests are consistently timing out on Travis wasting people's time and resources
  pending if Fog.mocking?

  collection_tests(service.servers, options, true) do
    @instance.wait_for { ready? }
  end

  tests("#bootstrap with public/private_key_path").succeeds do
    pending if Fog.mocking?
    @server = service.servers.bootstrap({
      :public_key_path => public_key_path,
      :private_key_path => private_key_path
    }.merge(options))
    @server.destroy
  end

  tests("#bootstrap with public/private_key").succeeds do
    pending if Fog.mocking?
    @server = service.servers.bootstrap({
      :public_key => File.read(public_key_path),
      :private_key => File.read(private_key_path)
    }.merge(options))
    @server.destroy
  end

  tests("#bootstrap with no public/private keys") do
    raises(ArgumentError, 'raises ArgumentError') { service.servers.bootstrap(options) }
  end
end

Version data entries

31 entries across 31 versions & 4 rubygems

Version Path
fog-1.37.0 tests/digitalocean/models/compute/servers_tests.rb
fog-1.36.0 tests/digitalocean/models/compute/servers_tests.rb
fog-1.35.0 tests/digitalocean/models/compute/servers_tests.rb
fog-2.0.0.pre.0 tests/digitalocean/models/compute/servers_tests.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-1.32.0/tests/digitalocean/models/compute/servers_tests.rb
fog-1.34.0 tests/digitalocean/models/compute/servers_tests.rb
fog-1.33.0 tests/digitalocean/models/compute/servers_tests.rb
fog-1.32.0 tests/digitalocean/models/compute/servers_tests.rb
fog-1.31.0 tests/digitalocean/models/compute/servers_tests.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/tests/digitalocean/models/compute/servers_tests.rb
fog-1.30.0 tests/digitalocean/models/compute/servers_tests.rb
fog-1.29.0 tests/digitalocean/models/compute/servers_tests.rb
fog-1.28.0 tests/digitalocean/models/compute/servers_tests.rb
fog-1.27.0 tests/digitalocean/models/compute/servers_tests.rb
fog-1.26.0 tests/digitalocean/models/compute/servers_tests.rb
fog-1.25.0 tests/digitalocean/models/compute/servers_tests.rb
nsidc-fog-1.24.1 tests/digitalocean/models/compute/servers_tests.rb
fog-1.24.0 tests/digitalocean/models/compute/servers_tests.rb
ns-fog-1.22.11 tests/digitalocean/models/compute/servers_tests.rb
ns-fog-1.22.10 tests/digitalocean/models/compute/servers_tests.rb