mirror of
https://github.com/puppetlabs/vmfloaty.git
synced 2026-01-26 05:28:40 -05:00
(rubocop) Fix Layout/IndentHeredoc
This commit is contained in:
parent
851009b1f6
commit
7d9545f202
2 changed files with 103 additions and 103 deletions
|
|
@ -27,22 +27,22 @@ describe NonstandardPooler do
|
||||||
|
|
||||||
describe '#list' do
|
describe '#list' do
|
||||||
before :each do
|
before :each do
|
||||||
@status_response_body = <<-BODY
|
@status_response_body = <<~BODY
|
||||||
{
|
{
|
||||||
"ok": true,
|
"ok": true,
|
||||||
"solaris-10-sparc": {
|
"solaris-10-sparc": {
|
||||||
"total_hosts": 11,
|
"total_hosts": 11,
|
||||||
"available_hosts": 11
|
"available_hosts": 11
|
||||||
},
|
},
|
||||||
"ubuntu-16.04-power8": {
|
"ubuntu-16.04-power8": {
|
||||||
"total_hosts": 10,
|
"total_hosts": 10,
|
||||||
"available_hosts": 10
|
"available_hosts": 10
|
||||||
},
|
},
|
||||||
"aix-7.2-power": {
|
"aix-7.2-power": {
|
||||||
"total_hosts": 5,
|
"total_hosts": 5,
|
||||||
"available_hosts": 4
|
"available_hosts": 4
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BODY
|
BODY
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -75,24 +75,24 @@ describe NonstandardPooler do
|
||||||
|
|
||||||
describe '#list_active' do
|
describe '#list_active' do
|
||||||
before :each do
|
before :each do
|
||||||
@token_status_body_active = <<-BODY
|
@token_status_body_active = <<~BODY
|
||||||
{
|
{
|
||||||
"ok": true,
|
"ok": true,
|
||||||
"user": "first.last",
|
"user": "first.last",
|
||||||
"created": "2017-09-18 01:25:41 +0000",
|
"created": "2017-09-18 01:25:41 +0000",
|
||||||
"last_accessed": "2017-09-21 19:46:25 +0000",
|
"last_accessed": "2017-09-21 19:46:25 +0000",
|
||||||
"reserved_hosts": ["sol10-9", "sol10-11"]
|
"reserved_hosts": ["sol10-9", "sol10-11"]
|
||||||
}
|
}
|
||||||
BODY
|
BODY
|
||||||
@token_status_body_empty = <<-BODY
|
@token_status_body_empty = <<~BODY
|
||||||
{
|
{
|
||||||
"ok": true,
|
"ok": true,
|
||||||
"user": "first.last",
|
"user": "first.last",
|
||||||
"created": "2017-09-18 01:25:41 +0000",
|
"created": "2017-09-18 01:25:41 +0000",
|
||||||
"last_accessed": "2017-09-21 19:46:25 +0000",
|
"last_accessed": "2017-09-21 19:46:25 +0000",
|
||||||
"reserved_hosts": []
|
"reserved_hosts": []
|
||||||
}
|
}
|
||||||
BODY
|
BODY
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'prints an output of fqdn, template, and duration' do
|
it 'prints an output of fqdn, template, and duration' do
|
||||||
|
|
@ -107,28 +107,28 @@ BODY
|
||||||
|
|
||||||
describe '#retrieve' do
|
describe '#retrieve' do
|
||||||
before :each do
|
before :each do
|
||||||
@retrieve_response_body_single = <<-BODY
|
@retrieve_response_body_single = <<~BODY
|
||||||
{
|
{
|
||||||
"ok": true,
|
"ok": true,
|
||||||
"solaris-11-sparc": {
|
"solaris-11-sparc": {
|
||||||
"hostname": "sol11-4.delivery.puppetlabs.net"
|
"hostname": "sol11-4.delivery.puppetlabs.net"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BODY
|
BODY
|
||||||
@retrieve_response_body_many = <<-BODY
|
@retrieve_response_body_many = <<~BODY
|
||||||
{
|
{
|
||||||
"ok": true,
|
"ok": true,
|
||||||
"solaris-10-sparc": {
|
"solaris-10-sparc": {
|
||||||
"hostname": [
|
"hostname": [
|
||||||
"sol10-9.delivery.puppetlabs.net",
|
"sol10-9.delivery.puppetlabs.net",
|
||||||
"sol10-10.delivery.puppetlabs.net"
|
"sol10-10.delivery.puppetlabs.net"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"aix-7.1-power": {
|
"aix-7.1-power": {
|
||||||
"hostname": "pe-aix-71-ci-acceptance.delivery.puppetlabs.net"
|
"hostname": "pe-aix-71-ci-acceptance.delivery.puppetlabs.net"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BODY
|
BODY
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'raises an AuthError if the token is invalid' do
|
it 'raises an AuthError if the token is invalid' do
|
||||||
|
|
@ -199,23 +199,23 @@ BODY
|
||||||
before :each do
|
before :each do
|
||||||
@status_response_body = '{"capacity":{"current":716,"total":717,"percent": 99.9},"status":{"ok":true,"message":"Battle station fully armed and operational."}}'
|
@status_response_body = '{"capacity":{"current":716,"total":717,"percent": 99.9},"status":{"ok":true,"message":"Battle station fully armed and operational."}}'
|
||||||
# TODO: make this report stuff like 'broken'
|
# TODO: make this report stuff like 'broken'
|
||||||
@status_response_body = <<-BODY
|
@status_response_body = <<~BODY
|
||||||
{
|
{
|
||||||
"ok": true,
|
"ok": true,
|
||||||
"solaris-10-sparc": {
|
"solaris-10-sparc": {
|
||||||
"total_hosts": 11,
|
"total_hosts": 11,
|
||||||
"available_hosts": 10
|
"available_hosts": 10
|
||||||
},
|
},
|
||||||
"ubuntu-16.04-power8": {
|
"ubuntu-16.04-power8": {
|
||||||
"total_hosts": 10,
|
"total_hosts": 10,
|
||||||
"available_hosts": 10
|
"available_hosts": 10
|
||||||
},
|
},
|
||||||
"aix-7.2-power": {
|
"aix-7.2-power": {
|
||||||
"total_hosts": 5,
|
"total_hosts": 5,
|
||||||
"available_hosts": 4
|
"available_hosts": 4
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BODY
|
BODY
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'prints the status' do
|
it 'prints the status' do
|
||||||
|
|
@ -230,16 +230,16 @@ BODY
|
||||||
|
|
||||||
describe '#summary' do
|
describe '#summary' do
|
||||||
before :each do
|
before :each do
|
||||||
@status_response_body = <<-BODY
|
@status_response_body = <<~BODY
|
||||||
{
|
{
|
||||||
"ok": true,
|
"ok": true,
|
||||||
"total": 57,
|
"total": 57,
|
||||||
"available": 39,
|
"available": 39,
|
||||||
"in_use": 16,
|
"in_use": 16,
|
||||||
"resetting": 2,
|
"resetting": 2,
|
||||||
"broken": 0
|
"broken": 0
|
||||||
}
|
}
|
||||||
BODY
|
BODY
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'prints the summary' do
|
it 'prints the summary' do
|
||||||
|
|
@ -254,18 +254,18 @@ BODY
|
||||||
|
|
||||||
describe '#query' do
|
describe '#query' do
|
||||||
before :each do
|
before :each do
|
||||||
@query_response_body = <<-BODY
|
@query_response_body = <<~BODY
|
||||||
{
|
{
|
||||||
"ok": true,
|
"ok": true,
|
||||||
"sol10-11": {
|
"sol10-11": {
|
||||||
"fqdn": "sol10-11.delivery.puppetlabs.net",
|
"fqdn": "sol10-11.delivery.puppetlabs.net",
|
||||||
"os_triple": "solaris-10-sparc",
|
"os_triple": "solaris-10-sparc",
|
||||||
"reserved_by_user": "first.last",
|
"reserved_by_user": "first.last",
|
||||||
"reserved_for_reason": "testing",
|
"reserved_for_reason": "testing",
|
||||||
"hours_left_on_reservation": 29.12
|
"hours_left_on_reservation": 29.12
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BODY
|
BODY
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'makes a query about a vm' do
|
it 'makes a query about a vm' do
|
||||||
|
|
|
||||||
|
|
@ -52,15 +52,15 @@ describe Utils do
|
||||||
'solaris-10-sparc' => ['sol10-10.delivery.mycompany.net', 'sol10-11.delivery.mycompany.net'],
|
'solaris-10-sparc' => ['sol10-10.delivery.mycompany.net', 'sol10-11.delivery.mycompany.net'],
|
||||||
'ubuntu-16.04-power8' => ['power8-ubuntu16.04-6.delivery.mycompany.net'],
|
'ubuntu-16.04-power8' => ['power8-ubuntu16.04-6.delivery.mycompany.net'],
|
||||||
}
|
}
|
||||||
@vmpooler_output = <<-OUT.chomp
|
@vmpooler_output = <<~OUT.chomp
|
||||||
- dlgietfmgeegry2.delivery.mycompany.net (centos-7-x86_64)
|
- dlgietfmgeegry2.delivery.mycompany.net (centos-7-x86_64)
|
||||||
- gdoy8q3nckuob0i.delivery.mycompany.net (ubuntu-1610-x86_64)
|
- gdoy8q3nckuob0i.delivery.mycompany.net (ubuntu-1610-x86_64)
|
||||||
- ctnktsd0u11p9tm.delivery.mycompany.net (ubuntu-1610-x86_64)
|
- ctnktsd0u11p9tm.delivery.mycompany.net (ubuntu-1610-x86_64)
|
||||||
OUT
|
OUT
|
||||||
@nonstandard_output = <<-OUT.chomp
|
@nonstandard_output = <<~OUT.chomp
|
||||||
- sol10-10.delivery.mycompany.net (solaris-10-sparc)
|
- sol10-10.delivery.mycompany.net (solaris-10-sparc)
|
||||||
- sol10-11.delivery.mycompany.net (solaris-10-sparc)
|
- sol10-11.delivery.mycompany.net (solaris-10-sparc)
|
||||||
- power8-ubuntu16.04-6.delivery.mycompany.net (ubuntu-16.04-power8)
|
- power8-ubuntu16.04-6.delivery.mycompany.net (ubuntu-16.04-power8)
|
||||||
OUT
|
OUT
|
||||||
end
|
end
|
||||||
it 'formats a hostname hash from vmpooler into a list that includes the os' do
|
it 'formats a hostname hash from vmpooler into a list that includes the os' do
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue