From 9fe0f86f02c4ee1576c8eaa92ba034088ab92876 Mon Sep 17 00:00:00 2001 From: Gerhard Tan Date: Sun, 3 Mar 2024 17:56:13 +0800 Subject: [PATCH] Fix unit tests --- pkg/config/app_test.go | 2 +- pkg/config/client_test.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/config/app_test.go b/pkg/config/app_test.go index 6b52ff88..be2077af 100644 --- a/pkg/config/app_test.go +++ b/pkg/config/app_test.go @@ -23,7 +23,7 @@ func TestUnmarshalAppConfFromIni(t *testing.T) { expected := App{ Password: "abcde", Defaults: ClientCommon{ - ServerPort: "7000", + ServerPort: 7000, LogLevel: "info", LogMaxDays: 5, Protocol: "kcp", diff --git a/pkg/config/client_test.go b/pkg/config/client_test.go index ca2bd456..fc5451eb 100644 --- a/pkg/config/client_test.go +++ b/pkg/config/client_test.go @@ -25,8 +25,9 @@ func TestUnmarshalClientConfFromIni(t *testing.T) { meta_2 = value ` expected := NewDefaultClientConfig() + expected.LegacyFormat = true expected.ServerAddress = "example.com" - expected.ServerPort = "7001" + expected.ServerPort = 7001 expected.Token = "123456" expected.ManualStart = true expected.Metas = map[string]string{"1": "value"}