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:
authorcharlieablett <cablett@gitlab.com>2019-08-28 06:47:29 +0300
committercharlieablett <cablett@gitlab.com>2019-10-23 05:40:17 +0300
commitc57fc849060cbfe0ff5abd3fdc2ca32adbc35790 (patch)
treef41d361f14136af095a6ee1d478ca004b5d9fb1a /spec
parent1689559facc7d50130c11c8fdc496641f719ae75 (diff)
Allow tests to ignore recursion
Diffstat (limited to 'spec')
-rw-r--r--spec/support/helpers/graphql_helpers.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/support/helpers/graphql_helpers.rb b/spec/support/helpers/graphql_helpers.rb
index 69bf1f0f3fa..6fb1d279456 100644
--- a/spec/support/helpers/graphql_helpers.rb
+++ b/spec/support/helpers/graphql_helpers.rb
@@ -129,6 +129,7 @@ module GraphqlHelpers
allow_unlimited_graphql_complexity
allow_unlimited_graphql_depth
+ allow_high_graphql_recursion
type = GitlabSchema.types[class_name.to_s]
return "" unless type
@@ -277,6 +278,10 @@ module GraphqlHelpers
allow_any_instance_of(GitlabSchema).to receive(:max_depth).and_return nil
allow(GitlabSchema).to receive(:max_query_depth).with(any_args).and_return nil
end
+
+ def allow_high_graphql_recursion
+ allow_any_instance_of(Gitlab::Graphql::QueryAnalyzers::RecursionAnalyzer).to receive(:recursion_threshold).and_return 1000
+ end
end
# This warms our schema, doing this as part of loading the helpers to avoid