mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-27 02:18:41 -05:00
Add spec test to ensure metric is being shipped properly on
move_pending_vm_to_ready call.
This commit is contained in:
parent
27c9ee7591
commit
456431c3b6
1 changed files with 8 additions and 0 deletions
|
|
@ -217,6 +217,14 @@ EOT
|
|||
subject.move_pending_vm_to_ready(vm, pool, host)
|
||||
end
|
||||
|
||||
it 'should receive time_to_ready_state metric' do
|
||||
redis.hset("vmpooler__vm__#{vm}", 'clone',Time.now.to_s)
|
||||
expect(metrics).to receive(:timing).with(/time_to_ready_state\./,/0/)
|
||||
|
||||
subject.move_pending_vm_to_ready(vm, pool, host)
|
||||
end
|
||||
|
||||
|
||||
it 'should set the boot time in redis' do
|
||||
redis.hset("vmpooler__vm__#{vm}", 'clone',Time.now.to_s)
|
||||
expect(redis.hget('vmpooler__boot__' + Date.today.to_s, pool + ':' + vm)).to be_nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue