mirror of
https://github.com/puppetlabs/vmfloaty.git
synced 2026-01-27 05:48:41 -05:00
Adding delete and get active requests
This commit is contained in:
parent
a77ea84092
commit
7e27542670
5 changed files with 106 additions and 20 deletions
|
|
@ -34,5 +34,29 @@ describe ABS do
|
|||
vmpooler_formatted_compare.delete('ok')
|
||||
expect(vmpooler_formatted_response).to eq(vmpooler_formatted_compare)
|
||||
end
|
||||
|
||||
it 'won\'t delete a job if not all vms are listed' do
|
||||
hosts = ["host1"]
|
||||
allocated_resources = [
|
||||
{
|
||||
"hostname" => "host1"
|
||||
},
|
||||
{
|
||||
"hostname" => "host2"
|
||||
}
|
||||
]
|
||||
expect(ABS.all_job_resources_accounted_for(allocated_resources, hosts)).to eq(false)
|
||||
|
||||
hosts = ["host1", "host2"]
|
||||
allocated_resources = [
|
||||
{
|
||||
"hostname" => "host1"
|
||||
},
|
||||
{
|
||||
"hostname" => "host2"
|
||||
}
|
||||
]
|
||||
expect(ABS.all_job_resources_accounted_for(allocated_resources, hosts)).to eq(true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue