summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcharlieablett <cablett@gitlab.com>2019-10-23 15:32:08 +1300
committercharlieablett <cablett@gitlab.com>2019-10-23 16:06:36 +1300
commit6a836620037c9392dfe4c20306f6522d3e043dfd (patch)
treee2afa43bc189001a423f97a3538892e898ac7d8e
parent46ebc4db31f958e790ed56e7081b852d81048d48 (diff)
downloadgitlab-ce-6a836620037c9392dfe4c20306f6522d3e043dfd.tar.gz
Tweak test to insulate against magic number changes
-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 4560e7fec00..c6ff459e3a5 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)