gitlab-org--gitlab-foss/qa/spec/scenario/test/integration/mattermost_spec.rb
Mark Lapierre 67c38a6573 Set feature flag via command line
First attempt at allowing a feature flag to be set via the command line
when running tests. This will enable the flag, run the tests, and then
disable the flag.

Using OptionParser meant changing how scenarios get the instance
address, so this also allows the address to be set as a command line
option. It's backwards compatible (you can still provide the address
as the command line option after the scenario)
2019-03-27 19:03:03 +00:00

25 lines
779 B
Ruby

# frozen_string_literal: true
describe QA::Scenario::Test::Integration::Mattermost do
context '#perform' do
it_behaves_like 'a QA scenario class' do
let(:args) { %w[gitlab_address mattermost_address] }
let(:args) do
{
gitlab_address: 'http://gitlab_address',
mattermost_address: 'http://mattermost_address'
}
end
let(:named_options) { %w[--address http://gitlab_address --mattermost-address http://mattermost_address] }
let(:tags) { [:mattermost] }
let(:options) { ['path1']}
it 'requires a GitHub access token' do
subject.perform(args)
expect(attributes).to have_received(:define)
.with(:mattermost_address, 'http://mattermost_address')
end
end
end
end