File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,8 @@ func TestMain(m *testing.M) {
23
23
goleak .VerifyTestMain (m , testutil .GoleakOptions ... )
24
24
}
25
25
26
+ const expectedHandshake = "codervpn tunnel 1.2\n "
27
+
26
28
// TestSpeaker_RawPeer tests the speaker with a peer that we simulate by directly making reads and
27
29
// writes to the other end of the pipe. There should be at least one test that does this, rather
28
30
// than use 2 speakers so that we don't have a bug where we don't adhere to the stated protocol, but
@@ -48,8 +50,6 @@ func TestSpeaker_RawPeer(t *testing.T) {
48
50
errCh <- err
49
51
}()
50
52
51
- expectedHandshake := "codervpn tunnel 1.2\n "
52
-
53
53
b := make ([]byte , 256 )
54
54
n , err := mp .Read (b )
55
55
require .NoError (t , err )
@@ -157,8 +157,6 @@ func TestSpeaker_OversizeHandshake(t *testing.T) {
157
157
errCh <- err
158
158
}()
159
159
160
- expectedHandshake := "codervpn tunnel 1.2\n "
161
-
162
160
b := make ([]byte , 256 )
163
161
n , err := mp .Read (b )
164
162
require .NoError (t , err )
@@ -210,7 +208,6 @@ func TestSpeaker_HandshakeInvalid(t *testing.T) {
210
208
_ , err = mp .Write ([]byte (tc .handshake ))
211
209
require .NoError (t , err )
212
210
213
- expectedHandshake := "codervpn tunnel 1.2\n "
214
211
b := make ([]byte , 256 )
215
212
n , err := mp .Read (b )
216
213
require .NoError (t , err )
@@ -248,8 +245,6 @@ func TestSpeaker_CorruptMessage(t *testing.T) {
248
245
errCh <- err
249
246
}()
250
247
251
- expectedHandshake := "codervpn tunnel 1.2\n "
252
-
253
248
b := make ([]byte , 256 )
254
249
n , err := mp .Read (b )
255
250
require .NoError (t , err )
You can’t perform that action at this time.
0 commit comments