diff options
| author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-23 18:09:16 +0000 |
|---|---|---|
| committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-23 18:09:16 +0000 |
| commit | f6b95a66bc12adeb4fac7277d1eb345d9e7819fd (patch) | |
| tree | b2739bb34529d005a356df12da50c0e38caf6a52 /qa/spec | |
| parent | b465b2440bbf8ac8c4ef21728ab14fb48589057c (diff) | |
| download | gitlab-ce-f6b95a66bc12adeb4fac7277d1eb345d9e7819fd.tar.gz | |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa/spec')
| -rw-r--r-- | qa/spec/specs/helpers/feature_flag_spec.rb | 66 |
1 files changed, 36 insertions, 30 deletions
diff --git a/qa/spec/specs/helpers/feature_flag_spec.rb b/qa/spec/specs/helpers/feature_flag_spec.rb index 6d9bdea7f65..180890b2701 100644 --- a/qa/spec/specs/helpers/feature_flag_spec.rb +++ b/qa/spec/specs/helpers/feature_flag_spec.rb @@ -151,51 +151,57 @@ RSpec.describe QA::Specs::Helpers::FeatureFlag do it_behaves_like 'skips with given feature flag metadata', { name: 'global_ff', scope: :global } end - context 'when run on jh production', skip: 'https://gitlab.com/gitlab-org/gitlab/-/issues/392832' do + context 'when run on jh production mainland' do before do allow(GitlabEdition).to receive(:jh?).and_return(true) end - context 'when on mainland' do - before(:context) do - QA::Runtime::Scenario.define(:gitlab_address, 'https://jihulab.com') - end - - context 'when no scope is defined' do - it_behaves_like 'skips with given feature flag metadata', { name: 'no_scope_ff' } + before(:context) do + QA::Runtime::Scenario.define(:gitlab_address, 'https://jihulab.com') + end - context 'for only one test in the example group' do - it 'only skips specified test and runs all others' do - group = describe_successfully 'Feature flag set for one test' do - it('is skipped', feature_flag: { name: 'single_test_ff' }) {} - it('passes') {} - end + context 'when no scope is defined' do + it_behaves_like 'skips with given feature flag metadata', { name: 'no_scope_ff' } - expect(group.examples[0].execution_result.status).to eq(:pending) - expect(group.examples[1].execution_result.status).to eq(:passed) + context 'for only one test in the example group' do + it 'only skips specified test and runs all others' do + group = describe_successfully 'Feature flag set for one test' do + it('is skipped', feature_flag: { name: 'single_test_ff' }) {} + it('passes') {} end + + expect(group.examples[0].execution_result.status).to eq(:pending) + expect(group.examples[1].execution_result.status).to eq(:passed) end end end - context 'when on hk' do - before(:context) do - QA::Runtime::Scenario.define(:gitlab_address, 'https://jihulab.hk') - end + it_behaves_like 'skips with given feature flag metadata', { name: 'actor_ff', scope: :project } - context 'when no scope is defined' do - it_behaves_like 'skips with given feature flag metadata', { name: 'no_scope_ff' } + it_behaves_like 'skips with given feature flag metadata', { name: 'global_ff', scope: :global } + end - context 'for only one test in the example group' do - it 'only skips specified test and runs all others' do - group = describe_successfully 'Feature flag set for one test' do - it('is skipped', feature_flag: { name: 'single_test_ff' }) {} - it('passes') {} - end + context 'when run on jh production hk' do + before do + allow(GitlabEdition).to receive(:jh?).and_return(true) + end + + before(:context) do + QA::Runtime::Scenario.define(:gitlab_address, 'https://jihulab.hk') + end + + context 'when no scope is defined' do + it_behaves_like 'skips with given feature flag metadata', { name: 'no_scope_ff' } - expect(group.examples[0].execution_result.status).to eq(:pending) - expect(group.examples[1].execution_result.status).to eq(:passed) + context 'for only one test in the example group' do + it 'only skips specified test and runs all others' do + group = describe_successfully 'Feature flag set for one test' do + it('is skipped', feature_flag: { name: 'single_test_ff' }) {} + it('passes') {} end + + expect(group.examples[0].execution_result.status).to eq(:pending) + expect(group.examples[1].execution_result.status).to eq(:passed) end end end |
