diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-12 15:08:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-12 15:08:35 +0300 |
commit | 8ef107c43390ea9c9932afb55d1318e4716fbf3b (patch) | |
tree | ad35474f833e8da50107d8ca1e348f9a953c8d7c /spec/controllers | |
parent | e0df184fb182633972212cd62d6e3dc6e4bd0e62 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/graphql_controller_spec.rb | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/spec/controllers/graphql_controller_spec.rb b/spec/controllers/graphql_controller_spec.rb index b1399835b45..b4a7e41ccd2 100644 --- a/spec/controllers/graphql_controller_spec.rb +++ b/spec/controllers/graphql_controller_spec.rb @@ -462,12 +462,13 @@ RSpec.describe GraphqlController, feature_category: :integrations do end it 'logs that it will try to hit the cache' do + expect(Gitlab::AppLogger).to receive(:info).with(message: "IntrospectionQueryCache hit") expect(Gitlab::AppLogger).to receive(:info).with( message: "IntrospectionQueryCache", - can_use_introspection_query_cache: true, + can_use_introspection_query_cache: "true", query: query.to_s, - variables: {}, - introspection_query_cache_key: ['introspection-query-cache', Gitlab.revision, false] + variables: "{}", + introspection_query_cache_key: "[\"introspection-query-cache\", \"#{Gitlab.revision}\", false]" ) post :execute, params: { query: query, operationName: 'IntrospectionQuery' } @@ -477,12 +478,13 @@ RSpec.describe GraphqlController, feature_category: :integrations do let(:query) { File.read(Rails.root.join('spec/fixtures/api/graphql/fake_introspection.graphql')) } it 'logs that it did not try to hit the cache' do + expect(Gitlab::AppLogger).to receive(:info).with(message: "IntrospectionQueryCache miss") expect(Gitlab::AppLogger).to receive(:info).with( message: "IntrospectionQueryCache", - can_use_introspection_query_cache: false, + can_use_introspection_query_cache: "false", query: query.to_s, - variables: {}, - introspection_query_cache_key: ['introspection-query-cache', Gitlab.revision, false] + variables: "{}", + introspection_query_cache_key: "[\"introspection-query-cache\", \"#{Gitlab.revision}\", false]" ) post :execute, params: { query: query, operationName: 'IntrospectionQuery' } |