-
Notifications
You must be signed in to change notification settings - Fork 71
/
single_port_test.go
38 lines (32 loc) · 778 Bytes
/
single_port_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package tftp
import (
"testing"
)
func TestZeroLengthSinglePort(t *testing.T) {
s, c := makeTestServer(true)
defer s.Shutdown()
testSendReceive(t, c, 0)
}
func TestSendReceiveSinglePort(t *testing.T) {
s, c := makeTestServer(true)
defer s.Shutdown()
for i := 600; i < 1000; i++ {
testSendReceive(t, c, 5000+int64(i))
}
}
func TestSendReceiveSinglePortWithBlockSize(t *testing.T) {
s, c := makeTestServer(true)
defer s.Shutdown()
for i := 600; i < 1000; i++ {
c.blksize = i
testSendReceive(t, c, 5000+int64(i))
}
}
func TestServerSendTimeoutSinglePort(t *testing.T) {
s, c := makeTestServer(true)
serverTimeoutSendTest(s, c, t)
}
func TestServerReceiveTimeoutSinglePort(t *testing.T) {
s, c := makeTestServer(true)
serverReceiveTimeoutTest(s, c, t)
}