Skip to content

Commit

Permalink
2024-10-06 19:02:16
Browse files Browse the repository at this point in the history
  • Loading branch information
mohanson committed Oct 6, 2024
1 parent e519a1f commit 2448b93
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 14 deletions.
2 changes: 0 additions & 2 deletions protocol/ashe/engine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ func TestProtocolAsheTCP(t *testing.T) {
cnt int
rsz = int(rand.Uint32N(65536))
)

copy(buf[0:2], []byte{0x00, 0x00})
binary.BigEndian.PutUint16(buf[2:], uint16(rsz))
doa.Try(cli.Write(buf[:4]))
Expand All @@ -52,7 +51,6 @@ func TestProtocolAsheTCP(t *testing.T) {
break
}
}

copy(buf[0:2], []byte{0x01, 0x00})
binary.BigEndian.PutUint16(buf[2:], uint16(rsz))
doa.Try(cli.Write(buf[:4]))
Expand Down
2 changes: 0 additions & 2 deletions protocol/baboon/engine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ func TestProtocolBaboonTCP(t *testing.T) {
cnt int
rsz = int(rand.Uint32N(65536))
)

copy(buf[0:2], []byte{0x00, 0x00})
binary.BigEndian.PutUint16(buf[2:], uint16(rsz))
doa.Try(cli.Write(buf[:4]))
Expand All @@ -54,7 +53,6 @@ func TestProtocolBaboonTCP(t *testing.T) {
break
}
}

copy(buf[0:2], []byte{0x01, 0x00})
binary.BigEndian.PutUint16(buf[2:], uint16(rsz))
doa.Try(cli.Write(buf[:4]))
Expand Down
2 changes: 0 additions & 2 deletions protocol/czar/engine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ func TestProtocolCzarTCP(t *testing.T) {
cnt int
rsz = int(rand.Uint32N(65536))
)

copy(buf[0:2], []byte{0x00, 0x00})
binary.BigEndian.PutUint16(buf[2:], uint16(rsz))
doa.Try(cli.Write(buf[:4]))
Expand All @@ -53,7 +52,6 @@ func TestProtocolCzarTCP(t *testing.T) {
break
}
}

copy(buf[0:2], []byte{0x01, 0x00})
binary.BigEndian.PutUint16(buf[2:], uint16(rsz))
doa.Try(cli.Write(buf[:4]))
Expand Down
2 changes: 0 additions & 2 deletions protocol/czar/mux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ func TestProtocolCzarMux(t *testing.T) {
cnt int
rsz = int(rand.Uint32N(65536))
)

copy(buf[0:2], []byte{0x00, 0x00})
binary.BigEndian.PutUint16(buf[2:], uint16(rsz))
doa.Try(cli.Write(buf[:4]))
Expand All @@ -46,7 +45,6 @@ func TestProtocolCzarMux(t *testing.T) {
break
}
}

copy(buf[0:2], []byte{0x01, 0x00})
binary.BigEndian.PutUint16(buf[2:], uint16(rsz))
doa.Try(cli.Write(buf[:4]))
Expand Down
9 changes: 3 additions & 6 deletions protocol/dahlia/engine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ const (
)

func TestProtocolDahliaTCP(t *testing.T) {
remote := daze.NewTester(EchoServerListenOn)
defer remote.Close()
remote.TCP()
dazeRemote := daze.NewTester(EchoServerListenOn)
defer dazeRemote.Close()
dazeRemote.TCP()

dazeServer := NewServer(DazeServerListenOn, EchoServerListenOn, Password)
defer dazeServer.Close()
Expand All @@ -29,7 +29,6 @@ func TestProtocolDahliaTCP(t *testing.T) {
dazeClient := NewClient(DazeClientListenOn, DazeServerListenOn, Password)
defer dazeClient.Close()
dazeClient.Run()

cli := doa.Try(daze.Dial("tcp", DazeClientListenOn))
defer cli.Close()

Expand All @@ -39,7 +38,6 @@ func TestProtocolDahliaTCP(t *testing.T) {
cnt int
rsz = int(rand.Uint32N(65536))
)

copy(buf[0:2], []byte{0x00, 0x00})
binary.BigEndian.PutUint16(buf[2:], uint16(rsz))
doa.Try(cli.Write(buf[:4]))
Expand All @@ -55,7 +53,6 @@ func TestProtocolDahliaTCP(t *testing.T) {
break
}
}

copy(buf[0:2], []byte{0x01, 0x00})
binary.BigEndian.PutUint16(buf[2:], uint16(rsz))
doa.Try(cli.Write(buf[:4]))
Expand Down

0 comments on commit 2448b93

Please sign in to comment.