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-06-16 15:07:11 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-06-16 15:07:11 +0300
commitd87800c3cfa21bde64704542d61a587c5ff4306e (patch)
tree4921659e458ef0b21a637ba68a2765c93e4f20b7 /spec/support
parent8ae36d93f1a63874b584f0488fde88c1fee999c4 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/helpers/login_helpers.rb17
-rw-r--r--spec/support/rspec_order_todo.yml4
-rw-r--r--spec/support/shared_examples/models/wiki_shared_examples.rb5
3 files changed, 10 insertions, 16 deletions
diff --git a/spec/support/helpers/login_helpers.rb b/spec/support/helpers/login_helpers.rb
index acd654bc96d..abe21d2b74c 100644
--- a/spec/support/helpers/login_helpers.rb
+++ b/spec/support/helpers/login_helpers.rb
@@ -241,14 +241,9 @@ module LoginHelpers
def stub_omniauth_saml_config(context: Rails.application, **messages)
set_devise_mapping(context: context)
- routes = Rails.application.routes
- routes.disable_clear_and_finalize = true
- routes.formatter.clear
- routes.draw do
- post '/users/auth/saml' => 'omniauth_callbacks#saml'
- end
saml_config = messages.key?(:providers) ? messages[:providers].first : mock_saml_config
- allow(Gitlab::Auth::OAuth::Provider).to receive_messages(providers: [:saml], config_for: saml_config)
+ prepare_provider_route(saml_config.name)
+ allow(Gitlab::Auth::OAuth::Provider).to receive_messages(providers: [saml_config.name], config_for: saml_config)
stub_omniauth_setting(messages)
stub_saml_authorize_path_helpers
end
@@ -268,11 +263,15 @@ module LoginHelpers
end
def stub_basic_saml_config
- allow(Gitlab::Auth::Saml::Config).to receive_messages({ options: { name: 'saml', args: {} } })
+ allow_next_instance_of(Gitlab::Auth::Saml::Config) do |config|
+ allow(config).to receive_messages({ options: { name: 'saml', args: {} } })
+ end
end
def stub_saml_group_config(groups)
- allow(Gitlab::Auth::Saml::Config).to receive_messages({ options: { name: 'saml', groups_attribute: 'groups', external_groups: groups, args: {} } })
+ allow_next_instance_of(Gitlab::Auth::Saml::Config) do |config|
+ allow(config).to receive_messages({ options: { name: 'saml', groups_attribute: 'groups', external_groups: groups, args: {} } })
+ end
end
end
diff --git a/spec/support/rspec_order_todo.yml b/spec/support/rspec_order_todo.yml
index d001ff8e85e..4168820a2b3 100644
--- a/spec/support/rspec_order_todo.yml
+++ b/spec/support/rspec_order_todo.yml
@@ -5465,9 +5465,6 @@
- './spec/lib/csv_builder_spec.rb'
- './spec/lib/csv_builders/stream_spec.rb'
- './spec/lib/declarative_enum_spec.rb'
-- './spec/lib/error_tracking/collector/payload_validator_spec.rb'
-- './spec/lib/error_tracking/collector/sentry_auth_parser_spec.rb'
-- './spec/lib/error_tracking/collector/sentry_request_parser_spec.rb'
- './spec/lib/error_tracking/stacktrace_builder_spec.rb'
- './spec/lib/event_filter_spec.rb'
- './spec/lib/expand_variables_spec.rb'
@@ -9129,7 +9126,6 @@
- './spec/services/environments/schedule_to_delete_review_apps_service_spec.rb'
- './spec/services/environments/stop_service_spec.rb'
- './spec/services/error_tracking/base_service_spec.rb'
-- './spec/services/error_tracking/collect_error_service_spec.rb'
- './spec/services/error_tracking/issue_details_service_spec.rb'
- './spec/services/error_tracking/issue_latest_event_service_spec.rb'
- './spec/services/error_tracking/issue_update_service_spec.rb'
diff --git a/spec/support/shared_examples/models/wiki_shared_examples.rb b/spec/support/shared_examples/models/wiki_shared_examples.rb
index 017e51ecd24..a0187252108 100644
--- a/spec/support/shared_examples/models/wiki_shared_examples.rb
+++ b/spec/support/shared_examples/models/wiki_shared_examples.rb
@@ -939,7 +939,6 @@ RSpec.shared_examples 'wiki model' do
end
describe '#create_wiki_repository' do
- let(:head_path) { Gitlab::GitalyClient::StorageSettings.allow_disk_access { Rails.root.join(TestEnv.repos_path, "#{wiki.disk_path}.git", 'HEAD') } }
let(:default_branch) { 'foo' }
before do
@@ -956,7 +955,7 @@ RSpec.shared_examples 'wiki model' do
subject
- expect(File.read(head_path).squish).to eq "ref: refs/heads/#{default_branch}"
+ expect(wiki.repository.raw.root_ref(head_only: true)).to eq default_branch
end
end
@@ -968,7 +967,7 @@ RSpec.shared_examples 'wiki model' do
subject
- expect(File.read(head_path).squish).to eq "ref: refs/heads/#{default_branch}"
+ expect(wiki.repository.raw.root_ref(head_only: true)).to eq default_branch
end
end
end