mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 01:58:41 -05:00
Merge pull request #371 from puppetlabs/POOLER-161
(POOLER-161) Fix extending vm lifetime when max lifetime is set
This commit is contained in:
commit
5fac5684a9
2 changed files with 1 additions and 20 deletions
|
|
@ -134,7 +134,7 @@ describe Vmpooler::API::V1 do
|
|||
expect(vm['lifetime']).to eq("20000")
|
||||
end
|
||||
|
||||
it 'does not allow a lifetime to be initially past config 168' do
|
||||
it 'does not allow a lifetime to be initially past config max_lifetime_upper_limit' do
|
||||
app.settings.set :config,
|
||||
{ :config => { 'max_lifetime_upper_limit' => 168 } }
|
||||
create_vm('testhost')
|
||||
|
|
@ -146,18 +146,6 @@ describe Vmpooler::API::V1 do
|
|||
expect(vm['lifetime']).to be_nil
|
||||
end
|
||||
|
||||
it 'does not allow a lifetime to be extended past config 168' do
|
||||
app.settings.set :config,
|
||||
{ :config => { 'max_lifetime_upper_limit' => 168 } }
|
||||
create_vm('testhost')
|
||||
|
||||
set_vm_data('testhost', "checkout", (Time.now - (69*60*60)))
|
||||
put "#{prefix}/vm/testhost", '{"lifetime":"100"}'
|
||||
expect_json(ok = false, http = 400)
|
||||
|
||||
vm = fetch_vm('testhost')
|
||||
expect(vm['lifetime']).to be_nil
|
||||
end
|
||||
end
|
||||
|
||||
context '(auth configured)' do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue