Skip to content

Commit 4cff7be

Browse files
committed
Add Notation to newTestAlluxioEngine in pkg/ddc/alluxio/delete_volume_test.go
1 parent 4bad9a3 commit 4cff7be

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

pkg/ddc/alluxio/delete_volume_test.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,18 @@ type TestCase struct {
3737
isErr bool
3838
}
3939

40+
// newTestAlluxioEngine creates an instance of AlluxioEngine for testing purposes.
41+
//
42+
// Parameters:
43+
// client - A Kubernetes client used for interactions with the API server.
44+
// name - The name for the AlluxioEngine (used for associated PV/PVC resources in tests).
45+
// namespace - The namespace where the resources reside.
46+
// withRunTime - A flag indicating whether the engine should be initialized with runtime information.
47+
// When true, an AlluxioRuntime instance and corresponding runtimeInfo are created;
48+
// when false, both runtime and runtimeInfo are set to nil to simulate a scenario without runtime support.
49+
//
50+
// Returns:
51+
// A pointer to an AlluxioEngine instance configured according to the provided parameters.
4052
func newTestAlluxioEngine(client client.Client, name string, namespace string, withRunTime bool) *AlluxioEngine {
4153
runTime := &datav1alpha1.AlluxioRuntime{}
4254
runTimeInfo, _ := base.BuildRuntimeInfo(name, namespace, "alluxio")

0 commit comments

Comments
 (0)