summaryrefslogtreecommitdiff
path: root/spec/requests/api/graphql/gitlab_schema_spec.rb
diff options
context:
space:
mode:
authorcharlieablett <cablett@gitlab.com>2019-10-23 15:32:08 +1300
committercharlieablett <cablett@gitlab.com>2019-10-23 15:35:33 +1300
commit5be0a9fe4d7be65b4d3d98897372a46213216bd4 (patch)
tree441234303688fc6b1284d7a61edd2647c79239f0 /spec/requests/api/graphql/gitlab_schema_spec.rb
parentd08a78f4b0874f7750242d1a009e1f5342e56172 (diff)
downloadgitlab-ce-5be0a9fe4d7be65b4d3d98897372a46213216bd4.tar.gz
Tweak test to insulate against magic number changes
Diffstat (limited to 'spec/requests/api/graphql/gitlab_schema_spec.rb')
-rw-r--r--spec/requests/api/graphql/gitlab_schema_spec.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/spec/requests/api/graphql/gitlab_schema_spec.rb b/spec/requests/api/graphql/gitlab_schema_spec.rb
index 1f2bc67a9d2..1e799a0a42a 100644
--- a/spec/requests/api/graphql/gitlab_schema_spec.rb
+++ b/spec/requests/api/graphql/gitlab_schema_spec.rb
@@ -65,6 +65,7 @@ describe 'GitlabSchema configurations' do
context 'a deep recursive non-introspective query' do
it 'fails due to recursion, complexity and depth' do
+ allow(GitlabSchema).to receive(:max_query_complexity).and_return 1
query = File.read(Rails.root.join('spec/fixtures/api/graphql/recursive-query.graphql'))
post_graphql(query, current_user: nil)