mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 01:58:41 -05:00
(RE-15162) Update Redis gem to version 5
This commit is contained in:
parent
cb6df6c9aa
commit
30820ec115
5 changed files with 85 additions and 85 deletions
|
|
@ -1,6 +1,8 @@
|
|||
require 'spec_helper'
|
||||
require 'time'
|
||||
require 'mock_redis'
|
||||
require 'pry'
|
||||
require 'pry-byebug'
|
||||
|
||||
# Custom RSpec :Matchers
|
||||
|
||||
|
|
@ -3594,8 +3596,9 @@ EOT
|
|||
it 'should sleep until the provisioning request is detected' do
|
||||
redis_connection_pool.with do |redis|
|
||||
expect(subject).to receive(:sleep).exactly(3).times
|
||||
expect(redis).to receive(:multi).and_return('OK').exactly(3).times
|
||||
expect(redis).to receive(:exec).and_return([0,0,0],[0,0,0],[1,0,0])
|
||||
expect(redis).to receive(:zcard).with('vmpooler__provisioning__request').and_return(0,0,1)
|
||||
expect(redis).to receive(:zcard).with('vmpooler__provisioning__processing').and_return(0,0,0)
|
||||
expect(redis).to receive(:zcard).with('vmpooler__odcreate__task').and_return(0,0,0)
|
||||
end
|
||||
|
||||
subject.sleep_with_wakeup_events(loop_delay, wakeup_period, wakeup_option)
|
||||
|
|
@ -3604,17 +3607,20 @@ EOT
|
|||
it 'should sleep until provisioning processing is detected' do
|
||||
redis_connection_pool.with do |redis|
|
||||
expect(subject).to receive(:sleep).exactly(3).times
|
||||
expect(redis).to receive(:multi).and_return('OK').exactly(3).times
|
||||
expect(redis).to receive(:exec).and_return([0,0,0],[0,0,0],[0,1,0])
|
||||
expect(redis).to receive(:zcard).with('vmpooler__provisioning__request').and_return(0,0,0)
|
||||
expect(redis).to receive(:zcard).with('vmpooler__provisioning__processing').and_return(0,0,1)
|
||||
expect(redis).to receive(:zcard).with('vmpooler__odcreate__task').and_return(0,0,0)
|
||||
end
|
||||
|
||||
subject.sleep_with_wakeup_events(loop_delay, wakeup_period, wakeup_option)
|
||||
end
|
||||
|
||||
it 'should sleep until ondemand creation task is detected' do
|
||||
redis_connection_pool.with do |redis|
|
||||
expect(subject).to receive(:sleep).exactly(3).times
|
||||
expect(redis).to receive(:multi).and_return('OK').exactly(3).times
|
||||
expect(redis).to receive(:exec).and_return([0,0,0],[0,0,0],[0,0,1])
|
||||
expect(redis).to receive(:zcard).with('vmpooler__provisioning__request').and_return(0,0,0)
|
||||
expect(redis).to receive(:zcard).with('vmpooler__provisioning__processing').and_return(0,0,0)
|
||||
expect(redis).to receive(:zcard).with('vmpooler__odcreate__task').and_return(0,0,1)
|
||||
end
|
||||
|
||||
subject.sleep_with_wakeup_events(loop_delay, wakeup_period, wakeup_option)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue