} ); } #[test] fn config_with_rpc_user_pass() { let tempdir = TempDir::new().unwrap(); let path = tempdir.path().join("ord.yaml"); fs::write( &path, "hidden:\nbitcoin_rpc_user: foo\nbitcoin_rpc_pass: bar", ) .unwrap(); assert_eq!( Arguments::try_parse_from(["ord", "--config", path.to_str().unwrap(), "index", "update"]) .unwrap() .options .load_config() .unwrap(), Config { bitcoin_rpc_user: Some("foo".into()), bitcoin_rpc_pass: Some("bar".into()), ..Default::default() } ); } #[test] fn config_is_loaded_from_config_dir_option_path() { let id = "8d363b28528b0cb86b5fd48615493fb175bdf132d2a3d20b4251bba3f130a5abi0" .parse::<InscriptionId>() .unwrap(); let tempdir = TempDir::new().unwrap(); fs::write( tempdir.path().join("ord.yaml"), format!("hidden:\n- \"{id}\""), ) .unwrap(); assert_eq!( Arguments::try_parse_from([ "ord",
Inscription number 44,981,387
Genesis block 819,057
File type text
File size 1.01 KB
Creation date Nov 30,2023 1:16 am