]> Cypherpunks.ru repositories - nncp.git/blobdiff - src/tx_test.go
OpenSSH signature support
[nncp.git] / src / tx_test.go
index 6c0aa78569b8adb5f3471590bf0dadb203a73371..4523b6343b8ba6ed17acea1b6f7662a82837af0d 100644 (file)
@@ -21,7 +21,6 @@ import (
        "bytes"
        "crypto/rand"
        "io"
-       "io/ioutil"
        "os"
        "path"
        "testing"
@@ -48,7 +47,7 @@ func TestTx(t *testing.T) {
                        pathSrc = pathSrc[:MaxPathSize]
                }
                hops = hops % 4
-               spool, err := ioutil.TempDir("", "testtx")
+               spool, err := os.MkdirTemp("", "testtx")
                if err != nil {
                        panic(err)
                }
@@ -86,6 +85,9 @@ func TestTx(t *testing.T) {
                        nodeTgt.Via = append(nodeTgt.Via, node.Id)
                }
                pkt, err := NewPkt(PktTypeExec, replyNice, []byte(pathSrc))
+               if err != nil {
+                       panic(err)
+               }
                src := bytes.NewReader(data)
                dstNode, _, _, err := ctx.Tx(
                        nodeTgt,