From 98c5d7e15caa11939ad5ff0c9af7dc0affe563a8 Mon Sep 17 00:00:00 2001 From: ZRW <1357493406@qq.com> Date: Sun, 9 Mar 2025 13:58:42 +0800 Subject: [PATCH] Add Notation to TestGetMasterStatefulset in pkg/ddc/alluxio/utils_test.go. Signed-off-by: ZRW <1357493406@qq.com> --- pkg/ddc/alluxio/utils_test.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkg/ddc/alluxio/utils_test.go b/pkg/ddc/alluxio/utils_test.go index 06483082640..61d42e85671 100644 --- a/pkg/ddc/alluxio/utils_test.go +++ b/pkg/ddc/alluxio/utils_test.go @@ -474,6 +474,17 @@ func TestGetMasterPod(t *testing.T) { } } +// TestGetMasterStatefulset tests the getMasterStatefulset method of the AlluxioEngine struct. +// It verifies that the method correctly retrieves the expected StatefulSet based on the provided +// AlluxioRuntime, name, and namespace. The test includes a sample runtime and expected +// StatefulSet, checking for both successful retrieval and error scenarios. +// +// Parameters: +// - t: The test framework's context, which provides methods for logging and error reporting. +// +// Returns: +// - The test does not return any value, but it reports errors using the t.Error and +// t.Errorf methods to indicate whether the test passed or failed. func TestGetMasterStatefulset(t *testing.T) { type fields struct { runtime *datav1alpha1.AlluxioRuntime