Skip to content

Commit

Permalink
Add a test around source
Browse files Browse the repository at this point in the history
  • Loading branch information
kwent committed Feb 8, 2024
1 parent 1bbe25d commit fa4fbb5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/log/format_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit fa4fbb5

Please sign in to comment.