From c638b0608b999b358ebb8e38ab50d6b338fe4093 Mon Sep 17 00:00:00 2001 From: lwxin0805 <3090658960@qq.com> Date: Sat, 14 Jun 2025 16:07:45 +0800 Subject: [PATCH] Add Notation to TestSetupMasterInternal in pkg/ddc/jindo/master_internal_test.go . Signed-off-by: lwxin0805 <3090658960@qq.com> --- pkg/ddc/jindo/master_internal_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkg/ddc/jindo/master_internal_test.go b/pkg/ddc/jindo/master_internal_test.go index b8ad8e085dd..0c31a2e410c 100644 --- a/pkg/ddc/jindo/master_internal_test.go +++ b/pkg/ddc/jindo/master_internal_test.go @@ -34,6 +34,15 @@ import ( "github.com/fluid-cloudnative/fluid/pkg/utils/helm" ) +// TestSetupMasterInternal tests the internal setup logic of the JindoEngine's master component. +// This includes testing various scenarios such as: +// - Failure in runtime port allocator +// - Helm release already exists +// - Helm release check error +// - Helm release not found followed by install failure +// - Helm release not found followed by successful install +// Mock hooks are applied to helm.CheckRelease and helm.InstallRelease for each scenario. +// gohook is used for method patching and unhooking during testing. func TestSetupMasterInternal(t *testing.T) { mockExecCheckReleaseCommonFound := func(name string, namespace string) (exist bool, err error) { return true, nil