Skip to content

Commit

Permalink
conf: fix warnings in tests
Browse files Browse the repository at this point in the history
Signed-off-by: Vincenzo Palazzo <[email protected]>
  • Loading branch information
vincenzopalazzo committed Feb 14, 2024
1 parent 5cf90b9 commit 0e8f3d9
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions conf/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@ mod tests {
fn flush_conf_one() {
let path = get_conf_path();
let mut conf = CLNConf::new(path.to_string(), false);
conf.add_conf("plugin", "/some/path");
conf.add_conf("network", "bitcoin");
conf.add_conf("plugin", "/some/path").unwrap();
conf.add_conf("network", "bitcoin").unwrap();
let result = conf.flush();
assert!(result.is_ok());

Expand All @@ -282,9 +282,9 @@ mod tests {
fn flush_conf_two() {
let path = get_conf_path();
let mut conf = CLNConf::new(path.to_string(), false);
conf.add_conf("plugin", "/some/path");
conf.add_conf("plugin", "foo");
conf.add_conf("network", "bitcoin");
conf.add_conf("plugin", "/some/path").unwrap();
conf.add_conf("plugin", "foo").unwrap();
conf.add_conf("network", "bitcoin").unwrap();
let result = conf.flush();
assert!(result.is_ok());

Expand All @@ -303,10 +303,10 @@ mod tests {
fn flush_conf_three() {
let path = get_conf_path();
let mut conf = CLNConf::new(path.to_string(), false);
conf.add_conf("network", "bitcoin");
conf.add_conf("plugin", "/some/path");
conf.add_conf("plugin", "/some/other/path");
conf.rm_conf("plugin", None);
conf.add_conf("network", "bitcoin").unwrap();
conf.add_conf("plugin", "/some/path").unwrap();
conf.add_conf("plugin", "/some/other/path").unwrap();
conf.rm_conf("plugin", None).unwrap();
let result = conf.flush();
assert!(result.is_ok());

Expand All @@ -325,10 +325,10 @@ mod tests {
fn flush_conf_four() {
let path = get_conf_path();
let mut conf = CLNConf::new(path.to_string(), false);
conf.add_conf("network", "bitcoin");
conf.add_conf("plugin", "/some/path");
conf.add_conf("plugin", "/some/other/path");
conf.rm_conf("plugin", Some("/some/other/path"));
conf.add_conf("network", "bitcoin").unwrap();
conf.add_conf("plugin", "/some/path").unwrap();
conf.add_conf("plugin", "/some/other/path").unwrap();
conf.rm_conf("plugin", Some("/some/other/path")).unwrap();
let result = conf.flush();
assert!(result.is_ok());

Expand Down

0 comments on commit 0e8f3d9

Please sign in to comment.