mirror of
https://github.com/fatedier/frp.git
synced 2025-07-16 02:42:17 +07:00
rename models to pkg (#2005)
This commit is contained in:
18
pkg/proto/udp/udp_test.go
Normal file
18
pkg/proto/udp/udp_test.go
Normal file
@ -0,0 +1,18 @@
|
||||
package udp
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestUdpPacket(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
|
||||
buf := []byte("hello world")
|
||||
udpMsg := NewUDPPacket(buf, nil, nil)
|
||||
|
||||
newBuf, err := GetContent(udpMsg)
|
||||
assert.NoError(err)
|
||||
assert.EqualValues(buf, newBuf)
|
||||
}
|
Reference in New Issue
Block a user