]> git.r.bdr.sh - rbdr/mobius/blobdiff - hotline/transaction_handlers_test.go
Update goreleaser config
[rbdr/mobius] / hotline / transaction_handlers_test.go
index b03e3b18b77185dc3b080b660768b74182ede5fa..ca1722faa10342ed976806687261b476d9d1667a 100644 (file)
@@ -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",