diff --git a/pkg/ddc/jindo/sync_runtime_test.go b/pkg/ddc/jindo/sync_runtime_test.go index 3ddcb2964ba..8d08dd82309 100644 --- a/pkg/ddc/jindo/sync_runtime_test.go +++ b/pkg/ddc/jindo/sync_runtime_test.go @@ -17,62 +17,33 @@ limitations under the License. package jindo import ( + "context" "testing" cruntime "github.com/fluid-cloudnative/fluid/pkg/runtime" ) func TestJindoEngine_SyncRuntime(t *testing.T) { - type fields struct { - // runtime *datav1alpha1.JindoRuntime - // name string - // namespace string - // runtimeType string - // Log logr.Logger - // Client client.Client - // gracefulShutdownLimits int32 - // retryShutdown int32 - // runtimeInfo base.RuntimeInfoInterface - // MetadataSyncDoneCh chan MetadataSyncResult - // cacheNodeNames []string - // Recorder record.EventRecorder - // Helper *ctrl.Helper - } - type args struct { - ctx cruntime.ReconcileRequestContext - } tests := []struct { name string - fields fields - args args wantChanged bool wantErr bool }{ - // TODO: Add test cases. { - name: "default", + name: "default_behavior", wantChanged: false, wantErr: false, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - e := &JindoEngine{ - // runtime: tt.fields.runtime, - // name: tt.fields.name, - // namespace: tt.fields.namespace, - // runtimeType: tt.fields.runtimeType, - // Log: tt.fields.Log, - // Client: tt.fields.Client, - // gracefulShutdownLimits: tt.fields.gracefulShutdownLimits, - // retryShutdown: tt.fields.retryShutdown, - // runtimeInfo: tt.fields.runtimeInfo, - // MetadataSyncDoneCh: tt.fields.MetadataSyncDoneCh, - // cacheNodeNames: tt.fields.cacheNodeNames, - // Recorder: tt.fields.Recorder, - // Helper: tt.fields.Helper, + e := &JindoEngine{} + ctx := cruntime.ReconcileRequestContext{ + Context: context.TODO(), } - gotChanged, err := e.SyncRuntime(tt.args.ctx) + + gotChanged, err := e.SyncRuntime(ctx) + if (err != nil) != tt.wantErr { t.Errorf("JindoEngine.SyncRuntime() error = %v, wantErr %v", err, tt.wantErr) return