diff options
author | charlieablett <cablett@gitlab.com> | 2019-05-02 03:16:49 +0300 |
---|---|---|
committer | charlieablett <cablett@gitlab.com> | 2019-05-30 09:27:28 +0300 |
commit | 2c011cb5b452409db7fe1c810f1ad7440a6cedce (patch) | |
tree | f2b85b2ae667dd2673090efa0d984da328d0e031 /spec/lib/gitlab/graphql_logger_spec.rb | |
parent | 1f37aed1c917260eefda63a18d3a9af91c4a1abb (diff) |
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 |