Skip to content

Commit

Permalink
tflog: Additional code comments around caller information in test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
bflad committed Mar 9, 2022
1 parent bff406a commit 32c0060
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tflog/options_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ func TestWithAdditionalLocationOffset(t *testing.T) {
},
expectedOutput: []map[string]interface{}{
{
// Caller line (number after colon) should match
// tflog.SubsystemTrace() line in test case implementation.
"@caller": "/tflog/options_test.go:30",
"@level": hclog.Trace.String(),
"@message": "test message",
Expand All @@ -45,6 +47,9 @@ func TestWithAdditionalLocationOffset(t *testing.T) {
},
expectedOutput: []map[string]interface{}{
{
// Caller line (number after colon) should match
// tflog.SubsystemTrace() line in testSubsystemTraceHelper
// function implementation.
"@caller": "/tflog/options_test.go:16",
"@level": hclog.Trace.String(),
"@message": "test message",
Expand All @@ -59,7 +64,10 @@ func TestWithAdditionalLocationOffset(t *testing.T) {
},
expectedOutput: []map[string]interface{}{
{
"@caller": "/tflog/options_test.go:58",
// Caller line (number after colon) should match
// testSubsystemTraceHelper() line in test case
// implementation.
"@caller": "/tflog/options_test.go:63",
"@level": hclog.Trace.String(),
"@message": "test message",
"@module": testSubsystemModule,
Expand Down

0 comments on commit 32c0060

Please sign in to comment.