Commit 69a41b5f authored by Sanad Liaquat's avatar Sanad Liaquat

Merge branch 'migrate-non-reliable-tests-to-use-feature-flag-rspec-tag' into 'master'

Migrate Non-Reliable/Non-Smoke Tests to Use RSpec feature_flag Metadata

See merge request gitlab-org/gitlab!85141
parents 62971f04 f07f49c5
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
# rubocop:disable Rails/Pluck, Layout/LineLength, RSpec/MultipleMemoizedHelpers # rubocop:disable Rails/Pluck, Layout/LineLength, RSpec/MultipleMemoizedHelpers
module QA module QA
RSpec.describe "Manage", :requires_admin, only: { job: 'large-gitlab-import' } do RSpec.describe "Manage", requires_admin: 'uses admin API client for resource creation',
feature_flag: { name: 'bulk_import_projects', scope: :global },
only: { job: 'large-gitlab-import' } do
describe "Gitlab migration" do describe "Gitlab migration" do
let(:logger) { Runtime::Logger.logger } let(:logger) { Runtime::Logger.logger }
let(:differ) { RSpec::Support::Differ.new(color: true) } let(:differ) { RSpec::Support::Differ.new(color: true) }
......
# frozen_string_literal: true # frozen_string_literal: true
module QA module QA
RSpec.describe 'Package', :orchestrated, :requires_admin, :packages, :object_storage do RSpec.describe 'Package', :orchestrated, :packages, :object_storage,
feature_flag: { name: 'rubygem_packages', scope: :project } do
describe 'RubyGems Repository' do describe 'RubyGems Repository' do
include Runtime::Fixtures include Runtime::Fixtures
......
# frozen_string_literal: true # frozen_string_literal: true
module QA module QA
# TODO: Remove :requires_admin when the `Runtime::Feature.enable` method call is removed RSpec.describe 'Geo', :orchestrated, :geo, feature_flag: { name: 'vue_issues_list', scope: :group } do
RSpec.describe 'Geo', :orchestrated, :geo, :requires_admin do
describe 'GitLab Geo attachment replication' do describe 'GitLab Geo attachment replication' do
let(:file_to_attach) { File.absolute_path(File.join('qa', 'fixtures', 'designs', 'banana_sample.gif')) } let(:file_to_attach) { File.absolute_path(File.join('qa', 'fixtures', 'designs', 'banana_sample.gif')) }
......
# frozen_string_literal: true # frozen_string_literal: true
module QA module QA
RSpec.describe 'Secure', :runner, :requires_admin do # Leaving :global scope out of feature_flag metadata
# This will allow test to still run in staging since we are only checking if the feature is enabled
RSpec.describe 'Secure', :runner, feature_flag: { name: 'lc_remove_legacy_approval_status' } do
describe 'License Compliance' do describe 'License Compliance' do
before(:all) do before(:all) do
@project = Resource::Project.fabricate_via_api! do |project| @project = Resource::Project.fabricate_via_api! do |project|
......
# frozen_string_literal: true # frozen_string_literal: true
module QA module QA
RSpec.describe 'Secure', :runner, :requires_admin do # Leaving :global scope out of feature_flag metadata
# This will allow test to still run in staging since we are only checking if the feature is enabled
RSpec.describe 'Secure', :runner, feature_flag: { name: 'lc_remove_legacy_approval_status' } do
describe 'License merge request widget' do describe 'License merge request widget' do
let(:approved_license_name) { "MIT License" } let(:approved_license_name) { "MIT License" }
let(:denied_license_name) { "zlib License" } let(:denied_license_name) { "zlib License" }
......
# frozen_string_literal: true # frozen_string_literal: true
module QA module QA
RSpec.describe 'Manage', :group_saml, :orchestrated do RSpec.describe 'Manage', :group_saml, :orchestrated, requires_admin: 'creates a user via API',
feature_flag: { name: 'group_administration_nav_item', scope: :global } do
describe 'Group SAML SSO - Enforced SSO' do describe 'Group SAML SSO - Enforced SSO' do
include Support::API include Support::API
......
# frozen_string_literal: true # frozen_string_literal: true
module QA module QA
RSpec.describe 'Manage', :group_saml, :orchestrated, :requires_admin do RSpec.describe 'Manage', :group_saml, :orchestrated, requires_admin: 'for various user admin functions',
feature_flag: { name: 'group_administration_nav_item', scope: :global } do
describe 'Group SAML SSO - Enforced SSO' do describe 'Group SAML SSO - Enforced SSO' do
include Support::API include Support::API
......
# frozen_string_literal: true # frozen_string_literal: true
module QA module QA
RSpec.describe 'Manage', :group_saml, :orchestrated, :requires_admin do RSpec.describe 'Manage', :group_saml, :orchestrated, requires_admin: 'creates a user via API',
feature_flag: { name: 'group_administration_nav_item', scope: :global } do
describe 'Group SAML SSO - Non enforced SSO' do describe 'Group SAML SSO - Non enforced SSO' do
include Support::API include Support::API
......
# frozen_string_literal: true # frozen_string_literal: true
module QA module QA
# TODO: Remove :requires_admin when the `Runtime::Feature.enable` method call is removed RSpec.describe 'Create', feature_flag: { name: 'refactor_blob_viewer', scope: :project } do
RSpec.describe 'Create', :requires_admin do
describe 'Codeowners' do describe 'Codeowners' do
let(:files) do let(:files) do
[ [
......
# frozen_string_literal: true # frozen_string_literal: true
module QA module QA
RSpec.describe 'Create', :requires_admin do RSpec.describe 'Create' do
describe 'Setup an MR with codeowners file' do describe 'Setup an MR with codeowners file' do
let(:project) do let(:project) do
Resource::Project.fabricate_via_api! do |project| Resource::Project.fabricate_via_api! do |project|
...@@ -39,14 +39,9 @@ module QA ...@@ -39,14 +39,9 @@ module QA
end end
before do before do
Runtime::Feature.enable(:gitaly_go_user_merge_branch)
Flow::Login.sign_in Flow::Login.sign_in
end end
after do
Runtime::Feature.disable(:gitaly_go_user_merge_branch)
end
it 'creates a merge request with codeowners file and squashing commits enabled', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347672' do it 'creates a merge request with codeowners file and squashing commits enabled', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347672' do
# The default branch is already protected, and we can't update a protected branch via the API (yet) # The default branch is already protected, and we can't update a protected branch via the API (yet)
# so we unprotect it first and then protect it again with the desired parameters # so we unprotect it first and then protect it again with the desired parameters
......
...@@ -97,7 +97,7 @@ module QA ...@@ -97,7 +97,7 @@ module QA
expect_no_error_on_push as_user: user_two expect_no_error_on_push as_user: user_two
end end
context 'when refactor_blob_viewer is enabled', :requires_admin do context 'when refactor_blob_viewer is enabled', feature_flag: { name: 'refactor_blob_viewer', scope: :project } do
before do before do
Runtime::Feature.enable(:refactor_blob_viewer, project: project) Runtime::Feature.enable(:refactor_blob_viewer, project: project)
end end
......
# frozen_string_literal: true # frozen_string_literal: true
module QA module QA
RSpec.describe 'Package', :orchestrated, :group_saml, :requires_admin, :skip_live_env do RSpec.describe 'Package', :orchestrated, :group_saml, requires_admin: 'for various user admin functions',
feature_flag: { name: 'group_administration_nav_item', scope: :global } do
describe 'Dependency Proxy Group SSO' do describe 'Dependency Proxy Group SSO' do
include Support::API include Support::API
......
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