X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=src%2Ftx_test.go;h=6c0aa78569b8adb5f3471590bf0dadb203a73371;hb=d386e5b28dc603ac4ffac10337f322e15bc92d80;hp=507bc8b94e7b5ba848b39e19aeb1ebcb7fb5dd37;hpb=128618d02d84d08164060f14e7fdd3b87e491fcb;p=nncp.git diff --git a/src/tx_test.go b/src/tx_test.go index 507bc8b..6c0aa78 100644 --- a/src/tx_test.go +++ b/src/tx_test.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2022 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -87,7 +87,7 @@ func TestTx(t *testing.T) { } pkt, err := NewPkt(PktTypeExec, replyNice, []byte(pathSrc)) src := bytes.NewReader(data) - dstNode, _, err := ctx.Tx( + dstNode, _, _, err := ctx.Tx( nodeTgt, pkt, 123, @@ -148,14 +148,14 @@ func TestTx(t *testing.T) { if !bytes.HasPrefix(pkt.Path[:], []byte(pathSrc)) { return false } - if bytes.Compare(bufR.Bytes(), []byte(data)) != 0 { + if !bytes.Equal(bufR.Bytes(), []byte(data)) { return false } } else { if pkt.Type != PktTypeTrns { return false } - if bytes.Compare(pkt.Path[:MTHSize], vias[i+1][:]) != 0 { + if !bytes.Equal(pkt.Path[:MTHSize], vias[i+1][:]) { return false } }