Skip to content

Commit

Permalink
Test to catch an invalid mode for a flat ver2 disk
Browse files Browse the repository at this point in the history
  • Loading branch information
agrare committed Mar 10, 2017
1 parent 4f76cc8 commit b642412
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,13 @@
expect(subject.fetch_path("device", "backing", "diskMode")).to eq("independent_nonpersistent")
expect(subject.fetch_path("device", "backing", "fileName")).to eq("[#{vm.storage.name}]")
end

it 'with invalid diskMode' do
@options[:dependent] = true
@options[:persistent] = false

expect { subject }.to raise_error(MiqException::MiqVmError, "Disk mode nonpersistent is not supported for virtual disk")
end
end

context '#remove_disk_config_spec' do
Expand Down

0 comments on commit b642412

Please sign in to comment.