Commit 16ff3229 authored by Tomasz Maczukin's avatar Tomasz Maczukin Committed by Grzegorz Bizon

Fix rubocop offenses

parent dcdf2a8b
...@@ -651,7 +651,7 @@ module Ci ...@@ -651,7 +651,7 @@ module Ci
options: { options: {
image: { name: "ruby:2.5", entrypoint: ["/usr/local/bin/init", "run"] }, image: { name: "ruby:2.5", entrypoint: ["/usr/local/bin/init", "run"] },
services: [{ name: "postgresql", alias: "db-pg", entrypoint: ["/usr/local/bin/init", "run"], services: [{ name: "postgresql", alias: "db-pg", entrypoint: ["/usr/local/bin/init", "run"],
command: ["/usr/local/bin/init", "run"]}, command: ["/usr/local/bin/init", "run"] },
{ name: "docker:dind" }] { name: "docker:dind" }]
}, },
allow_failure: false, allow_failure: false,
......
...@@ -38,7 +38,7 @@ describe Gitlab::Ci::Config::Entry::Image do ...@@ -38,7 +38,7 @@ describe Gitlab::Ci::Config::Entry::Image do
end end
context 'when configuration is a hash' do context 'when configuration is a hash' do
let(:config) { { name: 'ruby:2.2', entrypoint: ['/bin/sh', 'run'] } } let(:config) { { name: 'ruby:2.2', entrypoint: %w(/bin/sh run) } }
describe '#value' do describe '#value' do
it 'returns image hash' do it 'returns image hash' do
...@@ -66,7 +66,7 @@ describe Gitlab::Ci::Config::Entry::Image do ...@@ -66,7 +66,7 @@ describe Gitlab::Ci::Config::Entry::Image do
describe '#entrypoint' do describe '#entrypoint' do
it "returns image's entrypoint" do it "returns image's entrypoint" do
expect(entry.entrypoint).to eq ['/bin/sh', 'run'] expect(entry.entrypoint).to eq %w(/bin/sh run)
end end
end end
end end
......
...@@ -43,7 +43,7 @@ describe Gitlab::Ci::Config::Entry::Service do ...@@ -43,7 +43,7 @@ describe Gitlab::Ci::Config::Entry::Service do
context 'when configuration is a hash' do context 'when configuration is a hash' do
let(:config) do let(:config) do
{ name: 'postgresql:9.5', alias: 'db', command: ['cmd', 'run'], entrypoint: ['/bin/sh', 'run'] } { name: 'postgresql:9.5', alias: 'db', command: %w(cmd run), entrypoint: %w(/bin/sh run) }
end end
describe '#valid?' do describe '#valid?' do
...@@ -72,13 +72,13 @@ describe Gitlab::Ci::Config::Entry::Service do ...@@ -72,13 +72,13 @@ describe Gitlab::Ci::Config::Entry::Service do
describe '#command' do describe '#command' do
it "returns service's command" do it "returns service's command" do
expect(entry.command).to eq ['cmd', 'run'] expect(entry.command).to eq %w(cmd run)
end end
end end
describe '#entrypoint' do describe '#entrypoint' do
it "returns service's entrypoint" do it "returns service's entrypoint" do
expect(entry.entrypoint).to eq ['/bin/sh', 'run'] expect(entry.entrypoint).to eq %w(/bin/sh run)
end end
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment