Revert "Revert "fixups""

This reverts commit e2c68d8775.
This commit is contained in:
Rob Walker 2018-08-03 11:06:06 -07:00
parent 5193819d8e
commit 692b125391
5 changed files with 4 additions and 46 deletions

View File

@ -262,16 +262,7 @@ mod tests {
fn tmp_ledger_path(name: &str) -> String {
let keypair = KeyPair::new();
let id = {
let ids: Vec<_> = keypair
.pubkey()
.iter()
.map(|id| format!("{}", id))
.collect();
ids.join("")
};
format!("farf/{}-{}", name, id)
format!("farf/{}-{}", name, keypair.pubkey())
}
#[test]

View File

@ -384,16 +384,7 @@ mod tests {
fn tmp_ledger_path(name: &str) -> String {
let keypair = KeyPair::new();
let id = {
let ids: Vec<_> = keypair
.pubkey()
.iter()
.map(|id| format!("{}", id))
.collect();
ids.join("")
};
format!("farf/{}-{}", name, id)
format!("farf/{}-{}", name, keypair.pubkey())
}
#[test]

View File

@ -39,10 +39,6 @@ fn entry_at(file: &mut File, at: u64) -> io::Result<Entry> {
deserialize_from(file.take(len)).map_err(err_bincode_to_io)
}
//fn next_offset(file: &mut File) -> io::Result<u64> {
// deserialize_from(file.take(SIZEOF_U64)).map_err(err_bincode_to_io)
//}
fn next_entry(file: &mut File) -> io::Result<Entry> {
let len = deserialize_from(file.take(SIZEOF_USIZE)).map_err(err_bincode_to_io)?;
deserialize_from(file.take(len)).map_err(err_bincode_to_io)
@ -441,8 +437,6 @@ mod tests {
assert!(entries0.verify(&id));
}
fn tmp_ledger_path() -> String {}
#[test]
fn test_ledger_reader_writer() {
let ledger_path = tmp_ledger_path("test_ledger_reader_writer");

View File

@ -297,16 +297,7 @@ mod tests {
fn tmp_ledger_path(name: &str) -> String {
let keypair = KeyPair::new();
let id = {
let ids: Vec<_> = keypair
.pubkey()
.iter()
.map(|id| format!("{}", id))
.collect();
ids.join("")
};
format!("farf/{}-{}", name, id)
format!("farf/{}-{}", name, keypair.pubkey())
}
#[test]

View File

@ -177,16 +177,7 @@ pub mod tests {
fn tmp_ledger_path(name: &str) -> String {
let keypair = KeyPair::new();
let id = {
let ids: Vec<_> = keypair
.pubkey()
.iter()
.map(|id| format!("{}", id))
.collect();
ids.join("")
};
format!("farf/{}-{}", name, id)
format!("farf/{}-{}", name, keypair.pubkey())
}
/// Test that message sent from leader to target1 and replicated to target2