(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:
Glenn Sarti 2017-04-04 14:23:36 -07:00
parent 710b3808a5
commit 1a3ae86943
2 changed files with 14 additions and 0 deletions

View file

@ -19,6 +19,10 @@ module Vmpooler
$threads = {}
end
def config
$config
end
# Check the state of a VM
def check_pending_vm(vm, pool, timeout, provider)
Thread.new do

View file

@ -36,6 +36,16 @@ EOT
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
before do
expect(subject).not_to be_nil