From 8d5806c0f3eded59c58d485f19150c4d1486af5b Mon Sep 17 00:00:00 2001 From: JefferyChu Date: Wed, 12 Mar 2025 20:43:32 +0800 Subject: [PATCH 1/4] Add Notation to TestGetFuseDaemonsetName in pkg/ddc/alluxio/utils_test.go. Signed-off-by: JefferyChu --- pkg/ddc/alluxio/utils_test.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pkg/ddc/alluxio/utils_test.go b/pkg/ddc/alluxio/utils_test.go index 06483082640..35b86a6bcee 100644 --- a/pkg/ddc/alluxio/utils_test.go +++ b/pkg/ddc/alluxio/utils_test.go @@ -692,7 +692,19 @@ func TestGetWorkerDaemonsetName(t *testing.T) { }) } } - +// TestGetFuseDaemonsetName is a unit test for the getFuseName method of the AlluxioEngine struct. +// This test verifies that the method correctly constructs the expected daemonset name +// based on the given engine name. +// +// The test defines a struct `fields` containing the engine name and a test case struct +// that includes the test case name, input fields, and the expected daemonset name. +// +// The test case used: +// - When the engine name is "spark", the expected daemonset name should be "spark-fuse". +// +// The test iterates through all defined cases, creates an instance of AlluxioEngine with +// the given name, calls the `getFuseName` method, and checks if the returned result matches +// the expected value. If the result differs, an error message is reported. func TestGetFuseDaemonsetName(t *testing.T) { type fields struct { name string From c02194c85f07457745e328e9208d28902c160f11 Mon Sep 17 00:00:00 2001 From: JefferyChu Date: Thu, 13 Mar 2025 21:06:11 +0800 Subject: [PATCH 2/4] Add Notation to TestGetFuseDaemonsetName in pkg\ddc\alluxio\utils_test.go. Signed-off-by: JefferyChu --- pkg/ddc/alluxio/utils_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/ddc/alluxio/utils_test.go b/pkg/ddc/alluxio/utils_test.go index 35b86a6bcee..d155efe4bce 100644 --- a/pkg/ddc/alluxio/utils_test.go +++ b/pkg/ddc/alluxio/utils_test.go @@ -705,6 +705,7 @@ func TestGetWorkerDaemonsetName(t *testing.T) { // The test iterates through all defined cases, creates an instance of AlluxioEngine with // the given name, calls the `getFuseName` method, and checks if the returned result matches // the expected value. If the result differs, an error message is reported. + func TestGetFuseDaemonsetName(t *testing.T) { type fields struct { name string From 141d5e49cd5be70f8bd3d66d5762b938e6488427 Mon Sep 17 00:00:00 2001 From: JefferyChu Date: Fri, 14 Mar 2025 13:13:28 +0800 Subject: [PATCH 3/4] Add Notation to TestGetFuseDaemonsetName in pkg\ddc\alluxio\utils_test.go. Signed-off-by: JefferyChu --- pkg/ddc/alluxio/utils_test.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkg/ddc/alluxio/utils_test.go b/pkg/ddc/alluxio/utils_test.go index d155efe4bce..a8dc97ece03 100644 --- a/pkg/ddc/alluxio/utils_test.go +++ b/pkg/ddc/alluxio/utils_test.go @@ -695,13 +695,10 @@ func TestGetWorkerDaemonsetName(t *testing.T) { // TestGetFuseDaemonsetName is a unit test for the getFuseName method of the AlluxioEngine struct. // This test verifies that the method correctly constructs the expected daemonset name // based on the given engine name. -// // The test defines a struct `fields` containing the engine name and a test case struct // that includes the test case name, input fields, and the expected daemonset name. -// // The test case used: // - When the engine name is "spark", the expected daemonset name should be "spark-fuse". -// // The test iterates through all defined cases, creates an instance of AlluxioEngine with // the given name, calls the `getFuseName` method, and checks if the returned result matches // the expected value. If the result differs, an error message is reported. From 137c9ade9c7f4f3dfa899ceb0b2c198682668016 Mon Sep 17 00:00:00 2001 From: JefferyChu Date: Fri, 14 Mar 2025 13:19:45 +0800 Subject: [PATCH 4/4] Add Notation to TestGetFuseDaemonsetName in pkg\ddc\alluxio\utils_test.go. Signed-off-by: JefferyChu --- pkg/ddc/alluxio/utils_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/ddc/alluxio/utils_test.go b/pkg/ddc/alluxio/utils_test.go index a8dc97ece03..6870c5db5d0 100644 --- a/pkg/ddc/alluxio/utils_test.go +++ b/pkg/ddc/alluxio/utils_test.go @@ -692,6 +692,7 @@ func TestGetWorkerDaemonsetName(t *testing.T) { }) } } + // TestGetFuseDaemonsetName is a unit test for the getFuseName method of the AlluxioEngine struct. // This test verifies that the method correctly constructs the expected daemonset name // based on the given engine name. @@ -702,7 +703,6 @@ func TestGetWorkerDaemonsetName(t *testing.T) { // The test iterates through all defined cases, creates an instance of AlluxioEngine with // the given name, calls the `getFuseName` method, and checks if the returned result matches // the expected value. If the result differs, an error message is reported. - func TestGetFuseDaemonsetName(t *testing.T) { type fields struct { name string