mirror of
https://github.com/lucheng0127/virtuallan.git
synced 2025-09-26 20:51:11 +08:00
Fix ut failed
This commit is contained in:
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@@ -22,7 +22,7 @@ jobs:
|
||||
run: go mod tidy
|
||||
|
||||
- name: Test
|
||||
run: go test -v ./...
|
||||
run: go test -gcflags=-l -v ./...
|
||||
|
||||
- name: Run build
|
||||
run: make
|
||||
|
@@ -1,12 +1,17 @@
|
||||
//go:build linux
|
||||
|
||||
package packet
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/lucheng0127/virtuallan/pkg/cipher"
|
||||
)
|
||||
|
||||
func TestAuthPktEncodeAndDecode(t *testing.T) {
|
||||
user := "shawn"
|
||||
passwd := "secret1111"
|
||||
cipher.SetAESKey("0123456789abcdef")
|
||||
|
||||
pkt := &VLPkt{
|
||||
VLHeader: VLHeader{Type: P_AUTH},
|
||||
|
Reference in New Issue
Block a user