You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which function do you want to add comments to?
TestTransformResourcesForMaster in pkg/ddc/alluxio/transform_resources_test.go
What comments do you want to add?
// TestTransformResourcesForMaster tests the transformResourcesForMaster method of the AlluxioEngine.
// This unit test verifies the resource transformation logic for the Alluxio master component.
// It ensures that the CPU and memory resource requests and limits from an AlluxioRuntime
// object are correctly passed and mapped to the Alluxio struct's Master and JobMaster fields.
// The test defines multiple scenarios using table-driven tests:
// 1. With both resource requests and limits set.
// 2. With only resource requests set.
// 3. With empty resource requirements or only empty requests/limits.
// For each test case, the transformResourcesForMaster method is invoked, and the output is
// compared against the expected result using DeepEqual. Any mismatch is reported as a test error.