Skip to content

This PR is to add comments to TestSetupMasterInternal in pkg/ddc/jindo/master_internal_test.go #4997

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions pkg/ddc/jindo/master_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ import (
"github.com/fluid-cloudnative/fluid/pkg/utils/helm"
)

// TestSetupMasterInternal tests the behavior of JindoEngine.setupMasterInernal under various Helm release scenarios:
// 1. When no hook is applied to helm.CheckRelease, setupMasterInernal should return an error.
// 2. When helm.CheckRelease is hooked to return exist=true, setupMasterInernal should succeed (skip installation).
// 3. When helm.CheckRelease is hooked to return an error, setupMasterInernal should propagate that error.
// 4. When helm.CheckRelease is hooked to return exist=false, setupMasterInernal proceeds to install:
// 4.1. If helm.InstallRelease is hooked to return an error, setupMasterInernal should return that error.
// 4.2. If helm.InstallRelease is hooked to succeed, setupMasterInernal should complete successfully.

func TestSetupMasterInternal(t *testing.T) {
mockExecCheckReleaseCommonFound := func(name string, namespace string) (exist bool, err error) {
return true, nil
Expand Down
Loading