Skip to content

Commit

Permalink
fix: Add test and other fix for SetResult
Browse files Browse the repository at this point in the history
  • Loading branch information
Blu-J committed Jun 10, 2022
1 parent fa8bb95 commit fe7b202
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions backend/src/config/action.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ impl ConfigActions {
#[derive(Debug, Deserialize, Serialize)]
#[serde(rename_all = "kebab-case")]
pub struct SetResult {
#[serde(default)]
#[serde(deserialize_with = "crate::util::serde::deserialize_from_str_opt")]
#[serde(serialize_with = "crate::util::serde::serialize_display_opt")]
pub signal: Option<Signal>,
Expand Down
10 changes: 10 additions & 0 deletions backend/src/context/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,3 +157,13 @@ impl Context for CliContext {
&self.0.client
}
}
/// When we had an empty proxy the system wasn't working like it used to, which allowed empty proxy
#[test]
fn test_cli_proxy_empty() {
serde_yaml::from_str::<CliContextConfig>(
"
bind_rpc:
",
)
.unwrap();
}

0 comments on commit fe7b202

Please sign in to comment.