diff options
Diffstat (limited to 'qa/qa/specs')
45 files changed, 432 insertions, 163 deletions
diff --git a/qa/qa/specs/features/api/3_create/gitaly/backend_node_recovery_spec.rb b/qa/qa/specs/features/api/3_create/gitaly/backend_node_recovery_spec.rb index 89bf92cd3af..c90f8546f91 100644 --- a/qa/qa/specs/features/api/3_create/gitaly/backend_node_recovery_spec.rb +++ b/qa/qa/specs/features/api/3_create/gitaly/backend_node_recovery_spec.rb @@ -3,7 +3,7 @@ module QA RSpec.describe 'Create' do context 'Gitaly' do - describe 'Backend node recovery', :orchestrated, :gitaly_cluster, :skip_live_env, quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/238186', type: :investigating } do + describe 'Backend node recovery', :orchestrated, :gitaly_cluster, :skip_live_env, quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/322647', type: :flaky } do let(:praefect_manager) { Service::PraefectManager.new } let(:project) do Resource::Project.fabricate! do |project| @@ -50,18 +50,17 @@ module QA push.file_content = 'new file' end + # Confirm that the commit is waiting to be replicated + expect(praefect_manager).to be_replication_pending + # Start the old primary node again praefect_manager.start_primary_node - praefect_manager.wait_for_health_check_current_primary_node - - # Confirm dataloss (i.e., inconsistent nodes) - expect(praefect_manager.replicated?(project.id)).to be false + praefect_manager.wait_for_health_check_all_nodes - # Reconcile nodes to recover from dataloss - praefect_manager.reconcile_nodes + # Wait for automatic replication praefect_manager.wait_for_replication(project.id) - # Confirm that both commits are available after reconciliation + # Confirm that both commits are available expect(project.commits.map { |commit| commit[:message].chomp }) .to include("Initial commit").and include("pushed after failover") end diff --git a/qa/qa/specs/features/api/3_create/merge_request/push_options_remove_source_branch_spec.rb b/qa/qa/specs/features/api/3_create/merge_request/push_options_remove_source_branch_spec.rb index d6bd668fa8a..bf2ecfdb513 100644 --- a/qa/qa/specs/features/api/3_create/merge_request/push_options_remove_source_branch_spec.rb +++ b/qa/qa/specs/features/api/3_create/merge_request/push_options_remove_source_branch_spec.rb @@ -38,7 +38,11 @@ module QA end.merge_via_api! expect(merge_request[:state]).to eq('merged') - expect(project).not_to have_branch(branch) + + # Retry in case the branch deletion takes more time to finish + QA::Support::Retrier.retry_on_exception(max_attempts: 5, sleep_interval: 5) do + expect(project).not_to have_branch(branch) + end end end end diff --git a/qa/qa/specs/features/api/3_create/snippet/snippet_repository_storage_move_spec.rb b/qa/qa/specs/features/api/3_create/snippet/snippet_repository_storage_move_spec.rb new file mode 100644 index 00000000000..4872acd1004 --- /dev/null +++ b/qa/qa/specs/features/api/3_create/snippet/snippet_repository_storage_move_spec.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +module QA + RSpec.describe 'Create' do + describe 'Snippet repository storage', :requires_admin, :orchestrated, :repository_storage do + let(:source_storage) { { type: :gitaly, name: 'default' } } + let(:destination_storage) { { type: :gitaly, name: QA::Runtime::Env.additional_repository_storage } } + + let(:snippet) do + Resource::Snippet.fabricate_via_api! do |snippet| + snippet.title = 'Snippet to move storage of' + snippet.file_name = 'original_file' + snippet.file_content = 'Original file content' + snippet.api_client = Runtime::API::Client.as_admin + end + end + + praefect_manager = Service::PraefectManager.new + + before do + praefect_manager.gitlab = 'gitlab' + end + + it 'moves snippet repository from one Gitaly storage to another', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1700' do + expect(snippet).to have_file('original_file') + expect { snippet.change_repository_storage(destination_storage[:name]) }.not_to raise_error + expect { praefect_manager.verify_storage_move(source_storage, destination_storage) }.not_to raise_error + + # verifies you can push commits to the moved snippet + Resource::Repository::Push.fabricate! do |push| + push.repository_http_uri = snippet.http_url_to_repo + push.file_name = 'new_file' + push.file_content = 'new file content' + push.commit_message = 'Adding a new snippet file' + push.new_branch = false + end + + aggregate_failures do + expect(snippet).to have_file('original_file') + expect(snippet).to have_file('new_file') + end + end + end + end +end diff --git a/qa/qa/specs/features/api/4_verify/.gitkeep b/qa/qa/specs/features/api/4_verify/.gitkeep new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/qa/qa/specs/features/api/4_verify/.gitkeep diff --git a/qa/qa/specs/features/api/4_verify/pipeline_deletion_spec.rb b/qa/qa/specs/features/api/4_verify/pipeline_deletion_spec.rb deleted file mode 100644 index 1d1b765bb9f..00000000000 --- a/qa/qa/specs/features/api/4_verify/pipeline_deletion_spec.rb +++ /dev/null @@ -1,82 +0,0 @@ -# frozen_string_literal: true - -module QA - RSpec.describe 'Verify' do - include Support::Api - - let(:api_client) { Runtime::API::Client.new(:gitlab) } - - describe 'Pipeline', :runner do - let(:project) do - Resource::Project.fabricate_via_api! do |project| - project.name = 'project-with-pipeline' - end - end - - let!(:runner) do - Resource::Runner.fabricate! do |runner| - runner.project = project - runner.name = project.name - runner.tags = [project.name] - end - end - - let!(:ci_file) do - Resource::Repository::Commit.fabricate_via_api! do |commit| - commit.project = project - commit.commit_message = 'Add .gitlab-ci.yml' - commit.add_files( - [ - { - file_path: '.gitlab-ci.yml', - content: <<~YAML - job1: - tags: - - #{project.name} - script: echo 'OK' - YAML - } - ] - ) - end - end - - let!(:pipeline_id) do - pipeline_create_request = Runtime::API::Request.new(api_client, "/projects/#{project.id}/pipeline?ref=#{project.default_branch}") - JSON.parse(post(pipeline_create_request.url, nil))['id'] - end - - let(:pipeline_data_request) { Runtime::API::Request.new(api_client, "/projects/#{project.id}/pipelines/#{pipeline_id}") } - - before do - Support::Waiter.wait_until(sleep_interval: 3) { !pipeline.empty? && pipeline['status'] != 'pending' } - end - - after do - runner.remove_via_api! - end - - context 'when deleted via API' do - it 'is not found', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/931' do - delete(pipeline_data_request.url) - - deleted_pipeline = nil - Support::Waiter.wait_until(sleep_interval: 3) do - deleted_pipeline = pipeline - !pipeline.empty? - end - - raise "Pipeline response does not have a 'message' key: #{deleted_pipeline}" unless deleted_pipeline&.key?('message') - - expect(deleted_pipeline['message'].downcase).to have_content('404 not found') - end - end - - private - - def pipeline - JSON.parse(get(pipeline_data_request.url)) - end - end - end -end diff --git a/qa/qa/specs/features/browser_ui/1_manage/group/transfer_project_spec.rb b/qa/qa/specs/features/browser_ui/1_manage/group/transfer_project_spec.rb index 5f38907f89f..7ab5ffdf014 100644 --- a/qa/qa/specs/features/browser_ui/1_manage/group/transfer_project_spec.rb +++ b/qa/qa/specs/features/browser_ui/1_manage/group/transfer_project_spec.rb @@ -44,8 +44,7 @@ module QA end it 'user transfers a project between groups', - testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/406', - quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/283925', type: :investigating, only: :production } do + testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1703' do # Retry is needed here as the target group is not avaliable for transfer right away. QA::Support::Retrier.retry_on_exception(reload_page: page) do Page::File::Show.perform(&:go_to_general_settings) diff --git a/qa/qa/specs/features/browser_ui/1_manage/login/2fa_recovery_spec.rb b/qa/qa/specs/features/browser_ui/1_manage/login/2fa_recovery_spec.rb index e38a9f47bd6..8e03444b113 100644 --- a/qa/qa/specs/features/browser_ui/1_manage/login/2fa_recovery_spec.rb +++ b/qa/qa/specs/features/browser_ui/1_manage/login/2fa_recovery_spec.rb @@ -29,6 +29,7 @@ module QA end before do + Runtime::Feature.enable(:invite_members_group_modal, group: group) group.add_member(developer_user, Resource::Members::AccessLevel::DEVELOPER) end diff --git a/qa/qa/specs/features/browser_ui/1_manage/login/log_in_with_2fa_spec.rb b/qa/qa/specs/features/browser_ui/1_manage/login/log_in_with_2fa_spec.rb index 2fc3ff2f18f..a8650d633c8 100644 --- a/qa/qa/specs/features/browser_ui/1_manage/login/log_in_with_2fa_spec.rb +++ b/qa/qa/specs/features/browser_ui/1_manage/login/log_in_with_2fa_spec.rb @@ -31,6 +31,7 @@ module QA let(:two_fa_expected_text) { /The group settings for.*require you to enable Two-Factor Authentication for your account.*You need to do this before/ } before do + Runtime::Feature.enable(:invite_members_group_modal, group: group) group.add_member(developer_user, Resource::Members::AccessLevel::DEVELOPER) end diff --git a/qa/qa/specs/features/browser_ui/1_manage/login/register_spec.rb b/qa/qa/specs/features/browser_ui/1_manage/login/register_spec.rb index ffc2290b644..4141060b6cb 100644 --- a/qa/qa/specs/features/browser_ui/1_manage/login/register_spec.rb +++ b/qa/qa/specs/features/browser_ui/1_manage/login/register_spec.rb @@ -23,6 +23,7 @@ module QA @personal_access_token = Runtime::Env.personal_access_token Runtime::Env.personal_access_token = nil + ldap_username = Runtime::Env.ldap_username Runtime::Env.ldap_username = nil diff --git a/qa/qa/specs/features/browser_ui/1_manage/project/add_project_member_spec.rb b/qa/qa/specs/features/browser_ui/1_manage/project/add_project_member_spec.rb index 85cfefd6c5c..bf59dcfcc4c 100644 --- a/qa/qa/specs/features/browser_ui/1_manage/project/add_project_member_spec.rb +++ b/qa/qa/specs/features/browser_ui/1_manage/project/add_project_member_spec.rb @@ -4,11 +4,7 @@ module QA RSpec.describe 'Manage', :requires_admin do describe 'Add project member' do before do - Runtime::Feature.enable('vue_project_members_list') - end - - after do - Runtime::Feature.disable('vue_project_members_list') + Runtime::Feature.enable(:invite_members_group_modal) end it 'user adds project member', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/482' do @@ -16,9 +12,11 @@ module QA user = Resource::User.fabricate_or_use(Runtime::Env.gitlab_qa_username_1, Runtime::Env.gitlab_qa_password_1) - Resource::Project.fabricate_via_api! do |project| + project = Resource::Project.fabricate_via_api! do |project| project.name = 'add-member-project' - end.visit! + end + + project.visit! Page::Project::Menu.perform(&:click_members) Page::Project::Members.perform do |members| diff --git a/qa/qa/specs/features/browser_ui/1_manage/project/dashboard_images_spec.rb b/qa/qa/specs/features/browser_ui/1_manage/project/dashboard_images_spec.rb index f2822e3d368..95092fe6ba6 100644 --- a/qa/qa/specs/features/browser_ui/1_manage/project/dashboard_images_spec.rb +++ b/qa/qa/specs/features/browser_ui/1_manage/project/dashboard_images_spec.rb @@ -47,7 +47,7 @@ module QA end end - context 'when logged in as a new admin', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/463' do + context 'when logged in as a new admin', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1727' do it_behaves_like 'loads all images' do let(:new_user) { @new_admin } end diff --git a/qa/qa/specs/features/browser_ui/1_manage/project/import_github_repo_spec.rb b/qa/qa/specs/features/browser_ui/1_manage/project/import_github_repo_spec.rb index d54ce0ac0fc..c8c483fc2aa 100644 --- a/qa/qa/specs/features/browser_ui/1_manage/project/import_github_repo_spec.rb +++ b/qa/qa/specs/features/browser_ui/1_manage/project/import_github_repo_spec.rb @@ -21,6 +21,7 @@ module QA end before do + Runtime::Feature.enable(:invite_members_group_modal, group: group) group.add_member(user, Resource::Members::AccessLevel::MAINTAINER) end diff --git a/qa/qa/specs/features/browser_ui/1_manage/project/protected_tags_spec.rb b/qa/qa/specs/features/browser_ui/1_manage/project/protected_tags_spec.rb index e40dde64675..714c4a2da67 100644 --- a/qa/qa/specs/features/browser_ui/1_manage/project/protected_tags_spec.rb +++ b/qa/qa/specs/features/browser_ui/1_manage/project/protected_tags_spec.rb @@ -2,7 +2,8 @@ module QA RSpec.describe 'Manage' do - describe 'Repository tags' do + # TODO: Remove :requires_admin meta when the `Runtime::Feature.enable` method call is removed + describe 'Repository tags', :requires_admin do let(:project) do Resource::Project.fabricate_via_api! do |project| project.name = 'project-for-tags' @@ -10,6 +11,10 @@ module QA end end + before do + Runtime::Feature.enable(:invite_members_group_modal, project: project) + end + let(:developer_user) { Resource::User.fabricate_or_use(Runtime::Env.gitlab_qa_username_1, Runtime::Env.gitlab_qa_password_1) } let(:maintainer_user) { Resource::User.fabricate_or_use(Runtime::Env.gitlab_qa_username_2, Runtime::Env.gitlab_qa_password_2) } let(:tag_name) { 'v0.0.1' } diff --git a/qa/qa/specs/features/browser_ui/2_plan/email/trigger_email_notification_spec.rb b/qa/qa/specs/features/browser_ui/2_plan/email/trigger_email_notification_spec.rb index f623efe5a3a..d352996f419 100644 --- a/qa/qa/specs/features/browser_ui/2_plan/email/trigger_email_notification_spec.rb +++ b/qa/qa/specs/features/browser_ui/2_plan/email/trigger_email_notification_spec.rb @@ -16,14 +16,10 @@ module QA end before do - Runtime::Feature.enable('vue_project_members_list', project: project) + Runtime::Feature.enable(:invite_members_group_modal) Flow::Login.sign_in end - after do - Runtime::Feature.disable('vue_project_members_list', project: project) - end - it 'is received by a user for project invitation', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/676' do project.visit! diff --git a/qa/qa/specs/features/browser_ui/2_plan/issue/check_mentions_for_xss_spec.rb b/qa/qa/specs/features/browser_ui/2_plan/issue/check_mentions_for_xss_spec.rb index a7f862e8911..9129584d110 100644 --- a/qa/qa/specs/features/browser_ui/2_plan/issue/check_mentions_for_xss_spec.rb +++ b/qa/qa/specs/features/browser_ui/2_plan/issue/check_mentions_for_xss_spec.rb @@ -18,6 +18,8 @@ module QA describe 'check xss occurence in @mentions in issues', :requires_admin do before do + Runtime::Feature.enable(:invite_members_group_modal) + Flow::Login.sign_in project.add_member(user) diff --git a/qa/qa/specs/features/browser_ui/2_plan/issue/mentions_spec.rb b/qa/qa/specs/features/browser_ui/2_plan/issue/mentions_spec.rb index cc815fd0e67..45222d2ec7e 100644 --- a/qa/qa/specs/features/browser_ui/2_plan/issue/mentions_spec.rb +++ b/qa/qa/specs/features/browser_ui/2_plan/issue/mentions_spec.rb @@ -1,7 +1,8 @@ # frozen_string_literal: true module QA - RSpec.describe 'Plan', :smoke, :reliable do + # TODO: Remove :requires_admin meta when the `Runtime::Feature.enable` method call is removed + RSpec.describe 'Plan', :smoke, :reliable, :requires_admin do describe 'mention' do let(:user) { Resource::User.fabricate_or_use(Runtime::Env.gitlab_qa_username_1, Runtime::Env.gitlab_qa_password_1) } let(:project) do @@ -13,6 +14,7 @@ module QA before do Flow::Login.sign_in + Runtime::Feature.enable(:invite_members_group_modal, project: project) project.add_member(user) diff --git a/qa/qa/specs/features/browser_ui/2_plan/issue/real_time_assignee_spec.rb b/qa/qa/specs/features/browser_ui/2_plan/issue/real_time_assignee_spec.rb index 11f93d6a97e..2654531bc2c 100644 --- a/qa/qa/specs/features/browser_ui/2_plan/issue/real_time_assignee_spec.rb +++ b/qa/qa/specs/features/browser_ui/2_plan/issue/real_time_assignee_spec.rb @@ -14,6 +14,7 @@ module QA before do Runtime::Feature.enable('real_time_issue_sidebar', project: project) Runtime::Feature.enable('broadcast_issue_updates', project: project) + Runtime::Feature.enable(:invite_members_group_modal, project: project) Flow::Login.sign_in diff --git a/qa/qa/specs/features/browser_ui/3_create/design_management/archive_design_content_spec.rb b/qa/qa/specs/features/browser_ui/3_create/design_management/archive_design_content_spec.rb index 7090427e5a4..43cf701acdd 100644 --- a/qa/qa/specs/features/browser_ui/3_create/design_management/archive_design_content_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/design_management/archive_design_content_spec.rb @@ -15,7 +15,7 @@ module QA let(:third_design) do Resource::Design.fabricate! do |design| design.issue = second_design.issue - design.filename = 'tanuki.jpg' + design.filename = 'testfile.png' end end diff --git a/qa/qa/specs/features/browser_ui/3_create/design_management/modify_design_content_spec.rb b/qa/qa/specs/features/browser_ui/3_create/design_management/modify_design_content_spec.rb index 135063b6644..9fbb0d69de1 100644 --- a/qa/qa/specs/features/browser_ui/3_create/design_management/modify_design_content_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/design_management/modify_design_content_spec.rb @@ -5,7 +5,7 @@ module QA context 'Design Management' do let(:design) do Resource::Design.fabricate! do |design| - design.filename = 'tanuki.jpg' + design.filename = 'testfile.png' end end diff --git a/qa/qa/specs/features/browser_ui/3_create/jenkins/jenkins_build_status_spec.rb b/qa/qa/specs/features/browser_ui/3_create/jenkins/jenkins_build_status_spec.rb index 0fec7bc9e9d..734ff160937 100644 --- a/qa/qa/specs/features/browser_ui/3_create/jenkins/jenkins_build_status_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/jenkins/jenkins_build_status_spec.rb @@ -107,7 +107,7 @@ module QA def fabricate_personal_access_token login_to_gitlab - token = Resource::PersonalAccessToken.fabricate!.access_token + token = Resource::PersonalAccessToken.fabricate!.token Page::Main::Menu.perform(&:sign_out) token end diff --git a/qa/qa/specs/features/browser_ui/3_create/merge_request/merge_merge_request_from_fork_spec.rb b/qa/qa/specs/features/browser_ui/3_create/merge_request/merge_merge_request_from_fork_spec.rb index d2ba97400e6..8d12042bd85 100644 --- a/qa/qa/specs/features/browser_ui/3_create/merge_request/merge_merge_request_from_fork_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/merge_request/merge_merge_request_from_fork_spec.rb @@ -9,7 +9,7 @@ module QA end end - it 'can merge feature branch fork to mainline', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/928' do + it 'can merge feature branch fork to mainline', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1701' do Flow::Login.while_signed_in do merge_request.visit! diff --git a/qa/qa/specs/features/browser_ui/3_create/merge_request/merge_when_pipeline_succeeds_spec.rb b/qa/qa/specs/features/browser_ui/3_create/merge_request/merge_when_pipeline_succeeds_spec.rb new file mode 100644 index 00000000000..2ddc59acd5c --- /dev/null +++ b/qa/qa/specs/features/browser_ui/3_create/merge_request/merge_when_pipeline_succeeds_spec.rb @@ -0,0 +1,84 @@ +# frozen_string_literal: true + +module QA + RSpec.describe 'Create', :runner do + describe 'Merge requests' do + let(:project) do + Resource::Project.fabricate_via_api! do |project| + project.name = 'merge-when-pipeline-succeeds' + project.initialize_with_readme = true + end + end + + let!(:runner) do + Resource::Runner.fabricate! do |runner| + runner.project = project + runner.name = "runner-for-#{project.name}" + runner.tags = ["runner-for-#{project.name}"] + end + end + + before do + Resource::Repository::Commit.fabricate_via_api! do |commit| + commit.project = project + commit.commit_message = 'Add .gitlab-ci.yml' + commit.add_files( + [ + { + file_path: '.gitlab-ci.yml', + content: <<~EOF + test: + tags: ["runner-for-#{project.name}"] + script: sleep 5 + only: + - merge_requests + EOF + } + ] + ) + end + + Flow::Login.sign_in + end + + after do + runner&.remove_via_api! + project&.remove_via_api! + end + + it 'merges when pipeline succeeds', :smoke, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1684' do + branch_name = "merge-request-test-#{SecureRandom.hex(8)}" + + # Create a branch that will be merged into the default branch + Resource::Repository::ProjectPush.fabricate! do |project_push| + project_push.project = project + project_push.new_branch = true + project_push.branch_name = branch_name + project_push.file_name = "file-#{SecureRandom.hex(8)}.txt" + end + + # Create a merge request to merge the branch we just created + merge_request = Resource::MergeRequest.fabricate_via_api! do |merge_request| + merge_request.project = project + merge_request.source_branch = branch_name + merge_request.no_preparation = true + end + + merge_request.visit! + + Page::MergeRequest::Show.perform do |mr| + mr.merge_when_pipeline_succeeds! + + expect(mr.merge_request_status).to match(/to be merged automatically when the pipeline succeeds/) + + Support::Waiter.wait_until(sleep_interval: 5) do + merge_request = merge_request.reload! + merge_request.state == 'merged' + end + + expect(mr.merged?).to be_truthy, "Expected content 'The changes were merged' but it did not appear." + end + end + end + end +end diff --git a/qa/qa/specs/features/browser_ui/3_create/merge_request/rebase_merge_request_spec.rb b/qa/qa/specs/features/browser_ui/3_create/merge_request/rebase_merge_request_spec.rb index 3414584bae3..34669eb3815 100644 --- a/qa/qa/specs/features/browser_ui/3_create/merge_request/rebase_merge_request_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/merge_request/rebase_merge_request_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true module QA - RSpec.describe 'Create', quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/30226', type: :bug } do + RSpec.describe 'Create', quarantine: { only: { subdomain: :staging }, issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/323990', type: :flaky } do describe 'Merge request rebasing' do it 'user rebases source branch of merge request', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1274' do Flow::Login.sign_in @@ -34,7 +34,7 @@ module QA Page::MergeRequest::Show.perform do |merge_request| expect(merge_request).to have_content('Needs rebasing') - expect(merge_request).not_to be_fast_forward_possible + expect(merge_request).to be_fast_forward_not_possible expect(merge_request).not_to have_merge_button merge_request.rebase! diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/clone_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/clone_spec.rb index 9edde7ac12f..fb9e42a6960 100644 --- a/qa/qa/specs/features/browser_ui/3_create/repository/clone_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/repository/clone_spec.rb @@ -2,7 +2,7 @@ module QA RSpec.describe 'Create' do - describe 'Git clone over HTTP', :ldap_no_tls do + describe 'Git clone over HTTP' do let(:project) do Resource::Project.fabricate_via_api! do |scenario| scenario.name = 'project-with-code' diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/move_project_create_fork_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/move_project_create_fork_spec.rb index 7a727ffb291..0f6edca654b 100644 --- a/qa/qa/specs/features/browser_ui/3_create/repository/move_project_create_fork_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/repository/move_project_create_fork_spec.rb @@ -19,6 +19,7 @@ module QA end before do + Runtime::Feature.enable(:invite_members_group_modal, project: parent_project) parent_project.add_member(user) end diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/push_http_private_token_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/push_http_private_token_spec.rb index 35ec2135491..2c0fb5ea290 100644 --- a/qa/qa/specs/features/browser_ui/3_create/repository/push_http_private_token_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/repository/push_http_private_token_spec.rb @@ -2,11 +2,11 @@ module QA RSpec.describe 'Create' do - describe 'Git push over HTTP', :ldap_no_tls, :smoke do + describe 'Git push over HTTP', :smoke do it 'user using a personal access token pushes code to the repository', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1278' do Flow::Login.sign_in - access_token = Resource::PersonalAccessToken.fabricate!.access_token + access_token = Resource::PersonalAccessToken.fabricate!.token user = Resource::User.new.tap do |user| user.username = Runtime::User.username diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_file_size_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_file_size_spec.rb index 222eb3771ad..1423e3c45ce 100644 --- a/qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_file_size_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_file_size_spec.rb @@ -17,7 +17,7 @@ module QA p.initialize_with_readme = true end - @api_client = Runtime::API::Client.new(:gitlab, personal_access_token: Runtime::Env.admin_personal_access_token) + @api_client = Runtime::API::Client.as_admin end after(:context) do diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_spec.rb index cf14017b7f1..861efa8b45a 100644 --- a/qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_spec.rb @@ -2,8 +2,8 @@ module QA RSpec.describe 'Create' do - describe 'Git push over HTTP', :ldap_no_tls do - it 'user pushes code to the repository', :smoke, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/426' do + describe 'Git push over HTTP' do + it 'user pushes code to the repository', :smoke, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1702' do Flow::Login.sign_in Resource::Repository::ProjectPush.fabricate! do |push| diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/push_over_ssh_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/push_over_ssh_spec.rb index c56e6d1267c..9eeb762e548 100644 --- a/qa/qa/specs/features/browser_ui/3_create/repository/push_over_ssh_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/repository/push_over_ssh_spec.rb @@ -41,8 +41,7 @@ module QA end end - it 'pushes multiple branches and tags together', :smoke, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1679 - ' do + it 'pushes multiple branches and tags together', :smoke, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1679' do branches = [] tags = [] Git::Repository.perform do |repository| diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/push_protected_branch_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/push_protected_branch_spec.rb index 2b249f779d9..ce7fdf379a4 100644 --- a/qa/qa/specs/features/browser_ui/3_create/repository/push_protected_branch_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/repository/push_protected_branch_spec.rb @@ -2,7 +2,7 @@ module QA RSpec.describe 'Create' do - describe 'Protected branch support', :ldap_no_tls do + describe 'Protected branch support' do let(:branch_name) { 'protected-branch' } let(:commit_message) { 'Protected push commit message' } let(:project) do diff --git a/qa/qa/specs/features/browser_ui/3_create/snippet/add_comment_to_snippet_spec.rb b/qa/qa/specs/features/browser_ui/3_create/snippet/add_comment_to_snippet_spec.rb index a867d9cb973..6ab50ba56f2 100644 --- a/qa/qa/specs/features/browser_ui/3_create/snippet/add_comment_to_snippet_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/snippet/add_comment_to_snippet_spec.rb @@ -23,6 +23,11 @@ module QA Flow::Login.sign_in end + after do + personal_snippet&.remove_via_api! + project_snippet&.remove_via_api! + end + shared_examples 'comments on snippets' do |snippet_type| it "adds, edits, and deletes a comment on a #{snippet_type}" do send(snippet_type) diff --git a/qa/qa/specs/features/browser_ui/3_create/snippet/add_file_to_snippet_spec.rb b/qa/qa/specs/features/browser_ui/3_create/snippet/add_file_to_snippet_spec.rb index 604c98ca21e..72d83eadde9 100644 --- a/qa/qa/specs/features/browser_ui/3_create/snippet/add_file_to_snippet_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/snippet/add_file_to_snippet_spec.rb @@ -2,7 +2,7 @@ module QA RSpec.describe 'Create' do - describe 'Multiple file snippet', quarantine: { only: { pipeline: :master }, issue: 'https://gitlab.com/gitlab-org/gitaly/-/issues/3143', type: :bug } do + describe 'Multiple file snippet' do let(:personal_snippet) do Resource::Snippet.fabricate_via_api! do |snippet| snippet.title = 'Personal snippet to add file to' @@ -23,6 +23,11 @@ module QA Flow::Login.sign_in end + after do + personal_snippet&.remove_via_api! + project_snippet&.remove_via_api! + end + shared_examples 'adding file to snippet' do |snippet_type| it "adds second file to an existing #{snippet_type} to make it multi-file" do send(snippet_type).visit! diff --git a/qa/qa/specs/features/browser_ui/3_create/snippet/clone_push_pull_personal_snippet_spec.rb b/qa/qa/specs/features/browser_ui/3_create/snippet/clone_push_pull_personal_snippet_spec.rb index 2940b2067a1..d44f5bc9e2e 100644 --- a/qa/qa/specs/features/browser_ui/3_create/snippet/clone_push_pull_personal_snippet_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/snippet/clone_push_pull_personal_snippet_spec.rb @@ -2,7 +2,7 @@ module QA RSpec.describe 'Create' do - describe 'Version control for personal snippets', quarantine: { only: { pipeline: :master }, issue: 'https://gitlab.com/gitlab-org/gitaly/-/issues/3143', type: :bug } do + describe 'Version control for personal snippets' do let(:new_file) { 'new_snippet_file' } let(:changed_content) { 'changes' } let(:commit_message) { 'Changes to snippets' } @@ -66,6 +66,8 @@ module QA expect(repository.commits.first).to include('Update snippet') expect(repository.file_content(new_file)).to include("#{added_content}#{changed_content}") end + + snippet.remove_via_api! end it 'clones, pushes, and pulls a snippet over SSH, deletes via UI', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/825' do diff --git a/qa/qa/specs/features/browser_ui/3_create/snippet/clone_push_pull_project_snippet_spec.rb b/qa/qa/specs/features/browser_ui/3_create/snippet/clone_push_pull_project_snippet_spec.rb index b91424d5b65..b67e0e54aa0 100644 --- a/qa/qa/specs/features/browser_ui/3_create/snippet/clone_push_pull_project_snippet_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/snippet/clone_push_pull_project_snippet_spec.rb @@ -2,7 +2,7 @@ module QA RSpec.describe 'Create' do - describe 'Version control for project snippets', quarantine: { only: { pipeline: :master }, issue: 'https://gitlab.com/gitlab-org/gitaly/-/issues/3143', type: :bug } do + describe 'Version control for project snippets' do let(:new_file) { 'new_snippet_file' } let(:changed_content) { 'changes' } let(:commit_message) { 'Changes to snippets' } @@ -40,7 +40,7 @@ module QA ssh_key.remove_via_api! end - it 'clones, pushes, and pulls a project snippet over HTTP, edits via UI', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/833' do + it 'clones, pushes, and pulls a project snippet over HTTP, edits via UI', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1725' do Resource::Repository::Push.fabricate! do |push| push.repository_http_uri = repository_uri_http push.file_name = new_file @@ -67,6 +67,8 @@ module QA expect(repository.commits.first).to include 'Update snippet' expect(repository.file_content(new_file)).to include "#{added_content}#{changed_content}" end + + snippet.remove_via_api! end it 'clones, pushes, and pulls a project snippet over SSH, deletes via UI', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/832' do diff --git a/qa/qa/specs/features/browser_ui/3_create/snippet/copy_snippet_file_contents_spec.rb b/qa/qa/specs/features/browser_ui/3_create/snippet/copy_snippet_file_contents_spec.rb index 1670ba56064..29ddbb22a01 100644 --- a/qa/qa/specs/features/browser_ui/3_create/snippet/copy_snippet_file_contents_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/snippet/copy_snippet_file_contents_spec.rb @@ -54,6 +54,11 @@ module QA Flow::Login.sign_in end + after do + personal_snippet&.remove_via_api! + project_snippet&.remove_via_api! + end + shared_examples 'copying snippet file contents' do |snippet_type| it "copies file contents of a multi-file #{snippet_type} to a comment and verifies them" do send(snippet_type).visit! diff --git a/qa/qa/specs/features/browser_ui/3_create/snippet/create_personal_snippet_spec.rb b/qa/qa/specs/features/browser_ui/3_create/snippet/create_personal_snippet_spec.rb index b74f27389a0..ddbc98c4a1a 100644 --- a/qa/qa/specs/features/browser_ui/3_create/snippet/create_personal_snippet_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/snippet/create_personal_snippet_spec.rb @@ -3,7 +3,7 @@ module QA RSpec.describe 'Create', :smoke do describe 'Personal snippet creation' do - it 'user creates a personal snippet', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/840' do + it 'user creates a personal snippet', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1704' do Flow::Login.sign_in Page::Main::Menu.perform do |menu| diff --git a/qa/qa/specs/features/browser_ui/3_create/snippet/delete_file_from_snippet_spec.rb b/qa/qa/specs/features/browser_ui/3_create/snippet/delete_file_from_snippet_spec.rb index 5c0983dabb6..014c0ca4d48 100644 --- a/qa/qa/specs/features/browser_ui/3_create/snippet/delete_file_from_snippet_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/snippet/delete_file_from_snippet_spec.rb @@ -2,7 +2,7 @@ module QA RSpec.describe 'Create' do - describe 'Multiple file snippet', quarantine: { only: { pipeline: :master }, issue: 'https://gitlab.com/gitlab-org/gitaly/-/issues/3143', type: :bug } do + describe 'Multiple file snippet' do let(:personal_snippet) do Resource::Snippet.fabricate_via_api! do |snippet| snippet.title = 'Personal snippet to delete file from' @@ -31,6 +31,11 @@ module QA Flow::Login.sign_in end + after do + personal_snippet&.remove_via_api! + project_snippet&.remove_via_api! + end + shared_examples 'deleting file from snippet' do |snippet_type| it "deletes second file from an existing #{snippet_type} to make it single-file" do send(snippet_type).visit! diff --git a/qa/qa/specs/features/browser_ui/3_create/snippet/share_snippet_spec.rb b/qa/qa/specs/features/browser_ui/3_create/snippet/share_snippet_spec.rb index 751424222ba..3973e0aacad 100644 --- a/qa/qa/specs/features/browser_ui/3_create/snippet/share_snippet_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/snippet/share_snippet_spec.rb @@ -16,6 +16,10 @@ module QA Flow::Login.sign_in end + after do + snippet&.remove_via_api! + end + context 'when the snippet is public' do it 'can be shared with not signed-in users', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1016' do snippet.visit! diff --git a/qa/qa/specs/features/browser_ui/5_package/container_registry_spec.rb b/qa/qa/specs/features/browser_ui/5_package/container_registry_spec.rb new file mode 100644 index 00000000000..5e663d87ae3 --- /dev/null +++ b/qa/qa/specs/features/browser_ui/5_package/container_registry_spec.rb @@ -0,0 +1,77 @@ +# frozen_string_literal: true + +module QA + RSpec.describe 'Package', :orchestrated do + describe 'Container Registry', only: { subdomain: :staging } do + let(:project) do + Resource::Project.fabricate_via_api! do |project| + project.name = 'project-with-registry' + project.template_name = 'express' + end + end + + let(:registry_repository) do + Resource::RegistryRepository.fabricate! do |repository| + repository.name = "#{project.path_with_namespace}" + repository.project = project + end + end + + let!(:gitlab_ci_yaml) do + <<~YAML + build: + image: docker:19.03.12 + stage: build + services: + - docker:19.03.12-dind + variables: + IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG + script: + - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY + - docker build -t $IMAGE_TAG . + - docker push $IMAGE_TAG + YAML + end + + after do + registry_repository&.remove_via_api! + end + + it 'pushes project image to the container registry and deletes tag', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1699' do + Flow::Login.sign_in + project.visit! + + Resource::Repository::Commit.fabricate_via_api! do |commit| + commit.project = project + commit.commit_message = 'Add .gitlab-ci.yml' + commit.add_files([{ + file_path: '.gitlab-ci.yml', + content: gitlab_ci_yaml + }]) + end + + Flow::Pipeline.visit_latest_pipeline + + Page::Project::Pipeline::Show.perform do |pipeline| + pipeline.click_job('build') + end + + Page::Project::Job::Show.perform do |job| + expect(job).to be_successful(timeout: 800) + end + + Page::Project::Menu.perform(&:go_to_container_registry) + + Page::Project::Registry::Show.perform do |registry| + expect(registry).to have_registry_repository(registry_repository.name) + + registry.click_on_image(registry_repository.name) + expect(registry).to have_tag('master') + + registry.click_delete + expect(registry).not_to have_tag('master') + end + end + end + end +end diff --git a/qa/qa/specs/features/browser_ui/5_package/maven_gradle_repository_spec.rb b/qa/qa/specs/features/browser_ui/5_package/maven_gradle_repository_spec.rb index 6ab4a957c57..b5b050a5dfe 100644 --- a/qa/qa/specs/features/browser_ui/5_package/maven_gradle_repository_spec.rb +++ b/qa/qa/specs/features/browser_ui/5_package/maven_gradle_repository_spec.rb @@ -13,7 +13,7 @@ module QA Flow::Login.sign_in end - Resource::PersonalAccessToken.fabricate!.access_token + Resource::PersonalAccessToken.fabricate!.token end let(:project) do diff --git a/qa/qa/specs/features/browser_ui/5_package/maven_repository_spec.rb b/qa/qa/specs/features/browser_ui/5_package/maven_repository_spec.rb index 605248e33f7..2f508d00790 100644 --- a/qa/qa/specs/features/browser_ui/5_package/maven_repository_spec.rb +++ b/qa/qa/specs/features/browser_ui/5_package/maven_repository_spec.rb @@ -1,19 +1,21 @@ # frozen_string_literal: true +require 'securerandom' + module QA RSpec.describe 'Package', :orchestrated, :packages do describe 'Maven Repository' do include Runtime::Fixtures let(:group_id) { 'com.gitlab.qa' } - let(:artifact_id) { 'maven' } + let(:artifact_id) { "maven-#{SecureRandom.hex(8)}" } let(:package_name) { "#{group_id}/#{artifact_id}".tr('.', '/') } let(:auth_token) do unless Page::Main::Menu.perform(&:signed_in?) Flow::Login.sign_in end - Resource::PersonalAccessToken.fabricate!.access_token + Resource::PersonalAccessToken.fabricate!.token end let(:project) do @@ -22,12 +24,19 @@ module QA end end + let(:another_project) do + Resource::Project.fabricate_via_api! do |another_project| + another_project.name = 'another-maven-package-project' + another_project.group = project.group + end + end + let!(:runner) do Resource::Runner.fabricate! do |runner| runner.name = "qa-runner-#{Time.now.to_i}" - runner.tags = ["runner-for-#{project.name}"] + runner.tags = ["runner-for-#{project.group.name}"] runner.executor = :docker - runner.project = project + runner.token = project.group.sandbox.runners_token end end @@ -90,6 +99,28 @@ module QA } end + let(:gitlab_ci_yaml) do + { + file_path: '.gitlab-ci.yml', + content: + <<~YAML + deploy: + image: maven:3.6-jdk-11 + script: + - 'mvn deploy -s settings.xml' + - "mvn dependency:get -Dartifact=#{group_id}:#{artifact_id}:1.0" + only: + - "#{project.default_branch}" + tags: + - "runner-for-#{project.group.name}" + YAML + } + end + + after do + runner.remove_via_api! + end + it 'publishes a maven package and deletes it', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/943' do # Use a maven docker container to deploy the package with_fixtures([pom_xml, settings_xml]) do |dir| @@ -122,23 +153,9 @@ module QA commit.project = project commit.commit_message = 'Add .gitlab-ci.yml' commit.add_files([ - { - file_path: '.gitlab-ci.yml', - content: - <<~YAML - deploy: - image: maven:3.6-jdk-11 - script: - - 'mvn deploy -s settings.xml' - - "mvn dependency:get -Dartifact=#{group_id}:#{artifact_id}:1.0" - only: - - "#{project.default_branch}" - tags: - - "runner-for-#{project.name}" - YAML - }, - settings_xml, - pom_xml + gitlab_ci_yaml, + settings_xml, + pom_xml ]) end @@ -153,6 +170,96 @@ module QA expect(job).to be_successful(timeout: 800) end end + + context 'when "allow duplicate" setting is disabled' do + before do + Flow::Login.sign_in + + project.group.visit! + + Page::Group::Menu.perform(&:go_to_package_settings) + Page::Group::Settings::PackageRegistries.perform(&:set_allow_duplicates_disabled) + end + + it 'prevents users from publishing duplicate Maven packages at the group level', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1717' do + with_fixtures([pom_xml, settings_xml]) do |dir| + Service::DockerRun::Maven.new(dir).publish! + end + + project.visit! + Page::Project::Menu.perform(&:click_packages_link) + + Page::Project::Packages::Index.perform do |index| + expect(index).to have_package(package_name) + end + + Resource::Repository::Commit.fabricate_via_api! do |commit| + commit.project = another_project + commit.commit_message = 'Add .gitlab-ci.yml' + commit.add_files([ + gitlab_ci_yaml, + settings_xml, + pom_xml + ]) + end + + another_project.visit! + Flow::Pipeline.visit_latest_pipeline + + Page::Project::Pipeline::Show.perform do |pipeline| + pipeline.click_job('deploy') + end + + Page::Project::Job::Show.perform do |job| + expect(job).not_to be_successful(timeout: 800) + end + end + end + + context 'when "allow duplicate" setting is enabled' do + before do + Flow::Login.sign_in + + project.group.visit! + + Page::Group::Menu.perform(&:go_to_package_settings) + Page::Group::Settings::PackageRegistries.perform(&:set_allow_duplicates_enabled) + end + + it 'allows users to publish duplicate Maven packages at the group level', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1722' do + with_fixtures([pom_xml, settings_xml]) do |dir| + Service::DockerRun::Maven.new(dir).publish! + end + + project.visit! + Page::Project::Menu.perform(&:click_packages_link) + + Page::Project::Packages::Index.perform do |index| + expect(index).to have_package(package_name) + end + + Resource::Repository::Commit.fabricate_via_api! do |commit| + commit.project = another_project + commit.commit_message = 'Add .gitlab-ci.yml' + commit.add_files([ + gitlab_ci_yaml, + settings_xml, + pom_xml + ]) + end + + another_project.visit! + Flow::Pipeline.visit_latest_pipeline + + Page::Project::Pipeline::Show.perform do |pipeline| + pipeline.click_job('deploy') + end + + Page::Project::Job::Show.perform do |job| + expect(job).to be_successful(timeout: 800) + end + end + end end end end diff --git a/qa/qa/specs/features/browser_ui/5_package/npm_registry_spec.rb b/qa/qa/specs/features/browser_ui/5_package/npm_registry_spec.rb index fa88ace1556..97df8fedf87 100644 --- a/qa/qa/specs/features/browser_ui/5_package/npm_registry_spec.rb +++ b/qa/qa/specs/features/browser_ui/5_package/npm_registry_spec.rb @@ -2,7 +2,7 @@ module QA RSpec.describe 'Package', :orchestrated, :packages do - describe 'NPM registry' do + describe 'npm registry' do include Runtime::Fixtures let(:registry_scope) { project.group.sandbox.path } @@ -12,7 +12,7 @@ module QA Flow::Login.sign_in end - Resource::PersonalAccessToken.fabricate!.access_token + Resource::PersonalAccessToken.fabricate!.token end let(:project) do @@ -31,7 +31,7 @@ module QA { "name": "#{package_name}", "version": "1.0.0", - "description": "Example package for GitLab NPM registry", + "description": "Example package for GitLab npm registry", "publishConfig": { "@#{registry_scope}:registry": "#{gitlab_address_with_port}/api/v4/projects/#{project.id}/packages/npm/" } diff --git a/qa/qa/specs/features/browser_ui/5_package/nuget_repository_spec.rb b/qa/qa/specs/features/browser_ui/5_package/nuget_repository_spec.rb index 8c3f0930207..f143bc52095 100644 --- a/qa/qa/specs/features/browser_ui/5_package/nuget_repository_spec.rb +++ b/qa/qa/specs/features/browser_ui/5_package/nuget_repository_spec.rb @@ -1,11 +1,13 @@ # frozen_string_literal: true +require 'securerandom' + module QA RSpec.describe 'Package', :orchestrated, :packages do describe 'NuGet Repository' do include Runtime::Fixtures - let(:package_name) { 'dotnetcore' } + let(:package_name) { "dotnetcore-#{SecureRandom.hex(8)}" } let(:project) do Resource::Project.fabricate_via_api! do |project| project.name = 'nuget-package-project' @@ -54,7 +56,7 @@ module QA { file_path: '.gitlab-ci.yml', content: <<~YAML - image: mcr.microsoft.com/dotnet/core/sdk:3.1 + image: mcr.microsoft.com/dotnet/sdk:5.0 stages: - deploy @@ -64,7 +66,7 @@ module QA script: - dotnet restore -p:Configuration=Release - dotnet build -c Release - - dotnet pack -c Release + - dotnet pack -c Release -p:PackageID=#{package_name} - dotnet nuget add source "$CI_SERVER_URL/api/v4/projects/$CI_PROJECT_ID/packages/nuget/index.json" --name gitlab --username gitlab-ci-token --password $CI_JOB_TOKEN --store-password-in-clear-text - dotnet nuget push "bin/Release/*.nupkg" --source gitlab only: @@ -102,7 +104,7 @@ module QA <PropertyGroup> <OutputType>Exe</OutputType> - <TargetFramework>netcoreapp3.1</TargetFramework> + <TargetFramework>net5.0</TargetFramework> </PropertyGroup> </Project> @@ -115,7 +117,7 @@ module QA { file_path: '.gitlab-ci.yml', content: <<~YAML - image: mcr.microsoft.com/dotnet/core/sdk:3.1 + image: mcr.microsoft.com/dotnet/sdk:5.0 stages: - install diff --git a/qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb b/qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb index 171a4776eaf..e2cf5c5b195 100644 --- a/qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb +++ b/qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb @@ -23,9 +23,7 @@ module QA cluster&.remove! end - it 'runs auto devops', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/702' do - skip('Test requires tunnel: see https://gitlab.com/gitlab-org/gitlab/-/issues/251090') - + it 'runs auto devops', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1715' do Flow::Login.sign_in # Set an application secret CI variable (prefixed with K8S_SECRET_) diff --git a/qa/qa/specs/features/browser_ui/non_devops/performance_bar_spec.rb b/qa/qa/specs/features/browser_ui/non_devops/performance_bar_spec.rb index 8dca0d6698e..302fec55c53 100644 --- a/qa/qa/specs/features/browser_ui/non_devops/performance_bar_spec.rb +++ b/qa/qa/specs/features/browser_ui/non_devops/performance_bar_spec.rb @@ -20,7 +20,7 @@ module QA end end - it 'shows results for the original request and AJAX requests', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/478', quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/247467', type: :investigating } do + it 'shows results for the original request and AJAX requests', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/478', quarantine: { only: { pipeline: :master }, issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/323051', type: :bug } do # Issue pages always make AJAX requests Resource::Issue.fabricate_via_browser_ui! do |issue| issue.title = 'Performance bar test' |