Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
p2p
go-conn-security-multistream
Commits
1f16cdfe
Commit
1f16cdfe
authored
Mar 14, 2018
by
Steven Allen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix tests for go-conn-security refactor
parent
2064740b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
ssms_test.go
ssms_test.go
+10
-10
No files found.
ssms_test.go
View file @
1f16cdfe
...
...
@@ -6,27 +6,27 @@ import (
"sync"
"testing"
con
nsec
"github.com/libp2p/go-conn-security"
i
nsec
ure
"github.com/libp2p/go-conn-security
/insecure
"
sst
"github.com/libp2p/go-conn-security/test"
)
func
TestCommonProto
(
t
*
testing
.
T
)
{
var
at
,
bt
SSMuxer
atInsecure
:=
connsec
.
InsecureTransport
(
"peerA"
)
btInsecure
:=
connsec
.
InsecureTransport
(
"peerB"
)
at
.
AddTransport
(
"/plaintext/1.0.0"
,
&
atInsecure
)
bt
.
AddTransport
(
"/plaintext/1.1.0"
,
&
btInsecure
)
bt
.
AddTransport
(
"/plaintext/1.0.0"
,
&
btInsecure
)
atInsecure
:=
insecure
.
New
(
"peerA"
)
btInsecure
:=
insecure
.
New
(
"peerB"
)
at
.
AddTransport
(
"/plaintext/1.0.0"
,
atInsecure
)
bt
.
AddTransport
(
"/plaintext/1.1.0"
,
btInsecure
)
bt
.
AddTransport
(
"/plaintext/1.0.0"
,
btInsecure
)
sst
.
SubtestRW
(
t
,
&
at
,
&
bt
,
"peerA"
,
"peerB"
)
}
func
TestNoCommonProto
(
t
*
testing
.
T
)
{
var
at
,
bt
SSMuxer
atInsecure
:=
connsec
.
InsecureTransport
(
"peerA"
)
btInsecure
:=
connsec
.
InsecureTransport
(
"peerB"
)
atInsecure
:=
insecure
.
New
(
"peerA"
)
btInsecure
:=
insecure
.
New
(
"peerB"
)
at
.
AddTransport
(
"/plaintext/1.0.0"
,
&
atInsecure
)
bt
.
AddTransport
(
"/plaintext/1.1.0"
,
&
btInsecure
)
at
.
AddTransport
(
"/plaintext/1.0.0"
,
atInsecure
)
bt
.
AddTransport
(
"/plaintext/1.1.0"
,
btInsecure
)
ctx
,
cancel
:=
context
.
WithCancel
(
context
.
Background
())
defer
cancel
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment