diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-12 21:07:34 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-12 21:07:34 +0300 |
commit | 90859e80ca23b8709d56b60d2066b569053e7e02 (patch) | |
tree | 15d9ac5c194220fab358c42325645fdf2c6ead13 /spec/lib/gitlab/puma_logging | |
parent | 7530cf5ad8dd86fbe19e129b6bb31b23849ed757 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/puma_logging')
-rw-r--r-- | spec/lib/gitlab/puma_logging/json_formatter_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/lib/gitlab/puma_logging/json_formatter_spec.rb b/spec/lib/gitlab/puma_logging/json_formatter_spec.rb new file mode 100644 index 00000000000..f7f5b99d5e5 --- /dev/null +++ b/spec/lib/gitlab/puma_logging/json_formatter_spec.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe Gitlab::PumaLogging::JSONFormatter do + it "generate json format with timestamp and pid" do + Timecop.freeze( Time.utc(2019, 12, 04, 9, 10, 11, 123456)) do + expect(subject.call('log message')).to eq "{\"timestamp\":\"2019-12-04T09:10:11.123Z\",\"pid\":#{Process.pid},\"message\":\"log message\"}" + end + end +end |