mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 10:08:40 -05:00
(POOLER-73) Add spec tests for create_vm_snapshot
Add spec tests for create_vm_snapshot
This commit is contained in:
parent
6f79c438c7
commit
e6be5bfb75
1 changed files with 16 additions and 0 deletions
|
|
@ -923,6 +923,22 @@ EOT
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe '#create_vm_snapshot' do
|
||||||
|
let(:vsphere) { double('vsphere') }
|
||||||
|
let(:snapshot_name) { 'snapshot' }
|
||||||
|
|
||||||
|
before do
|
||||||
|
expect(subject).not_to be_nil
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'calls _create_vm_snapshot' do
|
||||||
|
expect(Thread).to receive(:new).and_yield
|
||||||
|
expect(subject).to receive(:_create_vm_snapshot).with(vm, snapshot_name, vsphere)
|
||||||
|
|
||||||
|
subject.create_vm_snapshot(vm, snapshot_name, vsphere)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
describe "#get_vm_host_info" do
|
describe "#get_vm_host_info" do
|
||||||
before do
|
before do
|
||||||
expect(subject).not_to be_nil
|
expect(subject).not_to be_nil
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue