mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 10:08:40 -05:00
(POOLER-123) Update max_lifetime_upper_limit key
This commit switches the max_lifetime_upper_limit key from being a symbol to being a string, which is what the config hash seems to contain.
This commit is contained in:
parent
da48517750
commit
5739b567e9
2 changed files with 3 additions and 3 deletions
|
|
@ -893,7 +893,7 @@ module Vmpooler
|
|||
need_token! if Vmpooler::API.settings.config[:auth]
|
||||
|
||||
# in hours, defaults to one week
|
||||
max_lifetime_upper_limit = config[:max_lifetime_upper_limit]
|
||||
max_lifetime_upper_limit = config['max_lifetime_upper_limit']
|
||||
if max_lifetime_upper_limit
|
||||
max_lifetime_upper_limit = max_lifetime_upper_limit.to_i
|
||||
if arg.to_i >= max_lifetime_upper_limit
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ describe Vmpooler::API::V1 do
|
|||
|
||||
it 'does not allow a lifetime to be initially past config 168' do
|
||||
app.settings.set :config,
|
||||
{ :config => { :max_lifetime_upper_limit => 168 } }
|
||||
{ :config => { 'max_lifetime_upper_limit' => 168 } }
|
||||
create_vm('testhost')
|
||||
|
||||
put "#{prefix}/vm/testhost", '{"lifetime":"200"}'
|
||||
|
|
@ -148,7 +148,7 @@ describe Vmpooler::API::V1 do
|
|||
|
||||
it 'does not allow a lifetime to be extended past config 168' do
|
||||
app.settings.set :config,
|
||||
{ :config => { :max_lifetime_upper_limit => 168 } }
|
||||
{ :config => { 'max_lifetime_upper_limit' => 168 } }
|
||||
create_vm('testhost')
|
||||
|
||||
set_vm_data('testhost', "checkout", (Time.now - (69*60*60)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue