@@ -41,14 +41,15 @@ type TestCase struct {
4141
4242// newTestJuiceEngine creates a JuiceFSEngine for testing
4343// Parameters:
44- // - client: fake client
44+ // - client: fake client
4545// - name: the name of the JuiceFS engine
4646// - namespace: the namespace of the JuiceFS engine
4747// - withRunTime: whether the JuiceFS engine has runtime
48+ //
4849// Returns:
4950// - JuiceFSEngine: the JuiceFS engine for testing
5051func newTestJuiceEngine (client client.Client , name string , namespace string , withRunTime bool ) * JuiceFSEngine {
51- // 1. Create a JuiceFSRuntime and RuntimeInfo
52+ // 1. Create a JuiceFSRuntime and RuntimeInfo
5253 runTime := & datav1alpha1.JuiceFSRuntime {}
5354 runTimeInfo , _ := base .BuildRuntimeInfo (name , namespace , common .JuiceFSRuntime )
5455 // 2. If the JuiceFS engine does not have runtime, set the runtime and runtimeInfo to nil
@@ -214,17 +215,17 @@ func TestJuiceFSEngine_deleteFusePersistentVolume(t *testing.T) {
214215// - Proper handling of PVC finalizers (e.g., kubernetes.io/pvc-protection)
215216// - Failure scenarios when Runtime integration is disabled
216217// - Interaction with mocked Kubernetes API using fake client
217- //
218+ //
218219// The test suite includes two primary cases:
219220// 1. Normal deletion with Runtime enabled (expected success)
220221// 2. Deletion failure when Runtime is disabled (simulates missing dependency)
221- //
222+ //
222223// Setup steps:
223224// - Creates test PVCs with protection finalizer to simulate real-world conditions
224225// - Uses deep copies to ensure test data isolation
225226// - Configures fake client with predefined test objects for controlled testing
226227// - Exercises both enabled/disabled Runtime engine variations
227- //
228+ //
228229// This test ensures JuiceFS Engine correctly handles PVC lifecycle operations while respecting Kubernetes resource protection mechanisms.
229230func TestJuiceFSEngine_deleteFusePersistentVolumeClaim (t * testing.T ) {
230231 testPVCInputs := []* v1.PersistentVolumeClaim {
0 commit comments