Skip to content
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

Add comments to TestSyncScheduleInfoToCacheNodes in pkg/ddc/alluxio/node_test.go. #4812

Open
CxLnjucs opened this issue Mar 24, 2025 · 0 comments · May be fixed by #4814
Open

Add comments to TestSyncScheduleInfoToCacheNodes in pkg/ddc/alluxio/node_test.go. #4812

CxLnjucs opened this issue Mar 24, 2025 · 0 comments · May be fixed by #4814

Comments

@CxLnjucs
Copy link

Which function do you want to add comments to?

TestSyncScheduleInfoToCacheNodes in pkg/ddc/alluxio/node_test.go

What comments do you want to add?

// TestSyncScheduleInfoToCacheNodes tests the behavior of the SyncScheduleInfoToCacheNodes method 
// for AlluxioEngine, ensuring it correctly labels Kubernetes nodes based on pod scheduling.
//
// This test covers multiple scenarios:
// - "create": Ensures labels are added to nodes where pods are scheduled.
// - "add": Verifies label addition when new pods/nodes are involved.
// - "noController": Checks behavior when pods lack a controller reference (should not label).
// - "deprecated": Tests legacy deployment via DaemonSet and ensures no labels are added.
//
// The test sets up a fake Kubernetes client populated with a combination of StatefulSets,
// DaemonSets, Pods, and Nodes for each test case. It invokes SyncScheduleInfoToCacheNodes()
// and validates that node labels are correctly synchronized with expected node names.
// Discrepancies between expected and actual labeled nodes trigger test failures.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant