mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 01:58:41 -05:00
(POOLER-174) Reduce duplicate of on demand code introduced in POOLER-158 (#383)
* (POOLER-174) Reduce duplicate of on demand code introduced in POOLER-158 refactored every parsing of request of type 'pool_alias:pool:count' into a utility class, that is used by pool_manager and the api v1 class * add some metrics to the od request generation * fix rubocop offenses, we are now friends
This commit is contained in:
parent
2afc2a242b
commit
4ecd5dea51
4 changed files with 42 additions and 21 deletions
|
|
@ -4872,6 +4872,14 @@ EOT
|
|||
end
|
||||
end
|
||||
|
||||
it 'fails if the request is not valid' do
|
||||
redis_connection_pool.with do |redis|
|
||||
request_id = "#{request_id}-wrong"
|
||||
create_ondemand_request_for_test(request_id, current_time.to_i, "#{pool}:5", redis)
|
||||
expect{subject.vms_ready?(request_id, redis)}.to raise_error(ArgumentError)
|
||||
end
|
||||
end
|
||||
|
||||
it 'returns false when vms for request_id are not ready' do
|
||||
redis_connection_pool.with do |redis|
|
||||
result = subject.vms_ready?(request_id, redis)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue