mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 01:58:41 -05:00
Do not prepare template when config_template is set
This commit is contained in:
parent
1b17cceb01
commit
70156ba7f7
2 changed files with 16 additions and 5 deletions
|
|
@ -1849,14 +1849,23 @@ EOT
|
|||
context 'when the configured pool template does not match the prepared template' do
|
||||
before(:each) do
|
||||
config[:pools][0]['template'] = new_template
|
||||
expect(redis).to receive(:hget).with('vmpooler__template__prepared', pool).and_return(current_template)
|
||||
end
|
||||
|
||||
it 'should prepare the template' do
|
||||
expect(redis).to receive(:hget).with('vmpooler__template__prepared', pool).and_return(current_template)
|
||||
expect(subject).to receive(:prepare_template).with(config[:pools][0], provider)
|
||||
|
||||
subject.evaluate_template(config[:pools][0], provider)
|
||||
end
|
||||
|
||||
context 'if configured_template is provided' do
|
||||
it 'should not run prepare_template' do
|
||||
expect(redis).to receive(:hget).with('vmpooler__config__template', pool).and_return(current_template)
|
||||
expect(subject).to_not receive(:prepare_template)
|
||||
|
||||
subject.evaluate_template(config[:pools][0], provider)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'when a new template is requested' do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue