diff options
author | Mark Lapierre <mlapierre@gitlab.com> | 2018-10-08 14:56:32 -0400 |
---|---|---|
committer | Mark Lapierre <mlapierre@gitlab.com> | 2018-10-08 15:04:08 -0400 |
commit | 03ee488f93d4ccce5bb6d476ad33e210fb94a56b (patch) | |
tree | 5a0433cb173a90352b778f8787a8c44faac134b5 /qa/spec/specs | |
parent | 1540d51a54f6c2e63335824deb93dad75aba1aec (diff) | |
download | gitlab-ce-03ee488f93d4ccce5bb6d476ad33e210fb94a56b.tar.gz |
Allow the registration e2e test to be skipped
If SIGNUP_DISABLED is true skip any tests with a context
:skip_signup_disabled. The context is set for the registration tests.
This allows the tests to be skipped when run on the staging, which
doesn't allow registration
Diffstat (limited to 'qa/spec/specs')
-rw-r--r-- | qa/spec/specs/runner_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/qa/spec/specs/runner_spec.rb b/qa/spec/specs/runner_spec.rb index cf22d1c9395..9ddaf7ab1b3 100644 --- a/qa/spec/specs/runner_spec.rb +++ b/qa/spec/specs/runner_spec.rb @@ -62,6 +62,20 @@ describe QA::Specs::Runner do end end + context 'when SIGNUP_DISABLED is true' do + before do + allow(QA::Runtime::Env).to receive(:signup_disabled?).and_return(true) + end + + subject { described_class.new } + + it 'it includes default args and excludes the skip_signup_disabled tag' do + expect_rspec_runner_arguments(['--tag', '~orchestrated', '--tag', '~skip_signup_disabled', *described_class::DEFAULT_TEST_PATH_ARGS]) + + subject.perform + end + end + def expect_rspec_runner_arguments(arguments) expect(RSpec::Core::Runner).to receive(:run) .with(arguments, $stderr, $stdout) |