diff --git a/lib/vmpooler/pool_manager.rb b/lib/vmpooler/pool_manager.rb index 7ab229f..2133c53 100644 --- a/lib/vmpooler/pool_manager.rb +++ b/lib/vmpooler/pool_manager.rb @@ -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 diff --git a/spec/unit/pool_manager_spec.rb b/spec/unit/pool_manager_spec.rb index bc7b5f8..cec693d 100644 --- a/spec/unit/pool_manager_spec.rb +++ b/spec/unit/pool_manager_spec.rb @@ -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