File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -572,6 +572,13 @@ func TestAlluxioEngine_getGracefulShutdownLimits(t *testing.T) {
572572 }
573573}
574574
575+ // TestAlluxioEngine_getCleanCacheGracePeriodSeconds verifies the behavior of
576+ // the AlluxioEngine.getCleanCacheGracePeriodSeconds() method.
577+ // It covers the following scenarios:
578+ // 1. When no CleanCachePolicy is defined in the runtime spec, the method should return the default value (60 seconds).
579+ // 2. When GracePeriodSeconds is explicitly set in CleanCachePolicy, the method should return the configured value.
580+ // 3. When the runtime object is not found or the GracePeriodSeconds is not defined properly, it should return an error.
581+ // The test uses a fake Kubernetes client initialized with deep-copied runtime objects to simulate the environment.
575582func TestAlluxioEngine_getCleanCacheGracePeriodSeconds (t * testing.T ) {
576583 type fields struct {
577584 runtime * datav1alpha1.AlluxioRuntime
You can’t perform that action at this time.
0 commit comments