1
1
package ss_test
2
2
3
- import moved "github.com/libp2p/go-libp2p-core/sec/test"
3
+ import (
4
+ "testing"
5
+
6
+ "github.com/libp2p/go-libp2p-core/peer"
7
+ "github.com/libp2p/go-libp2p-core/sec"
8
+
9
+ moved "github.com/libp2p/go-libp2p-core/sec/test"
10
+ )
4
11
5
12
// Deprecated: Use github.com/libp2p/go-libp2p-core/sec/test.Subtests instead.
6
13
var Subtests = moved .Subtests
@@ -9,25 +16,41 @@ var Subtests = moved.Subtests
9
16
var TestMessage = moved .TestMessage
10
17
11
18
// Deprecated: Use github.com/libp2p/go-libp2p-core/sec/test.TestStreamLen instead.
19
+ // Warning: it's impossible to alias a var in go, so reads and writes to this variable may be inaccurate
20
+ // or not have the intended effect.
12
21
var TestStreamLen = moved .TestStreamLen
13
22
14
23
// Deprecated: Use github.com/libp2p/go-libp2p-core/sec/test.TestSeed instead.
24
+ // Warning: it's impossible to alias a var in go, so reads and writes to this variable may be inaccurate
25
+ // or not have the intended effect.
15
26
var TestSeed = moved .TestSeed
16
27
17
28
// Deprecated: Use github.com/libp2p/go-libp2p-core/sec/test.SubtestAll instead.
18
- var SubtestAll = moved .SubtestAll
29
+ func SubtestAll (t * testing.T , at , bt sec.SecureTransport , ap , bp peer.ID ) {
30
+ moved .SubtestAll (t , at , bt , ap , bp )
31
+ }
19
32
20
33
// Deprecated: Use github.com/libp2p/go-libp2p-core/sec/test.SubtestKeys instead.
21
- var SubtestKeys = moved .SubtestKeys
34
+ func SubtestKeys (t * testing.T , at , bt sec.SecureTransport , ap , bp peer.ID ) {
35
+ moved .SubtestKeys (t , at , bt , ap , bp )
36
+ }
22
37
23
38
// Deprecated: Use github.com/libp2p/go-libp2p-core/sec/test.SubtestWrongPeer instead.
24
- var SubtestWrongPeer = moved .SubtestWrongPeer
39
+ func SubtestWrongPeer (t * testing.T , at , bt sec.SecureTransport , ap , bp peer.ID ) {
40
+ moved .SubtestWrongPeer (t , at , bt , ap , bp )
41
+ }
25
42
26
43
// Deprecated: Use github.com/libp2p/go-libp2p-core/sec/test.SubtestCancelHandshakeOutbound instead.
27
- var SubtestCancelHandshakeOutbound = moved .SubtestCancelHandshakeOutbound
44
+ func SubtestCancelHandshakeOutbound (t * testing.T , at , bt sec.SecureTransport , ap , bp peer.ID ) {
45
+ moved .SubtestCancelHandshakeOutbound (t , at , bt , ap , bp )
46
+ }
28
47
29
48
// Deprecated: Use github.com/libp2p/go-libp2p-core/sec/test.SubtestCancelHandshakeInbound instead.
30
- var SubtestCancelHandshakeInbound = moved .SubtestCancelHandshakeInbound
49
+ func SubtestCancelHandshakeInbound (t * testing.T , at , bt sec.SecureTransport , ap , bp peer.ID ) {
50
+ moved .SubtestCancelHandshakeInbound (t , at , bt , ap , bp )
51
+ }
31
52
32
53
// Deprecated: Use github.com/libp2p/go-libp2p-core/sec/test.SubtestStream instead.
33
- var SubtestStream = moved .SubtestStream
54
+ func SubtestStream (t * testing.T , at , bt sec.SecureTransport , ap , bp peer.ID ) {
55
+ moved .SubtestStream (t , at , bt , ap , bp )
56
+ }
0 commit comments