Skip to content

Commit

Permalink
lint, cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
James-Pickett committed Nov 22, 2023
1 parent 98361ed commit 135f416
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions pkg/sendbuffer/sendbuffer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,8 @@ func requireStoreSizeEqualsHttpBufferReportedSize(t *testing.T, sb *SendBuffer)
}

func TestUpdateData(t *testing.T) {
t.Parallel()

tests := []struct {
name string
maxStorageSize int
Expand Down Expand Up @@ -343,7 +345,6 @@ func TestUpdateData(t *testing.T) {
[]byte("5"),
},
updateFunction: func(in io.Reader, out io.Writer) error {
// add 10 to the even numbers
data, err := io.ReadAll(in)
require.NoError(t, err)

Expand Down Expand Up @@ -376,7 +377,10 @@ func TestUpdateData(t *testing.T) {
}

for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
t.Parallel()

require := require.New(t)

testSender := &testSender{lastReceived: &bytes.Buffer{}, t: t}
Expand All @@ -401,15 +405,6 @@ func TestUpdateData(t *testing.T) {
}
}

// Helper function to calculate the total length of logs
func lenLogs(logs [][]byte) int {
totalLen := 0
for _, log := range logs {
totalLen += len(log)
}
return totalLen
}

type testSender struct {
t *testing.T
lastReceived *bytes.Buffer
Expand Down

0 comments on commit 135f416

Please sign in to comment.