Skip to content
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
16 changes: 16 additions & 0 deletions pkg/ddc/alluxio/transform_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,22 @@ func TestTransformShortCircuit(t *testing.T) {
}
}

// TestTransformPodMetadata tests the transformation of Pod metadata (labels and annotations)
// for AlluxioRuntime components. It verifies that common metadata specified in the Runtime's
// PodMetadata is correctly applied to Master, Worker, and Fuse components, while ensuring
// component-specific metadata overrides the common settings when present.
//
// Test cases:
// 1. Set common labels and annotations:
// Verifies that labels/annotations from Runtime.Spec.PodMetadata are propagated to
// all components (Master, Worker, Fuse) when no component-specific metadata exists.
//
// 2. Set master and worker labels/annotations:
// Validates that component-specific metadata in Master/Worker PodMetadata takes precedence
// over common metadata, while Fuse uses common metadata when no Fuse-specific settings exist.
//
// The test checks if the transformed Alluxio configuration matches the expected output
// after applying the metadata transformation rules.
func TestTransformPodMetadata(t *testing.T) {
engine := &AlluxioEngine{Log: fake.NullLogger()}

Expand Down
Loading