]> Cypherpunks.ru repositories - nncp.git/blobdiff - src/cypherpunks.ru/nncp/pkt_test.go
Remote command execution
[nncp.git] / src / cypherpunks.ru / nncp / pkt_test.go
index 15bff169132f01aa11eeb572f7aaa21c23ae7908..e0765b3a7179c53be091cc421f4d4ff63c58d50a 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2017 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2018 Sergey Matveev <stargrave@stargrave.org>
 
 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
@@ -41,7 +41,7 @@ func TestPktEncWrite(t *testing.T) {
                if len(path) > int(pathSize) {
                        path = path[:int(pathSize)]
                }
-               pkt, err := NewPkt(PktTypeFile, path)
+               pkt, err := NewPkt(PktTypeFile, 123, []byte(path))
                if err != nil {
                        panic(err)
                }
@@ -87,7 +87,7 @@ func TestPktEncRead(t *testing.T) {
                if len(path) > int(pathSize) {
                        path = path[:int(pathSize)]
                }
-               pkt, err := NewPkt(PktTypeFile, path)
+               pkt, err := NewPkt(PktTypeFile, 123, []byte(path))
                if err != nil {
                        panic(err)
                }