Skip to content

Commit

Permalink
chore: Lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jaqx0r committed Jun 8, 2024
1 parent 4abdaff commit cf9ad9d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions internal/tailer/logstream/dgramstream_unix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func TestDgramStreamReadCompletedBecauseSocketClosed(t *testing.T) {

received := testutil.LinesReceived(lines)
expected := []*logline.LogLine{
{context.TODO(), addr, "1"},
{Context: context.TODO(), Filename: addr, Line: "1"},
}
testutil.ExpectNoDiff(t, expected, received, testutil.IgnoreFields(logline.LogLine{}, "Context"))

Expand Down Expand Up @@ -118,7 +118,7 @@ func TestDgramStreamReadCompletedBecauseCancel(t *testing.T) {

received := testutil.LinesReceived(lines)
expected := []*logline.LogLine{
{context.TODO(), addr, "1"},
{Context: context.TODO(), Filename: addr, Line: "1"},
}
testutil.ExpectNoDiff(t, expected, received, testutil.IgnoreFields(logline.LogLine{}, "Context"))

Expand Down
16 changes: 8 additions & 8 deletions internal/tailer/logstream/filestream_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func TestFileStreamRead(t *testing.T) {
close(lines)
received := testutil.LinesReceived(lines)
expected := []*logline.LogLine{
{context.TODO(), name, "yo"},
{Context: context.TODO(), Filename: name, Line: "yo"},
}
testutil.ExpectNoDiff(t, expected, received, testutil.IgnoreFields(logline.LogLine{}, "Context"))

Expand Down Expand Up @@ -80,7 +80,7 @@ func TestFileStreamReadNonSingleByteEnd(t *testing.T) {
close(lines)
received := testutil.LinesReceived(lines)
expected := []*logline.LogLine{
{context.TODO(), name, s},
{Context: context.TODO(), Filename: name, Line: s},
}
testutil.ExpectNoDiff(t, expected, received, testutil.IgnoreFields(logline.LogLine{}, "Context"))

Expand Down Expand Up @@ -126,7 +126,7 @@ func TestStreamDoesntBreakOnCorruptRune(t *testing.T) {
close(lines)
received := testutil.LinesReceived(lines)
expected := []*logline.LogLine{
{context.TODO(), name, s[1:]},
{Context: context.TODO(), Filename: name, Line: s[1:]},
}
testutil.ExpectNoDiff(t, expected, received, testutil.IgnoreFields(logline.LogLine{}, "Context"))

Expand Down Expand Up @@ -174,9 +174,9 @@ func TestFileStreamTruncation(t *testing.T) {
received := testutil.LinesReceived(lines)

expected := []*logline.LogLine{
{context.TODO(), name, "1"},
{context.TODO(), name, "2"},
{context.TODO(), name, "3"},
{Context: context.TODO(), Filename: name, Line: "1"},
{Context: context.TODO(), Filename: name, Line: "2"},
{Context: context.TODO(), Filename: name, Line: "3"},
}
testutil.ExpectNoDiff(t, expected, received, testutil.IgnoreFields(logline.LogLine{}, "Context"))

Expand Down Expand Up @@ -210,7 +210,7 @@ func TestFileStreamFinishedBecauseCancel(t *testing.T) {

received := testutil.LinesReceived(lines)
expected := []*logline.LogLine{
{context.TODO(), name, "yo"},
{Context: context.TODO(), Filename: name, Line: "yo"},
}
testutil.ExpectNoDiff(t, expected, received, testutil.IgnoreFields(logline.LogLine{}, "Context"))

Expand Down Expand Up @@ -251,7 +251,7 @@ func TestFileStreamPartialRead(t *testing.T) {
close(lines)
received := testutil.LinesReceived(lines)
expected := []*logline.LogLine{
{context.TODO(), name, "yo"},
{Context: context.TODO(), Filename: name, Line: "yo"},
}
testutil.ExpectNoDiff(t, expected, received, testutil.IgnoreFields(logline.LogLine{}, "Context"))

Expand Down
4 changes: 2 additions & 2 deletions internal/tailer/logstream/socketstream_unix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func TestSocketStreamReadCompletedBecauseSocketClosed(t *testing.T) {

received := testutil.LinesReceived(lines)
expected := []*logline.LogLine{
{context.TODO(), addr, "1"},
{Context: context.TODO(), Filename: addr, Line: "1"},
}
testutil.ExpectNoDiff(t, expected, received, testutil.IgnoreFields(logline.LogLine{}, "Context"))

Expand Down Expand Up @@ -114,7 +114,7 @@ func TestSocketStreamReadCompletedBecauseCancel(t *testing.T) {

received := testutil.LinesReceived(lines)
expected := []*logline.LogLine{
{context.TODO(), addr, "1"},
{Context: context.TODO(), Filename: addr, Line: "1"},
}
testutil.ExpectNoDiff(t, expected, received, testutil.IgnoreFields(logline.LogLine{}, "Context"))

Expand Down

0 comments on commit cf9ad9d

Please sign in to comment.