(rubocop) Fix Layout/IndentHeredoc

This commit is contained in:
Tim Sharpe 2019-02-03 13:11:07 +11:00
parent 851009b1f6
commit 7d9545f202
2 changed files with 103 additions and 103 deletions

View file

@ -27,8 +27,8 @@ describe NonstandardPooler do
describe '#list' do
before :each do
@status_response_body = <<-BODY
{
@status_response_body = <<~BODY
{
"ok": true,
"solaris-10-sparc": {
"total_hosts": 11,
@ -42,7 +42,7 @@ describe NonstandardPooler do
"total_hosts": 5,
"available_hosts": 4
}
}
}
BODY
end
@ -75,24 +75,24 @@ describe NonstandardPooler do
describe '#list_active' do
before :each do
@token_status_body_active = <<-BODY
{
@token_status_body_active = <<~BODY
{
"ok": true,
"user": "first.last",
"created": "2017-09-18 01:25:41 +0000",
"last_accessed": "2017-09-21 19:46:25 +0000",
"reserved_hosts": ["sol10-9", "sol10-11"]
}
BODY
@token_status_body_empty = <<-BODY
{
}
BODY
@token_status_body_empty = <<~BODY
{
"ok": true,
"user": "first.last",
"created": "2017-09-18 01:25:41 +0000",
"last_accessed": "2017-09-21 19:46:25 +0000",
"reserved_hosts": []
}
BODY
}
BODY
end
it 'prints an output of fqdn, template, and duration' do
@ -107,16 +107,16 @@ BODY
describe '#retrieve' do
before :each do
@retrieve_response_body_single = <<-BODY
{
@retrieve_response_body_single = <<~BODY
{
"ok": true,
"solaris-11-sparc": {
"hostname": "sol11-4.delivery.puppetlabs.net"
}
}
BODY
@retrieve_response_body_many = <<-BODY
{
}
BODY
@retrieve_response_body_many = <<~BODY
{
"ok": true,
"solaris-10-sparc": {
"hostname": [
@ -127,8 +127,8 @@ BODY
"aix-7.1-power": {
"hostname": "pe-aix-71-ci-acceptance.delivery.puppetlabs.net"
}
}
BODY
}
BODY
end
it 'raises an AuthError if the token is invalid' do
@ -199,8 +199,8 @@ BODY
before :each do
@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'
@status_response_body = <<-BODY
{
@status_response_body = <<~BODY
{
"ok": true,
"solaris-10-sparc": {
"total_hosts": 11,
@ -214,8 +214,8 @@ BODY
"total_hosts": 5,
"available_hosts": 4
}
}
BODY
}
BODY
end
it 'prints the status' do
@ -230,16 +230,16 @@ BODY
describe '#summary' do
before :each do
@status_response_body = <<-BODY
{
@status_response_body = <<~BODY
{
"ok": true,
"total": 57,
"available": 39,
"in_use": 16,
"resetting": 2,
"broken": 0
}
BODY
}
BODY
end
it 'prints the summary' do
@ -254,8 +254,8 @@ BODY
describe '#query' do
before :each do
@query_response_body = <<-BODY
{
@query_response_body = <<~BODY
{
"ok": true,
"sol10-11": {
"fqdn": "sol10-11.delivery.puppetlabs.net",
@ -264,8 +264,8 @@ BODY
"reserved_for_reason": "testing",
"hours_left_on_reservation": 29.12
}
}
BODY
}
BODY
end
it 'makes a query about a vm' do

View file

@ -52,15 +52,15 @@ describe Utils do
'solaris-10-sparc' => ['sol10-10.delivery.mycompany.net', 'sol10-11.delivery.mycompany.net'],
'ubuntu-16.04-power8' => ['power8-ubuntu16.04-6.delivery.mycompany.net'],
}
@vmpooler_output = <<-OUT.chomp
- dlgietfmgeegry2.delivery.mycompany.net (centos-7-x86_64)
- gdoy8q3nckuob0i.delivery.mycompany.net (ubuntu-1610-x86_64)
- ctnktsd0u11p9tm.delivery.mycompany.net (ubuntu-1610-x86_64)
@vmpooler_output = <<~OUT.chomp
- dlgietfmgeegry2.delivery.mycompany.net (centos-7-x86_64)
- gdoy8q3nckuob0i.delivery.mycompany.net (ubuntu-1610-x86_64)
- ctnktsd0u11p9tm.delivery.mycompany.net (ubuntu-1610-x86_64)
OUT
@nonstandard_output = <<-OUT.chomp
- sol10-10.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)
@nonstandard_output = <<~OUT.chomp
- sol10-10.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)
OUT
end
it 'formats a hostname hash from vmpooler into a list that includes the os' do