🐛 bug: fix tests not compiling

main
_ 2021-03-15 19:29:54 +00:00
parent 8a04481236
commit 13c1ddc01a
3 changed files with 12 additions and 12 deletions

View File

@ -290,10 +290,10 @@ mod tests {
dev_mode: Default::default (),
},
port: Some (4000),
servers: vec! [],
scraper_keys: vec! [
servers: Some (vec! []),
scraper_keys: Some (vec! [
self.valid_key.map (|x| key_validity::ScraperKey::new_30_day ("automated test", x.as_bytes ())),
].into_iter ().filter_map (|x| x).collect (),
].into_iter ().filter_map (|x| x).collect ()),
};
let config = config::Config::try_from (config_file).expect ("Can't load config");

View File

@ -34,14 +34,14 @@ async fn main () -> anyhow::Result <()> {
let config_file = ptth_relay::config::file::Config {
iso: Default::default (),
port: Some (relay_port),
servers: vec! [
servers: Some (vec! [
ptth_relay::config::file::Server {
name: server_name.to_string (),
tripcode,
display_name: None,
},
],
scraper_keys: vec! [],
]),
scraper_keys: None,
};
let config = ptth_relay::config::Config::try_from (config_file).expect ("Can't load config");

View File

@ -102,14 +102,14 @@ impl TestingRelay {
let config_file = config::file::Config {
iso: Default::default (),
port: Some (testing_config.relay_port),
servers: vec! [
servers: Some (vec! [
config::file::Server {
name: testing_config.server_name.to_string (),
tripcode,
display_name: None,
},
],
scraper_keys: vec! [],
]),
scraper_keys: None,
};
let cfg = config::Config::try_from (config_file).expect ("Can't load config");
@ -279,10 +279,10 @@ async fn scraper_endpoints () {
dev_mode: Default::default (),
},
port: Some (4001),
servers: vec! [],
scraper_keys: vec! [
servers: None,
scraper_keys: Some (vec! [
key_validity::ScraperKey::new_30_day ("automated testing", b"bogus")
],
]),
};
let config = config::Config::try_from (config_file).expect ("Can't load config");