Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'qa/spec/specs/helpers/context_selector_spec.rb')
-rw-r--r--qa/spec/specs/helpers/context_selector_spec.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/qa/spec/specs/helpers/context_selector_spec.rb b/qa/spec/specs/helpers/context_selector_spec.rb
index a4573d96523..d18b88578a4 100644
--- a/qa/spec/specs/helpers/context_selector_spec.rb
+++ b/qa/spec/specs/helpers/context_selector_spec.rb
@@ -324,6 +324,27 @@ RSpec.describe QA::Specs::Helpers::ContextSelector do
end
end
+ context 'local' do
+ it 'runs locally' do
+ stub_env('CI_JOB_NAME', nil)
+ group = describe_successfully 'Runs locally', :local do
+ it('runs locally') {}
+ end
+
+ expect(group.examples[0].execution_result.status).to eq(:passed)
+ end
+
+ it 'does not run in CI' do
+ stub_env('CI_JOB_NAME', 'ee:instance-image')
+
+ group = describe_successfully 'Does not run in CI' do
+ it('does not run in CI', only: :local) {}
+ end
+
+ expect(group.examples[0].execution_result.status).to eq(:pending)
+ end
+ end
+
context 'production' do
before do
allow(GitlabEdition).to receive(:jh?).and_return(false)