]> Cypherpunks.ru repositories - govpn.git/blobdiff - src/cypherpunks.ru/govpn/peer_test.go
Forbid any later GNU GPL versions autousage
[govpn.git] / src / cypherpunks.ru / govpn / peer_test.go
index 4a0c7523f6a71abc67061c82102116b2fa478a4f..b07cbbd72d813ed91599759ab0c93fb8968190e8 100644 (file)
@@ -1,11 +1,10 @@
 /*
 GoVPN -- simple secure free software virtual private network daemon
-Copyright (C) 2014-2016 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2014-2019 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
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, version 3 of the License.
 
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -28,7 +27,7 @@ var (
        testPeer   *Peer
        testPt     []byte
        testCt     []byte
-       testPeerId PeerId
+       testPeerID PeerID
        testConf   *PeerConf
 )
 
@@ -45,9 +44,9 @@ func (d Dummy) Write(b []byte) (int, error) {
 
 func init() {
        id := new([IDSize]byte)
-       testPeerId = PeerId(*id)
+       testPeerID = PeerID(*id)
        testConf = &PeerConf{
-               Id:      &testPeerId,
+               ID:      &testPeerID,
                MTU:     MTUDefault,
                Timeout: time.Second * time.Duration(TimeoutDefault),
        }
@@ -113,7 +112,6 @@ func TestTransportSymmetricEncless(t *testing.T) {
 }
 
 func BenchmarkEnc(b *testing.B) {
-       b.ResetTimer()
        for i := 0; i < b.N; i++ {
                testPeer.EthProcess(testPt)
        }