diff --git a/pkg/ddc/alluxio/transform_resources.go b/pkg/ddc/alluxio/transform_resources.go index da765f86f22..ab49847e9d9 100644 --- a/pkg/ddc/alluxio/transform_resources.go +++ b/pkg/ddc/alluxio/transform_resources.go @@ -48,14 +48,14 @@ func (e *AlluxioEngine) transformResourcesForMaster(runtime *datav1alpha1.Alluxi } // transformResourcesForWorker is responsible for transforming and setting resource limits for the Alluxio Worker component. -// This function updates the resource requirements for the Worker and JobWorker based on the runtime configuration +// This function updates the resource requirements for the Worker and JobWorker based on the runtime configuration // and ensures that memory requests meet the required constraints. // // Parameters: -// - runtime: *datav1alpha1.AlluxioRuntime, the runtime configuration of Alluxio, including resource definitions +// - runtime: *datav1alpha1.AlluxioRuntime, the runtime configuration of Alluxio, including resource definitions // for Worker and JobWorker. // - value: *Alluxio, the Alluxio runtime instance used to store the transformed resource information. -// +// // Return value: // - error: Returns an error if any issue occurs during resource transformation; otherwise, returns nil. func (e *AlluxioEngine) transformResourcesForWorker(runtime *datav1alpha1.AlluxioRuntime, value *Alluxio) error { diff --git a/pkg/ddc/jindo/dataset_test.go b/pkg/ddc/jindo/dataset_test.go index 25f4136a92f..3a412675305 100644 --- a/pkg/ddc/jindo/dataset_test.go +++ b/pkg/ddc/jindo/dataset_test.go @@ -253,8 +253,8 @@ func TestUpdateDatasetStatus(t *testing.T) { } } -// TestBindToDataset tests the BindToDataset method of JindoEngine to verify whether it can correctly bind the dataset to the runtime -// and update the dataset's cache state and HCFS status. The test creates mock Dataset and JindoRuntime objects, +// TestBindToDataset tests the BindToDataset method of JindoEngine to verify whether it can correctly bind the dataset to the runtime +// and update the dataset's cache state and HCFS status. The test creates mock Dataset and JindoRuntime objects, // uses a fake client to simulate operations, and finally checks if the dataset's Phase, CacheStates, and HCFSStatus match the expected results. func TestBindToDataset(t *testing.T) { testDatasetInputs := []*datav1alpha1.Dataset{ diff --git a/pkg/ddc/juicefs/datasetinfo_parser_test.go b/pkg/ddc/juicefs/datasetinfo_parser_test.go index 13973de3555..63c97e97b19 100644 --- a/pkg/ddc/juicefs/datasetinfo_parser_test.go +++ b/pkg/ddc/juicefs/datasetinfo_parser_test.go @@ -170,7 +170,7 @@ func TestGetFSInfoFromConfigMap(t *testing.T) { } // Test_parseFSInfoFromConfigMap is a unit test function for the parseFSInfoFromConfigMap method. -// It validates whether the function correctly extracts and parses dataset information +// It validates whether the function correctly extracts and parses dataset information // from a given Kubernetes ConfigMap. // // Steps: diff --git a/pkg/ddc/juicefs/runtime_info_test.go b/pkg/ddc/juicefs/runtime_info_test.go index c64e6013351..60c7c18a839 100644 --- a/pkg/ddc/juicefs/runtime_info_test.go +++ b/pkg/ddc/juicefs/runtime_info_test.go @@ -49,6 +49,13 @@ func newJuiceFSEngineRT(client client.Client, name string, namespace string, wit return engine } +// newJuiceFSEngineRT creates a new instance of JuiceFSEngine +// client: Kubernetes client +// name: Name of the engine +// namespace: Namespace where the engine resides +// withRuntimeInfo: Whether to include runtime information +// unittest: Whether it is for unit testing +// Returns: A new instance of JuiceFSEngine func TestJuiceFSEngine_getRuntimeInfo(t *testing.T) { runtimeInputs := []*datav1alpha1.JuiceFSRuntime{ {