mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 10:08:40 -05:00
(POOLER-147) Fix create_linked_clone pool option
This commit updates the create_linked_clone pool option to correctly detect when linked clones have been set at a pool level. Without this change a pool setting create_linked_clone to false is not interpreted correctly, and a linked clone is created if possible.
This commit is contained in:
parent
059a46ca93
commit
267772d8eb
3 changed files with 8 additions and 4 deletions
|
|
@ -59,6 +59,7 @@ describe 'Vmpooler::PoolManager::Provider::VSphere' do
|
|||
# Drop the connection pool timeout way down for spec tests so they fail fast
|
||||
connection_pool_timeout: 1
|
||||
datacenter: MockDC
|
||||
create_linked_clones: true
|
||||
:pools:
|
||||
- name: '#{poolname}'
|
||||
alias: [ 'mockpool' ]
|
||||
|
|
@ -3439,7 +3440,7 @@ EOT
|
|||
describe 'get_disk_backing' do
|
||||
|
||||
it 'should return moveChildMostDiskBacking when linked clone enabled' do
|
||||
expect( subject.get_disk_backing({create_linked_clone: true}) ).to eq(:moveChildMostDiskBacking)
|
||||
expect( subject.get_disk_backing({'create_linked_clone' => true}) ).to eq(:moveChildMostDiskBacking)
|
||||
end
|
||||
|
||||
it 'should return moveAllDiskBackingsAndConsolidate when no preference is specified' do
|
||||
|
|
@ -3453,7 +3454,7 @@ EOT
|
|||
|
||||
describe 'linked_clone?' do
|
||||
it 'should return true when linked clone is enabled on the pool' do
|
||||
expect( subject.linked_clone?({create_linked_clone: true}) ).to be true
|
||||
expect( subject.linked_clone?({'create_linked_clone' => true}) ).to be true
|
||||
end
|
||||
|
||||
it 'should return nil when linked clone is not enabled on the pool' do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue