X-Git-Url: https://git.r.bdr.sh/rbdr/mobius/blobdiff_plain/84f3e842cefd5d56bfad299c9592d836dc13059a..c29db3dbd0491119755db5d99443dac423b2681b:/hotline/transaction_handlers_test.go diff --git a/hotline/transaction_handlers_test.go b/hotline/transaction_handlers_test.go index b03e3b1..ca1722f 100644 --- a/hotline/transaction_handlers_test.go +++ b/hotline/transaction_handlers_test.go @@ -5,6 +5,7 @@ import ( "fmt" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" + "io" "io/fs" "math/rand" "os" @@ -2859,7 +2860,7 @@ func TestHandleGetFileNameList(t *testing.T) { }, name: []byte("testfile-1k"), } - b, _ := fnwi.MarshalBinary() + b, _ := io.ReadAll(&fnwi) return b }(), ), @@ -3190,7 +3191,7 @@ func TestHandleDelNewsItem(t *testing.T) { Server: &Server{ ThreadedNews: &ThreadedNews{Categories: map[string]NewsCategoryListData15{ "test": { - Type: []byte{0, 3}, + Type: [2]byte{0, 3}, Count: nil, NameSize: 0, Name: "zz", @@ -3236,7 +3237,7 @@ func TestHandleDelNewsItem(t *testing.T) { Server: &Server{ ThreadedNews: &ThreadedNews{Categories: map[string]NewsCategoryListData15{ "testcat": { - Type: []byte{0, 2}, + Type: [2]byte{0, 2}, Count: nil, NameSize: 0, Name: "test", @@ -3292,7 +3293,7 @@ func TestHandleDelNewsItem(t *testing.T) { }(), ThreadedNews: &ThreadedNews{Categories: map[string]NewsCategoryListData15{ "testcat": { - Type: []byte{0, 2}, + Type: [2]byte{0, 2}, Count: nil, NameSize: 0, Name: "test", @@ -3846,7 +3847,7 @@ func TestHandleNewNewsFldr(t *testing.T) { }(), ThreadedNews: &ThreadedNews{Categories: map[string]NewsCategoryListData15{ "test": { - Type: []byte{0, 2}, + Type: [2]byte{0, 2}, Count: nil, NameSize: 0, Name: "test",