From 2fdb769cd29aaed24c93053aa992712b95c1d91e Mon Sep 17 00:00:00 2001 From: Lin Yang Date: Sat, 4 Jan 2025 20:35:26 +0800 Subject: [PATCH] refactor: log level Signed-off-by: Lin Yang --- .github/workflows/main.yml | 3 --- tests/framework/common.go | 6 +++++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e1870be2..b5e35b04 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -253,13 +253,10 @@ jobs: bucket: [6] include: - k8s_version: v1.19.16-k3s1 - focus: "Test traffic from client to backend service routing by FSM Gateway" bucket: ".*" - k8s_version: v1.21.16-k3s1 - focus: "Test traffic from client to backend service routing by FSM Gateway" bucket: ".*" - k8s_version: v1.23.17-k3s1 - focus: "Test traffic from client to backend service routing by FSM Gateway" bucket: ".*" env: CTR_TAG: ${{ github.sha }} diff --git a/tests/framework/common.go b/tests/framework/common.go index 03805e47..acb9778e 100644 --- a/tests/framework/common.go +++ b/tests/framework/common.go @@ -20,6 +20,8 @@ import ( "strings" "time" + "github.com/sirupsen/logrus" + "github.com/k3d-io/k3d/v5/pkg/config" "github.com/k3d-io/k3d/v5/pkg/runtimes" @@ -70,6 +72,7 @@ import ( k3dCluster "github.com/k3d-io/k3d/v5/pkg/client" k3dTypes "github.com/k3d-io/k3d/v5/pkg/config/types" k3dCfg "github.com/k3d-io/k3d/v5/pkg/config/v1alpha5" + k3dLogger "github.com/k3d-io/k3d/v5/pkg/logger" k3d "github.com/k3d-io/k3d/v5/pkg/types" k3dutil "github.com/k3d-io/k3d/v5/pkg/util" ) @@ -257,6 +260,7 @@ func (td *FsmTestData) InitTestData(t GinkgoTInterface) error { clusterConfig := td.k3dClusterConfig() td.ClusterConfig = clusterConfig + k3dLogger.Logger.SetLevel(logrus.DebugLevel) if err := k3dCluster.ClusterRun(context.TODO(), runtimes.SelectedRuntime, clusterConfig); err != nil { // rollback if creation failed td.T.Error(err) @@ -519,7 +523,7 @@ mirrors: if err != nil { td.T.Fatal(err) } - td.T.Log("===== Merged Cluster Config =====\n%+v\n===== ===== =====\n", clusterConfig) + td.T.Logf("===== Merged Cluster Config =====\n%+v\n===== ===== =====\n", clusterConfig) clusterConfig, err = config.ProcessClusterConfig(*clusterConfig) if err != nil {