Skip to content

Commit

Permalink
(maint) Fix spec test to catch unexpected logging in fail_pending_vm.
Browse files Browse the repository at this point in the history
  • Loading branch information
isaac-hammes committed Aug 24, 2023
1 parent 1c5b066 commit c4d43a4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions spec/unit/pool_manager_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -275,13 +275,15 @@

it 'takes no action if VM is not cloning' do
redis_connection_pool.with do |redis|
expect(logger).to_not receive(:log)
expect(subject.fail_pending_vm(vm, pool, timeout, timeout_notification, redis)).to eq(true)
end
end

it 'takes no action if VM is within timeout' do
redis_connection_pool.with do |redis|
redis.hset("vmpooler__vm__#{vm}", 'clone',Time.now.to_s)
expect(logger).to_not receive(:log)
expect(subject.fail_pending_vm(vm, pool, timeout, timeout_notification, redis)).to eq(true)
expect(redis.sismember("vmpooler__pending__#{pool}", vm)).to be(true)
end
Expand Down

0 comments on commit c4d43a4

Please sign in to comment.