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
path: root/spec
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-03-02 15:14:26 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-03-02 15:14:26 +0300
commitce459835cb32ed396fb7524fb615a5d07f8c51ef (patch)
treebc56e024828f25d53f8b713b4d8f6393b8755112 /spec
parent374f3dee7dc0fae10a34daf503b8bf3078008f4b (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec')
-rw-r--r--spec/features/projects/jobs_spec.rb2
-rw-r--r--spec/frontend/invite_members/components/invite_members_modal_spec.js1
-rw-r--r--spec/lib/gitlab/regex_spec.rb2
-rw-r--r--spec/migrations/20221102231130_finalize_backfill_user_details_fields_spec.rb16
-rw-r--r--spec/requests/jwt_controller_spec.rb8
-rw-r--r--spec/services/ci/job_artifacts/destroy_all_expired_service_spec.rb28
6 files changed, 32 insertions, 25 deletions
diff --git a/spec/features/projects/jobs_spec.rb b/spec/features/projects/jobs_spec.rb
index a57476f8b88..07b8f8339eb 100644
--- a/spec/features/projects/jobs_spec.rb
+++ b/spec/features/projects/jobs_spec.rb
@@ -1071,7 +1071,7 @@ RSpec.describe 'Jobs', :clean_gitlab_redis_shared_state, feature_category: :proj
create(:ci_job_artifact, :archive, file: artifacts_file, job: job2)
end
- it do
+ it 'receive 404 from download request', quarantine: 'https://gitlab.com/gitlab-org/gitlab/-/issues/391632' do
requests = inspect_requests { visit other_job_download_path }
request = requests.find { |request| request.url == other_job_download_path }
diff --git a/spec/frontend/invite_members/components/invite_members_modal_spec.js b/spec/frontend/invite_members/components/invite_members_modal_spec.js
index 41ffe9b92c9..c1677f8366c 100644
--- a/spec/frontend/invite_members/components/invite_members_modal_spec.js
+++ b/spec/frontend/invite_members/components/invite_members_modal_spec.js
@@ -73,6 +73,7 @@ describe('InviteMembersModal', () => {
wrapper = shallowMountExtended(InviteMembersModal, {
provide: {
newProjectPath,
+ name: propsData.name,
},
propsData: {
usersLimitDataset: {},
diff --git a/spec/lib/gitlab/regex_spec.rb b/spec/lib/gitlab/regex_spec.rb
index caca33704dd..19a6735e439 100644
--- a/spec/lib/gitlab/regex_spec.rb
+++ b/spec/lib/gitlab/regex_spec.rb
@@ -110,6 +110,8 @@ RSpec.describe Gitlab::Regex, feature_category: :tooling do
it { is_expected.to match('.source/.full/.path') }
it { is_expected.to match('domain_namespace') }
it { is_expected.to match('gitlab-migration-test') }
+ it { is_expected.to match('1-project-path') }
+ it { is_expected.to match('e-project-path') }
it { is_expected.to match('') } # it is possible to pass an empty string for destination_namespace in bulk_import POST request
end
diff --git a/spec/migrations/20221102231130_finalize_backfill_user_details_fields_spec.rb b/spec/migrations/20221102231130_finalize_backfill_user_details_fields_spec.rb
index 7ad9f4ed156..37bff128edd 100644
--- a/spec/migrations/20221102231130_finalize_backfill_user_details_fields_spec.rb
+++ b/spec/migrations/20221102231130_finalize_backfill_user_details_fields_spec.rb
@@ -58,6 +58,22 @@ RSpec.describe FinalizeBackfillUserDetailsFields, :migration, feature_category:
end
end
+ context 'when users.linkedin column has already been dropped' do
+ before do
+ table(:users).create!(id: 1, email: 'author@example.com', username: 'author', projects_limit: 10)
+ ActiveRecord::Base.connection.execute("ALTER TABLE users DROP COLUMN linkedin")
+ migration_record.update_column(:status, 1)
+ end
+
+ after do
+ ActiveRecord::Base.connection.execute("ALTER TABLE users ADD COLUMN linkedin text DEFAULT '' NOT NULL")
+ end
+
+ it 'does not raise exception' do
+ expect { migrate! }.not_to raise_error
+ end
+ end
+
context 'with different migration statuses', :redis do
using RSpec::Parameterized::TableSyntax
diff --git a/spec/requests/jwt_controller_spec.rb b/spec/requests/jwt_controller_spec.rb
index 1b91c04b5d9..69127a7526e 100644
--- a/spec/requests/jwt_controller_spec.rb
+++ b/spec/requests/jwt_controller_spec.rb
@@ -53,6 +53,14 @@ RSpec.describe JwtController, feature_category: :system_access do
end
end
+ context 'POST /jwt/auth' do
+ it 'returns 404' do
+ post '/jwt/auth'
+
+ expect(response).to have_gitlab_http_status(:not_found)
+ end
+ end
+
context 'authenticating against container registry' do
context 'existing service' do
subject! { get '/jwt/auth', params: parameters }
diff --git a/spec/services/ci/job_artifacts/destroy_all_expired_service_spec.rb b/spec/services/ci/job_artifacts/destroy_all_expired_service_spec.rb
index 457be67c1ea..07e76f65232 100644
--- a/spec/services/ci/job_artifacts/destroy_all_expired_service_spec.rb
+++ b/spec/services/ci/job_artifacts/destroy_all_expired_service_spec.rb
@@ -39,32 +39,12 @@ feature_category: :build_artifacts do
second_artifact
end
- context 'with ci_destroy_unlocked_job_artifacts feature flag disabled' do
- before do
- stub_feature_flags(ci_destroy_unlocked_job_artifacts: false)
- end
-
- it 'performs a consistent number of queries' do
- control = ActiveRecord::QueryRecorder.new { service.execute }
-
- more_artifacts
-
- expect { subject }.not_to exceed_query_limit(control.count)
- end
- end
-
- context 'with ci_destroy_unlocked_job_artifacts feature flag enabled' do
- before do
- stub_feature_flags(ci_destroy_unlocked_job_artifacts: true)
- end
-
- it 'performs a consistent number of queries' do
- control = ActiveRecord::QueryRecorder.new { service.execute }
+ it 'performs a consistent number of queries' do
+ control = ActiveRecord::QueryRecorder.new { service.execute }
- more_artifacts
+ more_artifacts
- expect { subject }.not_to exceed_query_limit(control.count)
- end
+ expect { subject }.not_to exceed_query_limit(control.count)
end
end