File tree Expand file tree Collapse file tree
tests/templates/kuttl/logging Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -774,10 +774,8 @@ impl HbaseRole {
774774 }
775775 }
776776
777- pub fn metrics_port_name ( & self ) -> & str {
778- match self {
779- _ => HBASE_METRICS_PORT_NAME ,
780- }
777+ pub fn metrics_port_name ( ) -> & ' static str {
778+ HBASE_METRICS_PORT_NAME
781779 }
782780}
783781
Original file line number Diff line number Diff line change @@ -765,7 +765,7 @@ pub fn build_rolegroup_metrics_service(
765765 resolved_product_image : & ResolvedProductImage ,
766766) -> Result < Service , Error > {
767767 let ports = vec ! [ ServicePort {
768- name: Some ( hbase_role . metrics_port_name( ) . to_owned( ) ) ,
768+ name: Some ( HbaseRole :: metrics_port_name( ) . to_owned( ) ) ,
769769 port: i32 :: from( hbase_role. metrics_port( ) ) ,
770770 protocol: Some ( "TCP" . to_owned( ) ) ,
771771 ..ServicePort :: default ( )
Original file line number Diff line number Diff line change @@ -23,9 +23,9 @@ def check_sent_events():
2323 },
2424 )
2525
26- assert (
27- response . status_code == 200
28- ), "Cannot access the API of the vector aggregator."
26+ assert response . status_code == 200 , (
27+ "Cannot access the API of the vector aggregator."
28+ )
2929
3030 result = response .json ()
3131
@@ -35,13 +35,13 @@ def check_sent_events():
3535 componentId = transform ["componentId" ]
3636
3737 if componentId == "filteredInvalidEvents" :
38- assert (
39- sentEvents is None or sentEvents [ "sentEventsTotal" ] == 0
40- ), "Invalid log events were sent."
38+ assert sentEvents is None or sentEvents [ "sentEventsTotal" ] == 0 , (
39+ "Invalid log events were sent."
40+ )
4141 else :
42- assert (
43- sentEvents is not None and sentEvents [ "sentEventsTotal" ] > 0
44- ), f'No events were sent in " { componentId } ".'
42+ assert sentEvents is not None and sentEvents [ "sentEventsTotal" ] > 0 , (
43+ f'No events were sent in " { componentId } ".'
44+ )
4545
4646
4747if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments