From fa4fbb5b7751508ac3afe578844359251740c835 Mon Sep 17 00:00:00 2001 From: Quentin Rousseau Date: Thu, 8 Feb 2024 09:42:46 -0800 Subject: [PATCH] Add a test around source --- pkg/log/format_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/log/format_test.go b/pkg/log/format_test.go index 38251e8..8cf19ed 100644 --- a/pkg/log/format_test.go +++ b/pkg/log/format_test.go @@ -76,6 +76,12 @@ func TestFormatPulse(t *testing.T) { }, expected: "\n\n Summary: None\n Started At: 01 Jan 01 00:00 UTC\n Ended At 01 Jan 01 00:00 UTC\n Services: None\n Environments: None\n Labels: \n Exit Code = 0\n Version = 1.0.0\n\n Source: None\n Refs: \n sha = cd62148cbc5eb42168fe99fdb50a364e12b206ac\n image = registry.rootly.com/rootly/my-service:cd6214", }, + { + pulse: models.Pulse{ + Source: "k8s", + }, + expected: "\n\n Summary: None\n Started At: 01 Jan 01 00:00 UTC\n Ended At 01 Jan 01 00:00 UTC\n Services: None\n Environments: None\n Labels: None\n Source: k8s\n Refs: None", + }, { pulse: models.Pulse{}, expected: "\n\n Summary: None\n Started At: 01 Jan 01 00:00 UTC\n Ended At 01 Jan 01 00:00 UTC\n Services: None\n Environments: None\n Labels: None\n Source: None\n Refs: None",