aboutsummaryrefslogtreecommitdiff
path: root/hotline/tracker_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'hotline/tracker_test.go')
-rw-r--r--hotline/tracker_test.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/hotline/tracker_test.go b/hotline/tracker_test.go
index 481f916..b5c5c55 100644
--- a/hotline/tracker_test.go
+++ b/hotline/tracker_test.go
@@ -3,6 +3,7 @@ package hotline
import (
"fmt"
"github.com/stretchr/testify/assert"
+ "io"
"reflect"
"testing"
)
@@ -11,7 +12,7 @@ func TestTrackerRegistration_Payload(t *testing.T) {
type fields struct {
Port [2]byte
UserCount int
- PassID []byte
+ PassID [4]byte
Name string
Description string
}
@@ -25,7 +26,7 @@ func TestTrackerRegistration_Payload(t *testing.T) {
fields: fields{
Port: [2]byte{0x00, 0x10},
UserCount: 2,
- PassID: []byte{0x00, 0x00, 0x00, 0x01},
+ PassID: [4]byte{0x00, 0x00, 0x00, 0x01},
Name: "Test Serv",
Description: "Fooz",
},
@@ -51,7 +52,8 @@ func TestTrackerRegistration_Payload(t *testing.T) {
Name: tt.fields.Name,
Description: tt.fields.Description,
}
- if got := tr.Read(); !reflect.DeepEqual(got, tt.want) {
+
+ if got, _ := io.ReadAll(tr); !reflect.DeepEqual(got, tt.want) {
t.Errorf("Read() = %v, want %v", got, tt.want)
}
})