mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 10:08:40 -05:00
(POOLER-70) Add config for VM Provider
This commit adds a public function to access the internal variable holding the VMPooler configuration. This is required for later commits for the execute! function testing.
This commit is contained in:
parent
710b3808a5
commit
1a3ae86943
2 changed files with 14 additions and 0 deletions
|
|
@ -19,6 +19,10 @@ module Vmpooler
|
||||||
$threads = {}
|
$threads = {}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def config
|
||||||
|
$config
|
||||||
|
end
|
||||||
|
|
||||||
# Check the state of a VM
|
# Check the state of a VM
|
||||||
def check_pending_vm(vm, pool, timeout, provider)
|
def check_pending_vm(vm, pool, timeout, provider)
|
||||||
Thread.new do
|
Thread.new do
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,16 @@ EOT
|
||||||
|
|
||||||
subject { Vmpooler::PoolManager.new(config, logger, redis, metrics) }
|
subject { Vmpooler::PoolManager.new(config, logger, redis, metrics) }
|
||||||
|
|
||||||
|
describe '#config' do
|
||||||
|
before do
|
||||||
|
expect(subject).not_to be_nil
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'should return the current configuration' do
|
||||||
|
expect(subject.config).to eq(config)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
describe '#check_pending_vm' do
|
describe '#check_pending_vm' 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