keep the lib tests' plc lookups on a dead local address
Signed-off-by: dawn <90008@klbr.net>
321 unmodified linesExpand all322323324325326326327328329330298 unmodified linesExpand all321 unmodified linesExpand all}
fn keys_config(root: &std::path::Path) -> ValidatedConfig { let raw = format!( "[knot]\nhostname = \"knot.test\"\nowner = \"did:plc:owner\"\n[repo]\nscan_path = \"{root}\"\n[secrets]\nsealed_key_file = \"{root}/keys.sealed\"\n[output]\nroot = \"{root}\"\n", "[knot]\nhostname = \"knot.test\"\nowner = \"did:plc:owner\"\n[repo]\nscan_path = \"{root}\"\n[secrets]\nsealed_key_file = \"{root}/keys.sealed\"\n[output]\nroot = \"{root}\"\n[atproto]\nplc_directory = \"https://127.0.0.1:9\"\n", root = root.display() ); ValidatedConfig::from_toml(&raw).unwrap()}298 unmodified linesExpand all189 unmodified linesExpand all190191192193194194195196197198123 unmodified linesExpand all3223233243253263263273283293309 unmodified lines189 unmodified linesExpand all use super::*;
fn config(allow_private: bool, crawler: &str) -> ValidatedConfig { let raw = format!( "[knot]\nhostname = \"knot.test\"\nowner = \"did:plc:owner\"\n[repo]\nscan_path = \"r\"\n[secrets]\nsealed_key_file = \"s\"\n[output]\nroot = \"o\"\n[atproto]\nallow_private_addresses = {allow_private}\n[crawl]\nurls = [\"{crawler}\"]\n" "[knot]\nhostname = \"knot.test\"\nowner = \"did:plc:owner\"\n[repo]\nscan_path = \"r\"\n[secrets]\nsealed_key_file = \"s\"\n[output]\nroot = \"o\"\n[atproto]\nplc_directory = \"https://127.0.0.1:9\"\nallow_private_addresses = {allow_private}\n[crawl]\nurls = [\"{crawler}\"]\n" ); ValidatedConfig::from_toml(&raw).unwrap() }
123 unmodified linesExpand all ) .unwrap(); std::os::unix::fs::symlink("generations/g", root.path().join("current")).unwrap(); let raw = format!( "[knot]\nhostname = \"knot.test\"\nowner = \"did:plc:owner\"\n[repo]\nscan_path = \"r\"\n[secrets]\nsealed_key_file = \"s\"\n[output]\nroot = \"{}\"\n", "[knot]\nhostname = \"knot.test\"\nowner = \"did:plc:owner\"\n[repo]\nscan_path = \"r\"\n[secrets]\nsealed_key_file = \"s\"\n[output]\nroot = \"{}\"\n[atproto]\nplc_directory = \"https://127.0.0.1:9\"\n", root.path().display() ); let config = ValidatedConfig::from_toml(&raw).unwrap(); let changed = vec!["did:plc:a".to_owned(), "did:plc:c".to_owned()];9 unmodified lines124 unmodified linesExpand all125126127128129129130131132133784 unmodified linesExpand all124 unmodified linesExpand all}
fn test_config(root: &std::path::Path) -> ValidatedConfig { let raw = format!( "[knot]\nhostname = \"knot.test\"\nowner = \"did:plc:owner\"\n[repo]\nscan_path = \"{root}\"\n[secrets]\nsealed_key_file = \"{root}/keys.sealed\"\n[output]\nroot = \"{root}\"\n", "[knot]\nhostname = \"knot.test\"\nowner = \"did:plc:owner\"\n[repo]\nscan_path = \"{root}\"\n[secrets]\nsealed_key_file = \"{root}/keys.sealed\"\n[output]\nroot = \"{root}\"\n[atproto]\nplc_directory = \"https://127.0.0.1:9\"\n", root = root.display() ); ValidatedConfig::from_toml(&raw).unwrap()}784 unmodified linesExpand all443 unmodified linesExpand all444445446447448449450451452453914 unmodified linesExpand all443 unmodified linesExpand all[secrets]sealed_key_file = "sealed-keys"[output]root = "{}"[atproto]plc_directory = "https://127.0.0.1:9""#, temp.join("output").display() ), )914 unmodified linesExpand all