mirror of
https://gitlab.com/gitlab-org/gitlab-foss.git
synced 2025-07-25 16:03:48 +00:00
Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
@ -42,15 +42,6 @@ Lint/AmbiguousOperatorPrecedence:
|
||||
- 'lib/gitlab/database/partitioning_migration_helpers/table_management_helpers.rb'
|
||||
- 'lib/gitlab/database/postgres_hll/buckets.rb'
|
||||
- 'lib/gitlab/database/query_analyzers/prevent_cross_database_modification.rb'
|
||||
- 'lib/omni_auth/strategies/bitbucket.rb'
|
||||
- 'qa/qa/ee/page/project/secure/pipeline_security.rb'
|
||||
- 'qa/qa/resource/api_fabricator.rb'
|
||||
- 'qa/qa/resource/group_access_token.rb'
|
||||
- 'qa/qa/resource/impersonation_token.rb'
|
||||
- 'qa/qa/resource/personal_access_token.rb'
|
||||
- 'qa/qa/resource/project_access_token.rb'
|
||||
- 'qa/qa/runtime/feature.rb'
|
||||
- 'qa/qa/tools/test_resources_handler.rb'
|
||||
- 'scripts/packages/automated_cleanup.rb'
|
||||
- 'scripts/perf/gc/print_gc_stats.rb'
|
||||
- 'scripts/perf/query_limiting_report.rb'
|
||||
|
@ -32,12 +32,12 @@ module OmniAuth
|
||||
|
||||
def primary_email
|
||||
primary = emails.find { |i| i['is_primary'] && i['is_confirmed'] }
|
||||
primary && primary['email'] || nil
|
||||
(primary && primary['email']) || nil
|
||||
end
|
||||
|
||||
def emails
|
||||
email_response = access_token.get('api/2.0/user/emails').parsed
|
||||
@emails ||= email_response && email_response['values'] || []
|
||||
@emails ||= (email_response && email_response['values']) || []
|
||||
end
|
||||
|
||||
def callback_url
|
||||
|
@ -15,8 +15,8 @@ module QA
|
||||
attr_accessor :api_user, :api_resource, :api_response
|
||||
|
||||
def api_support?
|
||||
respond_to?(:api_get_path) &&
|
||||
(respond_to?(:api_post_path) && respond_to?(:api_post_body)) ||
|
||||
(respond_to?(:api_get_path) &&
|
||||
(respond_to?(:api_post_path) && respond_to?(:api_post_body))) ||
|
||||
(respond_to?(:api_put_path) && respond_to?(:api_put_body))
|
||||
end
|
||||
|
||||
|
@ -73,7 +73,7 @@ module QA
|
||||
|
||||
# Expire in 2 days just in case the token is created just before midnight
|
||||
def expires_at
|
||||
@expires_at || Time.now.utc.to_date + 2
|
||||
@expires_at || (Time.now.utc.to_date + 2)
|
||||
end
|
||||
|
||||
def fabricate!
|
||||
|
@ -68,7 +68,7 @@ module QA
|
||||
|
||||
# Expire in 2 days just in case the token is created just before midnight
|
||||
def expires_at
|
||||
@expires_at || Time.now.utc.to_date + 2
|
||||
@expires_at || (Time.now.utc.to_date + 2)
|
||||
end
|
||||
|
||||
def fabricate!
|
||||
|
@ -73,7 +73,7 @@ module QA
|
||||
|
||||
# Expire in 2 days just in case the token is created just before midnight
|
||||
def expires_at
|
||||
@expires_at || Time.now.utc.to_date + 2
|
||||
@expires_at || (Time.now.utc.to_date + 2)
|
||||
end
|
||||
|
||||
def fabricate!
|
||||
|
@ -56,7 +56,7 @@ module QA
|
||||
feature = JSON.parse(get_features).find { |flag| flag['name'] == key.to_s }
|
||||
if feature
|
||||
feature['state'] == 'on' ||
|
||||
feature['state'] == 'conditional' && scopes.present? && enabled_scope?(feature['gates'], **scopes)
|
||||
(feature['state'] == 'conditional' && scopes.present? && enabled_scope?(feature['gates'], **scopes))
|
||||
else
|
||||
# The feature wasn't found via the API so we check for a default value.
|
||||
# We expand the path include both ee and jh.
|
||||
@ -122,7 +122,7 @@ module QA
|
||||
|
||||
QA::Support::Waiter.wait_until(sleep_interval: 1) do
|
||||
is_enabled = enabled?(key, **scopes)
|
||||
is_enabled == enable || !enable && scopes.present?
|
||||
is_enabled == enable || (!enable && scopes.present?)
|
||||
end
|
||||
|
||||
if is_enabled == enable
|
||||
|
@ -250,7 +250,7 @@ module QA
|
||||
transformed_values = resources.transform_values! do |v|
|
||||
v.reject do |attributes|
|
||||
attributes['info']&.match(/with full_path 'gitlab-qa-sandbox-group(-\d)?'/) ||
|
||||
attributes['http_method'] == 'get' && !attributes['info']&.include?("with username 'qa-") ||
|
||||
(attributes['http_method'] == 'get' && !attributes['info']&.include?("with username 'qa-")) ||
|
||||
attributes['api_path'] == 'Cannot find resource API path'
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user