Sha256: cf7b6bbe06ccc870ac2b0a02db332f174e86c966a97770240997bdbcead506c9

Contents?: true

Size: 952 Bytes

Versions: 10

Compression:

Stored size: 952 Bytes

Contents

# This tests that account scopes can be configured correctly
# Additionally, this verifies that the 'scopes' method alias is
# available and gcloud GCE aliases can be used.
# (see lib/fog/google/models/compute/server.rb in fog-google)
shared_examples 'provider/scopes' do |provider, options|
  unless options[:box]
    raise ArgumentError,
          "box option must be specified for provider: #{provider}"
  end

  include_context 'acceptance'

  before do
    environment.skeleton('scopes')
    assert_execute('vagrant', 'box', 'add', 'basic', options[:box])
    assert_execute('vagrant', 'up', "--provider=#{provider}")
  end

  after do
    assert_execute('vagrant', 'destroy', '--force')
  end

  it 'should bring up machine with scope definitions' do
    status("Test: machine is running after up")
    result = execute("vagrant", "ssh", "-c", "echo foo")
    expect(result).to exit_with(0)
    expect(result.stdout).to match(/foo\n$/)
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
vagrant-google-2.0.0 test/acceptance/provider/scopes_spec.rb
vagrant-google-2.0.0.rc1 test/acceptance/provider/scopes_spec.rb
vagrant-google-2.0.0.rc0 test/acceptance/provider/scopes_spec.rb
vagrant-google-1.0.0 test/acceptance/provider/scopes_spec.rb
vagrant-google-1.0.0.rc0 test/acceptance/provider/scopes_spec.rb
vagrant-google-0.2.5 test/acceptance/provider/scopes_spec.rb
vagrant-google-0.2.5.rc0 test/acceptance/provider/scopes_spec.rb
vagrant-google-0.2.4 test/acceptance/provider/scopes_spec.rb
vagrant-google-0.2.3 test/acceptance/provider/scopes_spec.rb
vagrant-google-0.2.2 test/acceptance/provider/scopes_spec.rb