Sha256: f305997fd95dfcc4b73caa2748d45f7ea4a986c82075db943bed88ceed888bd4

Contents?: true

Size: 903 Bytes

Versions: 14

Compression:

Stored size: 903 Bytes

Contents

shared_examples "provider/disk/dvd" do |provider, options|
  if !options[:box]
    raise ArgumentError,
      "box option must be specified for provider: #{provider}"
  end

  include_context "acceptance"

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

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

  it "attaches and removes an optical drive", :skip_windows_guest do
    status("Test: drive is attached")
    result = execute("vagrant", "ssh", "-c", "test -b /dev/sr0")
    expect(result.exit_code).to eql(0)

    status("Test: drive is removed")
    environment.skeleton("disk_empty")
    assert_execute("vagrant", "reload")
    result = execute("vagrant", "ssh", "-c", "test -b /dev/sr0")
    expect(result.exit_code).to eql(1)
  end
end

Version data entries

14 entries across 5 versions & 1 rubygems

Version Path
vagrant-unbundled-2.2.19.0 vendor/bundle/ruby/2.7.0/bundler/gems/vagrant-spec-93c587f3c98a/acceptance/disk/dvd_spec.rb
vagrant-unbundled-2.2.19.0 vendor/bundle/ruby/3.0.0/bundler/gems/vagrant-spec-b6b56c8b8135/acceptance/disk/dvd_spec.rb
vagrant-unbundled-2.2.19.0 vendor/bundle/ruby/3.0.0/bundler/gems/vagrant-spec-03d88fe24677/acceptance/disk/dvd_spec.rb
vagrant-unbundled-2.2.19.0 vendor/bundle/ruby/2.7.0/bundler/gems/vagrant-spec-b6b56c8b8135/acceptance/disk/dvd_spec.rb
vagrant-unbundled-2.2.18.0 vendor/bundle/ruby/2.7.0/bundler/gems/vagrant-spec-b6b56c8b8135/acceptance/disk/dvd_spec.rb
vagrant-unbundled-2.2.18.0 vendor/bundle/ruby/2.7.0/bundler/gems/vagrant-spec-93c587f3c98a/acceptance/disk/dvd_spec.rb
vagrant-unbundled-2.2.18.0 vendor/bundle/ruby/3.0.0/bundler/gems/vagrant-spec-03d88fe24677/acceptance/disk/dvd_spec.rb
vagrant-unbundled-2.2.18.0 vendor/bundle/ruby/3.0.0/bundler/gems/vagrant-spec-b6b56c8b8135/acceptance/disk/dvd_spec.rb
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/2.7.0/bundler/gems/vagrant-spec-b6b56c8b8135/acceptance/disk/dvd_spec.rb
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/3.0.0/bundler/gems/vagrant-spec-b6b56c8b8135/acceptance/disk/dvd_spec.rb
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/2.7.0/bundler/gems/vagrant-spec-93c587f3c98a/acceptance/disk/dvd_spec.rb
vagrant-unbundled-2.2.14.0 vendor/bundle/ruby/2.7.0/bundler/gems/vagrant-spec-b6b56c8b8135/acceptance/disk/dvd_spec.rb
vagrant-unbundled-2.2.14.0 vendor/bundle/ruby/2.7.0/bundler/gems/vagrant-spec-93c587f3c98a/acceptance/disk/dvd_spec.rb
vagrant-unbundled-2.2.10.0 vendor/bundle/ruby/2.7.0/bundler/gems/vagrant-spec-93c587f3c98a/acceptance/disk/dvd_spec.rb