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:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-03-14 09:13:49 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-03-14 09:13:49 +0300
commit3612694ce3931fe7fd225d9c2df42dbd513121df (patch)
treed851570d1373876fe3bbe0752c2b3d6919c6c837
parent32380631045bf0c30c6ae6952a4a62e3e5436b82 (diff)
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--.gitlab/ci/global.gitlab-ci.yml2
-rw-r--r--.gitlab/ci/review-apps/main.gitlab-ci.yml4
-rw-r--r--GITALY_SERVER_VERSION2
-rw-r--r--app/controllers/omniauth_callbacks_controller.rb5
-rw-r--r--app/views/admin/abuse_reports/_abuse_report.html.haml6
-rw-r--r--app/views/groups/_import_group_from_another_instance_panel.html.haml4
-rw-r--r--app/views/groups/_import_group_from_file_panel.html.haml4
-rw-r--r--app/views/groups/settings/_export.html.haml4
-rw-r--r--config/feature_flags/development/fe_epic_board_total_weight.yml2
-rw-r--r--doc/user/application_security/container_scanning/index.md25
-rw-r--r--doc/user/group/epics/epic_boards.md16
-rw-r--r--doc/user/group/epics/img/epic_board_epic_create_v14_1.pngbin14584 -> 0 bytes
-rw-r--r--doc/user/group/epics/img/epic_board_epic_create_v15_10.pngbin0 -> 11786 bytes
-rw-r--r--doc/user/group/epics/img/epic_board_v14_1.pngbin28691 -> 0 bytes
-rw-r--r--doc/user/group/epics/img/epic_board_v15_10.pngbin0 -> 78145 bytes
-rw-r--r--lib/gitlab/database/migration_helpers/convert_to_bigint.rb19
-rw-r--r--locale/gitlab.pot4
-rw-r--r--spec/controllers/omniauth_callbacks_controller_spec.rb25
-rw-r--r--spec/features/groups/import_export/connect_instance_spec.rb2
-rw-r--r--spec/lib/gitlab/database/migration_helpers/convert_to_bigint_spec.rb35
-rw-r--r--spec/support/helpers/login_helpers.rb9
21 files changed, 137 insertions, 31 deletions
diff --git a/.gitlab/ci/global.gitlab-ci.yml b/.gitlab/ci/global.gitlab-ci.yml
index 5c7e78b0b67..14fa0fc3671 100644
--- a/.gitlab/ci/global.gitlab-ci.yml
+++ b/.gitlab/ci/global.gitlab-ci.yml
@@ -283,7 +283,7 @@
- name: postgres:12
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
- name: redis:6.0-alpine
- - name: elasticsearch:8.5.3
+ - name: elasticsearch:8.6.2
- name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.0
alias: zoekt-ci-image
variables:
diff --git a/.gitlab/ci/review-apps/main.gitlab-ci.yml b/.gitlab/ci/review-apps/main.gitlab-ci.yml
index 7147b31150c..6bd7542bcde 100644
--- a/.gitlab/ci/review-apps/main.gitlab-ci.yml
+++ b/.gitlab/ci/review-apps/main.gitlab-ci.yml
@@ -89,9 +89,9 @@ review-build-cng:
strategy: depend
.review-workflow-base:
- extends:
- - .default-retry
image: ${REVIEW_APPS_IMAGE}
+ retry:
+ max: 2 # This is confusing but this means "3 runs at max"
variables:
HOST_SUFFIX: "${CI_ENVIRONMENT_SLUG}"
DOMAIN: "-${CI_ENVIRONMENT_SLUG}.${REVIEW_APPS_DOMAIN}"
diff --git a/GITALY_SERVER_VERSION b/GITALY_SERVER_VERSION
index 7195c6dbe56..31745a9299f 100644
--- a/GITALY_SERVER_VERSION
+++ b/GITALY_SERVER_VERSION
@@ -1 +1 @@
-e41cf4607486623e97e584533158cd4071beff31
+906fdaa2fd6f4dc4baec1b36b9341f4157e2042a
diff --git a/app/controllers/omniauth_callbacks_controller.rb b/app/controllers/omniauth_callbacks_controller.rb
index e450151fd82..daed4023d02 100644
--- a/app/controllers/omniauth_callbacks_controller.rb
+++ b/app/controllers/omniauth_callbacks_controller.rb
@@ -22,6 +22,11 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
alias_method provider, :handle_omniauth
end
+ # overridden in EE
+ def openid_connect
+ handle_omniauth
+ end
+
# Extend the standard implementation to also increment
# the number of failed sign in attempts
def failure
diff --git a/app/views/admin/abuse_reports/_abuse_report.html.haml b/app/views/admin/abuse_reports/_abuse_report.html.haml
index eeedd58ec15..1a0f4132d49 100644
--- a/app/views/admin/abuse_reports/_abuse_report.html.haml
+++ b/app/views/admin/abuse_reports/_abuse_report.html.haml
@@ -24,13 +24,13 @@
= markdown_field(abuse_report, :message)
%td
- if user
- = render Pajamas::ButtonComponent.new(href: admin_abuse_report_path(abuse_report, remove_user: true), variant: :danger, block: true, button_options: { data: { confirm: _("USER %{user} WILL BE REMOVED! Are you sure?") % { user: user.name }, confirm_btn_variant: "danger", remote: true, method: :delete }, class: "js-remove-tr gl-mb-5" }) do
+ = render Pajamas::ButtonComponent.new(href: admin_abuse_report_path(abuse_report, remove_user: true), variant: :danger, block: true, button_options: { data: { confirm: _("USER %{user} WILL BE REMOVED! Are you sure?") % { user: user.name }, confirm_btn_variant: "danger", remote: true, method: :delete }, class: "js-remove-tr" }) do
= _('Remove user & report')
- if user && !user.blocked?
- = render Pajamas::ButtonComponent.new(href: block_admin_user_path(user), block: true, button_options: { data: { confirm: _('USER WILL BE BLOCKED! Are you sure?'), method: :put }, class: "gl-mb-5" }) do
+ = render Pajamas::ButtonComponent.new(href: block_admin_user_path(user), block: true, button_options: { data: { confirm: _('USER WILL BE BLOCKED! Are you sure?'), method: :put } }) do
= _('Block user')
- else
- = render Pajamas::ButtonComponent.new(href: block_admin_user_path(user), block: true, disabled: true, button_options: { data: { confirm: _('USER WILL BE BLOCKED! Are you sure?'), method: :put }, class: "gl-mb-5" }) do
+ = render Pajamas::ButtonComponent.new(href: block_admin_user_path(user), block: true, disabled: true, button_options: { data: { confirm: _('USER WILL BE BLOCKED! Are you sure?'), method: :put } }) do
= _('Already blocked')
= render Pajamas::ButtonComponent.new(href: [:admin, abuse_report], block: true, button_options: { data: { remote: true, method: :delete }, class: "js-remove-tr" }) do
= _('Remove report')
diff --git a/app/views/groups/_import_group_from_another_instance_panel.html.haml b/app/views/groups/_import_group_from_another_instance_panel.html.haml
index 24ba060a89a..4a34e124c4c 100644
--- a/app/views/groups/_import_group_from_another_instance_panel.html.haml
+++ b/app/views/groups/_import_group_from_another_instance_panel.html.haml
@@ -25,9 +25,9 @@
= render Pajamas::AlertComponent.new(dismissible: false,
variant: :warning) do |c|
= c.body do
- - docs_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/group/import/index.md') }
+ - docs_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/group/import/index.md', anchor: 'migrated-group-items') }
- docs_link_end = '</a>'.html_safe
- = s_('GroupsNew|Not all related objects are migrated. %{docs_link_start}More info%{docs_link_end}.').html_safe % { docs_link_start: docs_link_start, docs_link_end: docs_link_end }
+ = s_('GroupsNew|Not all group items are migrated. %{docs_link_start}What items are migrated%{docs_link_end}?').html_safe % { docs_link_start: docs_link_start, docs_link_end: docs_link_end }
%p.gl-mt-3
= s_('GroupsNew|Provide credentials for the source instance to import from. You can provide this instance as a source to move groups in this instance.')
diff --git a/app/views/groups/_import_group_from_file_panel.html.haml b/app/views/groups/_import_group_from_file_panel.html.haml
index 35e8b7dc977..94ad9dc6da9 100644
--- a/app/views/groups/_import_group_from_file_panel.html.haml
+++ b/app/views/groups/_import_group_from_file_panel.html.haml
@@ -10,9 +10,9 @@
alert_options: { class: 'gl-mb-5' },
dismissible: false) do |c|
= c.body do
- - docs_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/group/import/index.md') }
+ - docs_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/group/import/index.md', anchor: 'migrate-groups-by-direct-transfer-recommended') }
- link_end = '</a>'.html_safe
- = s_('GroupsNew|This feature is deprecated and replaced by %{docs_link_start}group migration%{docs_link_end}.').html_safe % { docs_link_start: docs_link_start, docs_link_end: link_end }
+ = s_('GroupsNew|This feature is deprecated and replaced by group migration by direct transfer. %{docs_link_start}Learn more%{docs_link_end}.').html_safe % { docs_link_start: docs_link_start, docs_link_end: link_end }
= render 'shared/groups/group_name_and_path_fields', f: f
.form-group
= f.label :file, s_('GroupsNew|Upload file')
diff --git a/app/views/groups/settings/_export.html.haml b/app/views/groups/settings/_export.html.haml
index 5d79d0f8e79..b60eb134a9c 100644
--- a/app/views/groups/settings/_export.html.haml
+++ b/app/views/groups/settings/_export.html.haml
@@ -5,9 +5,9 @@
%p= _('Export this group with all related data.')
= render Pajamas::AlertComponent.new(variant: :warning, dismissible: false, alert_options: { class: 'gl-mb-4' }) do |c|
= c.body do
- - docs_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/group/import/index.md') }
+ - docs_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/group/import/index.md', anchor: 'migrate-groups-by-direct-transfer-recommended') }
- docs_link_end = '</a>'.html_safe
- = s_('GroupsNew|This feature is deprecated and replaced by %{docs_link_start}group migration%{docs_link_end}.').html_safe % { docs_link_start: docs_link_start, docs_link_end: docs_link_end }
+ = s_('GroupsNew|This feature is deprecated and replaced by group migration by direct transfer. %{docs_link_start}Learn more%{docs_link_end}.').html_safe % { docs_link_start: docs_link_start, docs_link_end: docs_link_end }
%p
- export_information = _('After the export is complete, download the data file from a notification email or from this page. You can then import the data file from the %{strong_text_start}Create new group%{strong_text_end} page of another GitLab instance.') % { strong_text_start: '<strong>'.html_safe, strong_text_end: '</strong>'.html_safe}
= export_information.html_safe
diff --git a/config/feature_flags/development/fe_epic_board_total_weight.yml b/config/feature_flags/development/fe_epic_board_total_weight.yml
index 5550d7fa01d..4fbb7c2daf4 100644
--- a/config/feature_flags/development/fe_epic_board_total_weight.yml
+++ b/config/feature_flags/development/fe_epic_board_total_weight.yml
@@ -5,4 +5,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/364503
milestone: '15.1'
type: development
group: group::product planning
-default_enabled: false
+default_enabled: true
diff --git a/doc/user/application_security/container_scanning/index.md b/doc/user/application_security/container_scanning/index.md
index 4e2a36e11f5..a38f7bcb77c 100644
--- a/doc/user/application_security/container_scanning/index.md
+++ b/doc/user/application_security/container_scanning/index.md
@@ -15,6 +15,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
> - [Changed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/86092) the major analyzer version from `4` to `5` in GitLab 15.0.
> - [Moved](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/86783) from GitLab Ultimate to GitLab Free in 15.0.
> - Container Scanning variables that reference Docker [renamed](https://gitlab.com/gitlab-org/gitlab/-/issues/357264) in GitLab 15.4.
+> - Container Scanning template [moved](https://gitlab.com/gitlab-org/gitlab/-/issues/381665) from `Security/Container-Scanning.gitlab-ci.yml` to `Jobs/Container-Scanning.gitlab-ci.yml` in GitLab 15.6.
Your application's Docker image may itself be based on Docker images that contain known
vulnerabilities. By including an extra Container Scanning job in your pipeline that scans for those
@@ -90,12 +91,12 @@ To enable container scanning in your pipeline, you need the following:
## Configuration
To enable container scanning, add the
-[`Container-Scanning.gitlab-ci.yml` template](https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Jobs/Container-Scanning.gitlab-ci.yml)
+[`Container-Scanning.gitlab-ci.yml` template](https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Security/Container-Scanning.gitlab-ci.yml)
to your `.gitlab-ci.yml` file:
```yaml
include:
- - template: Jobs/Container-Scanning.gitlab-ci.yml
+ - template: Security/Container-Scanning.gitlab-ci.yml
```
The included template:
@@ -117,7 +118,7 @@ registry, and scans the image:
```yaml
include:
- template: Jobs/Build.gitlab-ci.yml
- - template: Jobs/Container-Scanning.gitlab-ci.yml
+ - template: Security/Container-Scanning.gitlab-ci.yml
container_scanning:
variables:
@@ -142,7 +143,7 @@ enables verbose output for the analyzer:
```yaml
include:
- - template: Jobs/Container-Scanning.gitlab-ci.yml
+ - template: Security/Container-Scanning.gitlab-ci.yml
variables:
SECURE_LOG_LEVEL: 'debug'
@@ -154,7 +155,7 @@ To scan images located in a registry other than the project's, use the following
```yaml
include:
- - template: Jobs/Container-Scanning.gitlab-ci.yml
+ - template: Security/Container-Scanning.gitlab-ci.yml
container_scanning:
variables:
@@ -178,7 +179,7 @@ container_scanning:
- export AWS_ECR_PASSWORD=$(aws ecr get-login-password --region region)
include:
- - template: Jobs/Container-Scanning.gitlab-ci.yml
+ - template: Security/Container-Scanning.gitlab-ci.yml
variables:
CS_IMAGE: <aws_account_id>.dkr.ecr.<region>.amazonaws.com/<image>:<tag>
@@ -201,7 +202,7 @@ For example:
```yaml
include:
- - template: Jobs/Container-Scanning.gitlab-ci.yml
+ - template: Security/Container-Scanning.gitlab-ci.yml
container_scanning:
variables:
@@ -225,7 +226,7 @@ By default, the report only includes packages managed by the Operating System (O
```yaml
include:
- - template: Jobs/Container-Scanning.gitlab-ci.yml
+ - template: Security/Container-Scanning.gitlab-ci.yml
container_scanning:
variables:
@@ -348,7 +349,7 @@ This example sets `GIT_STRATEGY` to `fetch`:
```yaml
include:
- - template: Jobs/Container-Scanning.gitlab-ci.yml
+ - template: Security/Container-Scanning.gitlab-ci.yml
container_scanning:
variables:
@@ -394,7 +395,7 @@ duplicated:
```yaml
include:
- - template: Jobs/Container-Scanning.gitlab-ci.yml
+ - template: Security/Container-Scanning.gitlab-ci.yml
container_scanning:
variables:
@@ -580,7 +581,7 @@ For details on saving and transporting Docker images as a file, see the Docker d
```yaml
include:
- - template: Jobs/Container-Scanning.gitlab-ci.yml
+ - template: Security/Container-Scanning.gitlab-ci.yml
container_scanning:
image: $CI_REGISTRY/namespace/container-scanning
@@ -631,7 +632,7 @@ This example shows the configuration needed to scan images in a private [Google
```yaml
include:
- - template: Jobs/Container-Scanning.gitlab-ci.yml
+ - template: Security/Container-Scanning.gitlab-ci.yml
container_scanning:
variables:
diff --git a/doc/user/group/epics/epic_boards.md b/doc/user/group/epics/epic_boards.md
index e712eb8fbe9..6ec56d0d510 100644
--- a/doc/user/group/epics/epic_boards.md
+++ b/doc/user/group/epics/epic_boards.md
@@ -18,7 +18,7 @@ To view an epic board:
1. On the top bar, select **Main menu > Groups** and find your group.
1. On the left sidebar, select **Epics > Boards**.
-![GitLab epic board - Premium](img/epic_board_v14_1.png)
+![GitLab epic board - Premium](img/epic_board_v15_10.png)
## Create an epic board
@@ -115,7 +115,7 @@ To create an epic from a list in epic board:
1. Enter the new epic's title.
1. Select **Create epic**.
-![Create a GitLab epic from an epic board](img/epic_board_epic_create_v14_1.png)
+![Create a GitLab epic from an epic board](img/epic_board_epic_create_v15_10.png)
### Filter epics
@@ -216,3 +216,15 @@ To edit the scope of an epic board:
- Show or hide the Open and Closed columns.
- Select other labels as the board's scope.
1. Select **Save changes**.
+
+#### Display total weight on board lists
+
+> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/364503) in GitLab 15.1 [with a flag](../../../administration/feature_flags.md) named `fe_epic_board_total_weight`. Disabled by default.
+> - [Enabled on GitLab.com](https://gitlab.com/gitlab-org/gitlab/-/issues/364503) in GitLab 15.9.
+> - [Enabled on self-managed](https://gitlab.com/gitlab-org/gitlab/-/issues/364503) in GitLab 15.10.
+
+FLAG:
+On self-managed GitLab, by default this feature is available. To hide the feature, ask an administrator to [disable the feature flag](../../../administration/feature_flags.md) named `fe_epic_board_total_weight`.
+On GitLab.com, this feature is available.
+
+When enabled, this feature displays total weight of all epics at the top of each list.
diff --git a/doc/user/group/epics/img/epic_board_epic_create_v14_1.png b/doc/user/group/epics/img/epic_board_epic_create_v14_1.png
deleted file mode 100644
index 04017014885..00000000000
--- a/doc/user/group/epics/img/epic_board_epic_create_v14_1.png
+++ /dev/null
Binary files differ
diff --git a/doc/user/group/epics/img/epic_board_epic_create_v15_10.png b/doc/user/group/epics/img/epic_board_epic_create_v15_10.png
new file mode 100644
index 00000000000..71d1fc0a9fc
--- /dev/null
+++ b/doc/user/group/epics/img/epic_board_epic_create_v15_10.png
Binary files differ
diff --git a/doc/user/group/epics/img/epic_board_v14_1.png b/doc/user/group/epics/img/epic_board_v14_1.png
deleted file mode 100644
index ccf1ef9559e..00000000000
--- a/doc/user/group/epics/img/epic_board_v14_1.png
+++ /dev/null
Binary files differ
diff --git a/doc/user/group/epics/img/epic_board_v15_10.png b/doc/user/group/epics/img/epic_board_v15_10.png
new file mode 100644
index 00000000000..d836abdbb59
--- /dev/null
+++ b/doc/user/group/epics/img/epic_board_v15_10.png
Binary files differ
diff --git a/lib/gitlab/database/migration_helpers/convert_to_bigint.rb b/lib/gitlab/database/migration_helpers/convert_to_bigint.rb
new file mode 100644
index 00000000000..cf5640deb3d
--- /dev/null
+++ b/lib/gitlab/database/migration_helpers/convert_to_bigint.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+module Gitlab
+ module Database
+ module MigrationHelpers
+ module ConvertToBigint
+ # This helper is extracted for the purpose of
+ # https://gitlab.com/gitlab-org/gitlab/-/issues/392815
+ # so that we can test all combinations just once,
+ # and simplify migration tests.
+ #
+ # Once we are done with the PK conversions we can remove this.
+ def com_or_dev_or_test_but_not_jh?
+ !Gitlab.jh? && (Gitlab.com? || Gitlab.dev_or_test_env?)
+ end
+ end
+ end
+ end
+end
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 0a1b5e94ba3..e4c87db88e0 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -20693,7 +20693,7 @@ msgstr ""
msgid "GroupsNew|No import options available"
msgstr ""
-msgid "GroupsNew|Not all related objects are migrated. %{docs_link_start}More info%{docs_link_end}."
+msgid "GroupsNew|Not all group items are migrated. %{docs_link_start}What items are migrated%{docs_link_end}?"
msgstr ""
msgid "GroupsNew|Personal access token"
@@ -20714,7 +20714,7 @@ msgstr ""
msgid "GroupsNew|Remember to enable it also on the instance you are migrating from."
msgstr ""
-msgid "GroupsNew|This feature is deprecated and replaced by %{docs_link_start}group migration%{docs_link_end}."
+msgid "GroupsNew|This feature is deprecated and replaced by group migration by direct transfer. %{docs_link_start}Learn more%{docs_link_end}."
msgstr ""
msgid "GroupsNew|To import a group, navigate to the group settings for the GitLab source instance, %{link_start}generate an export file%{link_end}, and upload it here."
diff --git a/spec/controllers/omniauth_callbacks_controller_spec.rb b/spec/controllers/omniauth_callbacks_controller_spec.rb
index 70876f137c3..ebfa48870a9 100644
--- a/spec/controllers/omniauth_callbacks_controller_spec.rb
+++ b/spec/controllers/omniauth_callbacks_controller_spec.rb
@@ -430,6 +430,31 @@ RSpec.describe OmniauthCallbacksController, type: :controller, feature_category:
end
end
+ describe '#openid_connect' do
+ let(:user) { create(:omniauth_user, extern_uid: extern_uid, provider: provider) }
+ let(:extern_uid) { 'my-uid' }
+ let(:provider) { 'openid_connect' }
+
+ before do
+ prepare_provider_route('openid_connect')
+
+ mock_auth_hash(provider, extern_uid, user.email, additional_info: {})
+
+ request.env['devise.mapping'] = Devise.mappings[:user]
+ request.env['omniauth.auth'] = Rails.application.env_config['omniauth.auth']
+ end
+
+ it_behaves_like 'known sign in' do
+ let(:post_action) { post provider }
+ end
+
+ it 'allows sign in' do
+ post provider
+
+ expect(request.env['warden']).to be_authenticated
+ end
+ end
+
describe '#saml' do
let(:last_request_id) { 'ONELOGIN_4fee3b046395c4e751011e97f8900b5273d56685' }
let(:user) { create(:omniauth_user, :two_factor, extern_uid: 'my-uid', provider: 'saml') }
diff --git a/spec/features/groups/import_export/connect_instance_spec.rb b/spec/features/groups/import_export/connect_instance_spec.rb
index 8aea18a268b..f6548c035f0 100644
--- a/spec/features/groups/import_export/connect_instance_spec.rb
+++ b/spec/features/groups/import_export/connect_instance_spec.rb
@@ -26,7 +26,7 @@ RSpec.describe 'Import/Export - Connect to another instance', :js, feature_categ
pat = 'demo-pat'
expect(page).to have_content 'Import groups by direct transfer'
- expect(page).to have_content 'Not all related objects are migrated'
+ expect(page).to have_content 'Not all group items are migrated'
fill_in :bulk_import_gitlab_url, with: source_url
fill_in :bulk_import_gitlab_access_token, with: pat
diff --git a/spec/lib/gitlab/database/migration_helpers/convert_to_bigint_spec.rb b/spec/lib/gitlab/database/migration_helpers/convert_to_bigint_spec.rb
new file mode 100644
index 00000000000..b1971977e7c
--- /dev/null
+++ b/spec/lib/gitlab/database/migration_helpers/convert_to_bigint_spec.rb
@@ -0,0 +1,35 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+RSpec.describe Gitlab::Database::MigrationHelpers::ConvertToBigint, feature_category: :database do
+ describe 'com_or_dev_or_test_but_not_jh?' do
+ using RSpec::Parameterized::TableSyntax
+
+ where(:dot_com, :dev_or_test, :jh, :expectation) do
+ true | true | true | false
+ true | false | true | false
+ false | true | true | false
+ false | false | true | false
+ true | true | false | true
+ true | false | false | true
+ false | true | false | true
+ false | false | false | false
+ end
+
+ with_them do
+ it 'returns true for GitLab.com (but not JH), dev, or test' do
+ allow(Gitlab).to receive(:com?).and_return(dot_com)
+ allow(Gitlab).to receive(:dev_or_test_env?).and_return(dev_or_test)
+ allow(Gitlab).to receive(:jh?).and_return(jh)
+
+ migration = Class
+ .new
+ .include(Gitlab::Database::MigrationHelpers::ConvertToBigint)
+ .new
+
+ expect(migration.com_or_dev_or_test_but_not_jh?).to eq(expectation)
+ end
+ end
+ end
+end
diff --git a/spec/support/helpers/login_helpers.rb b/spec/support/helpers/login_helpers.rb
index 95ad38fbb5b..e93d04a0b80 100644
--- a/spec/support/helpers/login_helpers.rb
+++ b/spec/support/helpers/login_helpers.rb
@@ -213,6 +213,15 @@ module LoginHelpers
config
end
+ def prepare_provider_route(provider_name)
+ routes = Rails.application.routes
+ routes.disable_clear_and_finalize = true
+ routes.formatter.clear
+ routes.draw do
+ post "/users/auth/#{provider_name}" => "omniauth_callbacks##{provider_name}"
+ end
+ end
+
def stub_omniauth_provider(provider, context: Rails.application)
env = env_from_context(context)