Skip to content

Commit

Permalink
Incr 7
Browse files Browse the repository at this point in the history
  • Loading branch information
erikbosch committed Sep 18, 2024
1 parent b168f02 commit f0d3c1e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 15 deletions.
6 changes: 3 additions & 3 deletions databroker-cli/src/kuksa_cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ pub async fn kuksa_main(_cli: Cli) -> Result<(), Box<dyn std::error::Error>> {
}
}
Err(err) => {
cli::print_error(cmd, &format!("Malformed token: {err}"))?
cli::print_error(cmd, format!("Malformed token: {err}"))?
}
}
}
Expand Down Expand Up @@ -350,12 +350,12 @@ pub async fn kuksa_main(_cli: Cli) -> Result<(), Box<dyn std::error::Error>> {
}
}
Err(err) => {
cli::print_error(cmd, &format!("Malformed token: {err}"))?
cli::print_error(cmd, format!("Malformed token: {err}"))?
}
},
Err(err) => cli::print_error(
cmd,
&format!(
format!(
"Failed to open token file \"{token_filename}\": {err}"
),
)?,
Expand Down
6 changes: 3 additions & 3 deletions databroker-cli/src/sdv_cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ pub async fn sdv_main(_cli: Cli) -> Result<(), Box<dyn std::error::Error>> {
}
}
Err(err) => {
cli::print_error(cmd, &format!("Malformed token: {err}"))?
cli::print_error(cmd, format!("Malformed token: {err}"))?
}
}
}
Expand Down Expand Up @@ -295,12 +295,12 @@ pub async fn sdv_main(_cli: Cli) -> Result<(), Box<dyn std::error::Error>> {
}
}
Err(err) => {
cli::print_error(cmd, &format!("Malformed token: {err}"))?
cli::print_error(cmd, format!("Malformed token: {err}"))?
}
},
Err(err) => cli::print_error(
cmd,
&format!(
format!(
"Failed to open token file \"{token_filename}\": {err}"
),
)?,
Expand Down
16 changes: 7 additions & 9 deletions databroker/src/grpc/kuksa_val_v2/val.rs
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@ mod tests {
)])
.await;

return entry_id;
entry_id
}

#[tokio::test]
Expand Down Expand Up @@ -830,8 +830,7 @@ mod tests {
);
}
Err(status) => {
// Handle the error from the publish_value function
assert!(false, "Get failed with status: {:?}", status);
panic!("Get failed with status: {:?}", status);
}
}
}
Expand Down Expand Up @@ -879,8 +878,7 @@ mod tests {
);
}
Err(status) => {
// Handle the error from the publish_value function
assert!(false, "Get failed with status: {:?}", status);
panic!("Get failed with status: {:?}", status);
}
}
}
Expand All @@ -904,7 +902,7 @@ mod tests {

match broker.get_value(get_value_request).await {
Ok(_response) => {
assert!(false, "Did not expect success");
panic!("Did not expect success");
}
Err(status) => {
assert_eq!(status.code(), tonic::Code::Unauthenticated)
Expand Down Expand Up @@ -966,7 +964,7 @@ mod tests {
}
Err(status) => {
// Handle the error from the publish_value function
assert!(false, "Get failed with status: {:?}", status);
panic!("Get failed with status: {:?}", status);
}
}
}
Expand All @@ -993,7 +991,7 @@ mod tests {

match broker.get_value(get_value_request).await {
Ok(_response) => {
assert!(false, "Did not expect success");
panic!("Did not expect success");
}
Err(status) => {
assert_eq!(status.code(), tonic::Code::NotFound)
Expand Down Expand Up @@ -1023,7 +1021,7 @@ mod tests {

match broker.get_value(get_value_request).await {
Ok(_response) => {
assert!(false, "Did not expect success");
panic!("Did not expect success");
}
Err(status) => {
assert_eq!(status.code(), tonic::Code::NotFound)
Expand Down

0 comments on commit f0d3c1e

Please sign in to comment.