mirror of
https://github.com/puppetlabs/vmfloaty.git
synced 2026-01-25 21:28:40 -05:00
(rubocop) Fix Layout/SpaceBeforeBlockBraces
This commit is contained in:
parent
b8971c040a
commit
fd753ba188
3 changed files with 12 additions and 12 deletions
|
|
@ -51,7 +51,7 @@ class Vmfloaty
|
|||
os_types = Utils.generate_os_hash(args)
|
||||
|
||||
max_pool_request = 5
|
||||
large_pool_requests = os_types.select{ |_,v| v > max_pool_request }
|
||||
large_pool_requests = os_types.select { |_,v| v > max_pool_request }
|
||||
if ! large_pool_requests.empty? && ! force
|
||||
STDERR.puts "Requesting vms over #{max_pool_request} requires a --force flag."
|
||||
STDERR.puts 'Try again with `floaty get --force`'
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ describe Pooler do
|
|||
with(:headers => { 'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Length' => '0', 'User-Agent' => 'Faraday v0.9.2' }).
|
||||
to_return(:status => 500, :body => '{"ok":false}', :headers => {})
|
||||
|
||||
expect{ Auth.get_token(false, @vmpooler_url, 'first.last', 'password') }.to raise_error(TokenError)
|
||||
expect { Auth.get_token(false, @vmpooler_url, 'first.last', 'password') }.to raise_error(TokenError)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -51,11 +51,11 @@ describe Pooler do
|
|||
with(:headers => { 'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'User-Agent' => 'Faraday v0.9.2' }).
|
||||
to_return(:status => 500, :body => '{"ok":false}', :headers => {})
|
||||
|
||||
expect{ Auth.delete_token(false, @vmpooler_url, 'first.last', 'password', @token) }.to raise_error(TokenError)
|
||||
expect { Auth.delete_token(false, @vmpooler_url, 'first.last', 'password', @token) }.to raise_error(TokenError)
|
||||
end
|
||||
|
||||
it 'raises a token error if no token provided' do
|
||||
expect{ Auth.delete_token(false, @vmpooler_url, 'first.last', 'password', nil) }.to raise_error(TokenError)
|
||||
expect { Auth.delete_token(false, @vmpooler_url, 'first.last', 'password', nil) }.to raise_error(TokenError)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -78,11 +78,11 @@ describe Pooler do
|
|||
with(:headers => { 'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'User-Agent' => 'Faraday v0.9.2' }).
|
||||
to_return(:status => 500, :body => '{"ok":false}', :headers => {})
|
||||
|
||||
expect{ Auth.token_status(false, @vmpooler_url, @token) }.to raise_error(TokenError)
|
||||
expect { Auth.token_status(false, @vmpooler_url, @token) }.to raise_error(TokenError)
|
||||
end
|
||||
|
||||
it 'raises a token error if no token provided' do
|
||||
expect{ Auth.token_status(false, @vmpooler_url, nil) }.to raise_error(TokenError)
|
||||
expect { Auth.token_status(false, @vmpooler_url, nil) }.to raise_error(TokenError)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ describe Pooler do
|
|||
|
||||
vm_hash = {}
|
||||
vm_hash['debian-7-i386'] = 1
|
||||
expect{ Pooler.retrieve(false, vm_hash, 'mytokenfile', @vmpooler_url) }.to raise_error(AuthError)
|
||||
expect { Pooler.retrieve(false, vm_hash, 'mytokenfile', @vmpooler_url) }.to raise_error(AuthError)
|
||||
end
|
||||
|
||||
it 'retrieves a single vm with a token' do
|
||||
|
|
@ -93,7 +93,7 @@ describe Pooler do
|
|||
end
|
||||
|
||||
it 'raises a TokenError if token provided is nil' do
|
||||
expect{ Pooler.modify(false, @vmpooler_url, 'myfakehost', nil, {}) }.to raise_error(TokenError)
|
||||
expect { Pooler.modify(false, @vmpooler_url, 'myfakehost', nil, {}) }.to raise_error(TokenError)
|
||||
end
|
||||
|
||||
it 'modifies the TTL of a vm' do
|
||||
|
|
@ -123,7 +123,7 @@ describe Pooler do
|
|||
end
|
||||
|
||||
it 'raises a token error if no token provided' do
|
||||
expect{ Pooler.delete(false, @vmpooler_url, ['myfakehost'], nil) }.to raise_error(TokenError)
|
||||
expect { Pooler.delete(false, @vmpooler_url, ['myfakehost'], nil) }.to raise_error(TokenError)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -197,11 +197,11 @@ describe Pooler do
|
|||
end
|
||||
|
||||
it "doesn't make a request to revert a vm if snapshot is not provided" do
|
||||
expect{ Pooler.revert(false, @vmpooler_url, 'fq6qlpjlsskycq6', 'mytokenfile', nil) }.to raise_error(RuntimeError, 'Snapshot SHA provided was nil, could not revert fq6qlpjlsskycq6')
|
||||
expect { Pooler.revert(false, @vmpooler_url, 'fq6qlpjlsskycq6', 'mytokenfile', nil) }.to raise_error(RuntimeError, 'Snapshot SHA provided was nil, could not revert fq6qlpjlsskycq6')
|
||||
end
|
||||
|
||||
it 'raises a TokenError if no token was provided' do
|
||||
expect{ Pooler.revert(false, @vmpooler_url, 'myfakehost', nil, 'shaaaaaaa') }.to raise_error(TokenError)
|
||||
expect { Pooler.revert(false, @vmpooler_url, 'myfakehost', nil, 'shaaaaaaa') }.to raise_error(TokenError)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -220,7 +220,7 @@ describe Pooler do
|
|||
end
|
||||
|
||||
it 'raises a TokenError if no token was provided' do
|
||||
expect{ Pooler.disk(false, @vmpooler_url, 'myfakehost', nil, 12) }.to raise_error(TokenError)
|
||||
expect { Pooler.disk(false, @vmpooler_url, 'myfakehost', nil, 12) }.to raise_error(TokenError)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue