Skip to content
Merged
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/runtime_info_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@ func newJindoEngineRT(client client.Client, name string, namespace string, withR
return engine
}

// TestGetRuntimeInfo tests the jindoEngine's getRuntimeInfo method under various scenarios.
// It validates the correct retrieval of runtime information from both existing and non-existing configurations,
// including error handling and nil return checks. Test cases cover:
// - Multiple JindoRuntime instances (hbase, hadoop) in the "fluid" namespace
// - Presence/Absence of runtime information (controlled by withRuntimeInfo flag)
// - Associated DaemonSets and Dataset configurations
// The test uses a fake Kubernetes client with preloaded JindoRuntimes, DaemonSets, and Datasets
// to simulate cluster state and verify expected behaviors.
func TestGetRuntimeInfo(t *testing.T) {
runtimeInputs := []*datav1alpha1.JindoRuntime{
{
Expand Down
Loading