Commit 24e727ca authored by Sean McGivern's avatar Sean McGivern

Add integration test for --queue-query-syntax

parent d6889783
...@@ -3,14 +3,23 @@ ...@@ -3,14 +3,23 @@
require 'spec_helper' require 'spec_helper'
describe 'ee/bin/sidekiq-cluster' do describe 'ee/bin/sidekiq-cluster' do
it 'runs successfully', :aggregate_failures do using RSpec::Parameterized::TableSyntax
cmd = %w[ee/bin/sidekiq-cluster --dryrun --negate cronjob]
output, status = Gitlab::Popen.popen(cmd, Rails.root.to_s) where(:args, :included, :excluded) do
%w[--negate cronjob] | '-qdefault,1' | '-qcronjob,1'
%w[--queue-query-syntax resource_boundary=cpu] | '-qupdate_merge_requests,1' | '-qdefault,1'
end
with_them do
it 'runs successfully', :aggregate_failures do
cmd = %w[ee/bin/sidekiq-cluster --dryrun] + args
output, status = Gitlab::Popen.popen(cmd, Rails.root.to_s)
expect(status).to be(0) expect(status).to be(0)
expect(output).to include('"bundle", "exec", "sidekiq"') expect(output).to include('"bundle", "exec", "sidekiq"')
expect(output).not_to include('-qcronjob,1') expect(output).to include(included)
expect(output).to include('-qdefault,1') expect(output).not_to include(excluded)
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