diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-15 18:09:53 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-15 18:09:53 +0300 |
commit | 977720d7565377672df302ecb82b1e7a221cfba6 (patch) | |
tree | f258b65ed376a3075e0a76971a9360083ee6a059 /spec/support | |
parent | 717436a767395d0ed850a16d07f19cd51c3d4551 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/database/prevent_cross_joins.rb | 4 | ||||
-rw-r--r-- | spec/support/shared_examples/graphql/types/merge_request_interactions_type_shared_examples.rb | 9 |
2 files changed, 9 insertions, 4 deletions
diff --git a/spec/support/database/prevent_cross_joins.rb b/spec/support/database/prevent_cross_joins.rb index c44bf96a268..540c287bdad 100644 --- a/spec/support/database/prevent_cross_joins.rb +++ b/spec/support/database/prevent_cross_joins.rb @@ -23,7 +23,6 @@ module Database ALLOW_THREAD_KEY = :allow_cross_joins_across_databases ALLOW_ANNOTATE_KEY = ALLOW_THREAD_KEY.to_s.freeze - IGNORED_SCHEMAS = %i[gitlab_shared gitlab_internal].freeze def self.validate_cross_joins!(sql) return if Thread.current[ALLOW_THREAD_KEY] || sql.include?(ALLOW_ANNOTATE_KEY) @@ -41,9 +40,8 @@ module Database end schemas = ::Gitlab::Database::GitlabSchema.table_schemas!(tables) - schemas.subtract(IGNORED_SCHEMAS) - if schemas.many? + unless ::Gitlab::Database::GitlabSchema.cross_joins_allowed?(schemas) Thread.current[:has_cross_join_exception] = true raise CrossJoinAcrossUnsupportedTablesError, "Unsupported cross-join across '#{tables.join(", ")}' querying '#{schemas.to_a.join(", ")}' discovered " \ diff --git a/spec/support/shared_examples/graphql/types/merge_request_interactions_type_shared_examples.rb b/spec/support/shared_examples/graphql/types/merge_request_interactions_type_shared_examples.rb index 3dffc2066ae..d8cc6f697d7 100644 --- a/spec/support/shared_examples/graphql/types/merge_request_interactions_type_shared_examples.rb +++ b/spec/support/shared_examples/graphql/types/merge_request_interactions_type_shared_examples.rb @@ -42,7 +42,14 @@ RSpec.shared_examples "a user type with merge request interaction type" do profileEnableGitpodPath savedReplies savedReply - user_achievements + userAchievements + bio + linkedin + twitter + discord + organization + jobTitle + createdAt ] # TODO: 'workspaces' needs to be included, but only when this spec is run in EE context, to account for the |