diff options
author | charlieablett <cablett@gitlab.com> | 2019-05-02 12:16:49 +1200 |
---|---|---|
committer | charlieablett <cablett@gitlab.com> | 2019-05-30 18:27:28 +1200 |
commit | 2c011cb5b452409db7fe1c810f1ad7440a6cedce (patch) | |
tree | f2b85b2ae667dd2673090efa0d984da328d0e031 /spec/lib/gitlab/graphql_logger_spec.rb | |
parent | 1f37aed1c917260eefda63a18d3a9af91c4a1abb (diff) | |
download | gitlab-ce-2c011cb5b452409db7fe1c810f1ad7440a6cedce.tar.gz |
Implement logger analyzer
- Modify GraphqlLogger to subclass JsonLogger
- Replace the single-line analyser with one that can log all the GraphQL
query related information in one place.
- Implement analyzer behavior with spec
Diffstat (limited to 'spec/lib/gitlab/graphql_logger_spec.rb')
-rw-r--r-- | spec/lib/gitlab/graphql_logger_spec.rb | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/spec/lib/gitlab/graphql_logger_spec.rb b/spec/lib/gitlab/graphql_logger_spec.rb index 51c77181927..aeeed0b2ca1 100644 --- a/spec/lib/gitlab/graphql_logger_spec.rb +++ b/spec/lib/gitlab/graphql_logger_spec.rb @@ -1,6 +1,8 @@ +# frozen_string_literal: true + require 'spec_helper' -describe Gitlab::GraphqlLogger, :request_store do +describe Gitlab::GraphqlLogger do subject { described_class.new('/dev/null') } let(:now) { Time.now } @@ -10,12 +12,4 @@ describe Gitlab::GraphqlLogger, :request_store do subject.info('hello world') subject.error('hello again') end - - describe '#format_message' do - it 'formats properly' do - output = subject.format_message('INFO', now, 'test', 'Hello world') - - expect(output).to match(/Hello world/) - end - end end |