@@ -60,36 +60,39 @@ mod tests {
60
60
. merged_config ( & role, & role. rolegroup_ref ( & kafka, "default" ) )
61
61
. unwrap ( ) ;
62
62
63
- assert_eq ! ( merged_config. affinity, StackableAffinity {
64
- pod_affinity: None ,
65
- pod_anti_affinity: Some ( PodAntiAffinity {
66
- preferred_during_scheduling_ignored_during_execution: Some ( vec![
67
- WeightedPodAffinityTerm {
68
- pod_affinity_term: PodAffinityTerm {
69
- label_selector: Some ( LabelSelector {
70
- match_expressions: None ,
71
- match_labels: Some ( BTreeMap :: from( [
72
- ( "app.kubernetes.io/name" . to_string( ) , "kafka" . to_string( ) , ) ,
73
- (
74
- "app.kubernetes.io/instance" . to_string( ) ,
75
- "simple-kafka" . to_string( ) ,
76
- ) ,
77
- (
78
- "app.kubernetes.io/component" . to_string( ) ,
79
- "broker" . to_string( ) ,
80
- )
81
- ] ) )
82
- } ) ,
83
- topology_key: "kubernetes.io/hostname" . to_string( ) ,
84
- ..PodAffinityTerm :: default ( )
85
- } ,
86
- weight: 70
87
- }
88
- ] ) ,
89
- required_during_scheduling_ignored_during_execution: None ,
90
- } ) ,
91
- node_affinity: None ,
92
- node_selector: None ,
93
- } ) ;
63
+ assert_eq ! (
64
+ merged_config. affinity,
65
+ StackableAffinity {
66
+ pod_affinity: None ,
67
+ pod_anti_affinity: Some ( PodAntiAffinity {
68
+ preferred_during_scheduling_ignored_during_execution: Some ( vec![
69
+ WeightedPodAffinityTerm {
70
+ pod_affinity_term: PodAffinityTerm {
71
+ label_selector: Some ( LabelSelector {
72
+ match_expressions: None ,
73
+ match_labels: Some ( BTreeMap :: from( [
74
+ ( "app.kubernetes.io/name" . to_string( ) , "kafka" . to_string( ) , ) ,
75
+ (
76
+ "app.kubernetes.io/instance" . to_string( ) ,
77
+ "simple-kafka" . to_string( ) ,
78
+ ) ,
79
+ (
80
+ "app.kubernetes.io/component" . to_string( ) ,
81
+ "broker" . to_string( ) ,
82
+ )
83
+ ] ) )
84
+ } ) ,
85
+ topology_key: "kubernetes.io/hostname" . to_string( ) ,
86
+ ..PodAffinityTerm :: default ( )
87
+ } ,
88
+ weight: 70
89
+ }
90
+ ] ) ,
91
+ required_during_scheduling_ignored_during_execution: None ,
92
+ } ) ,
93
+ node_affinity: None ,
94
+ node_selector: None ,
95
+ }
96
+ ) ;
94
97
}
95
98
}
0 commit comments