Skip to content

Commit

Permalink
Fix ineffectual assignment to err
Browse files Browse the repository at this point in the history
  • Loading branch information
dveeden committed Oct 22, 2023
1 parent bec37b6 commit bac39af
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/server/internal/packetio_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ func TestCompressedReaderShort(t *testing.T) {

data := make([]byte, length)
_, err = cr.Read(data)
require.NoError(t, err)
expected := []byte{0x3, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x20, 0x40, 0x40,
0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6d, 0x6d,
0x65, 0x6e, 0x74, 0x20, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x20, 0x31}
Expand All @@ -368,6 +369,7 @@ func TestCompressedReaderLong(t *testing.T) {

data := make([]byte, length)
_, err = cr.Read(data)
require.NoError(t, err)
expected := []byte{0x3, 0x53, 0x45, 0x4c, 0x45, 0x43, 0x54, 0x20, 0x22,
0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,
0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,
Expand Down Expand Up @@ -404,6 +406,7 @@ func TestCompressedReaderLong(t *testing.T) {

data := make([]byte, length)
_, err = cr.Read(data)
require.NoError(t, err)
expected := []byte{0x3, 0x53, 0x45, 0x4c, 0x45, 0x43, 0x54, 0x20, 0x22,
0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,
0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,
Expand Down

0 comments on commit bac39af

Please sign in to comment.