Skip to content

Commit 04ae9f1

Browse files
committed
pre commit
1 parent 8dfd7d6 commit 04ae9f1

3 files changed

Lines changed: 12 additions & 14 deletions

File tree

rust/operator-binary/src/crd/mod.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff 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

rust/operator-binary/src/hbase_controller.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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()

tests/templates/kuttl/logging/test_log_aggregation.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff 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

4747
if __name__ == "__main__":

0 commit comments

Comments
 (0)