Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/ofborg
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 17f13b6e7d17
Choose a base ref
...
head repository: NixOS/ofborg
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: b882a7a01c95
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Aug 8, 2018

  1. Unique vars

    grahamc committed Aug 8, 2018

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    grahamc Graham Christensen
    Copy the full SHA
    b882a7a View commit details
Showing with 15 additions and 15 deletions.
  1. +15 −15 ofborg/src/tasks/log_message_collector.rs
30 changes: 15 additions & 15 deletions ofborg/src/tasks/log_message_collector.rs
Original file line number Diff line number Diff line change
@@ -456,18 +456,18 @@ mod tests {
);
}

let mut pr = p.path();
let mut s = String::new();
pr.push("routing-key-foo/attempt-id-foo.metadata.json");
File::open(pr).unwrap().read_to_string(&mut s).unwrap();
assert_eq!(&s, "{\"system\":\"foobar-x8664\",\"identity\":\"my-identity\",\"attempt_id\":\"my-attempt-id\",\"attempted_attrs\":[\"foo\"],\"skipped_attrs\":[\"bar\"]}");
let mut prm = p.path();
let mut sm = String::new();
prm.push("routing-key-foo/attempt-id-foo.metadata.json");
File::open(prm).unwrap().read_to_string(&mut sm).unwrap();
assert_eq!(&sm, "{\"system\":\"foobar-x8664\",\"identity\":\"my-identity\",\"attempt_id\":\"my-attempt-id\",\"attempted_attrs\":[\"foo\"],\"skipped_attrs\":[\"bar\"]}");


let mut pr = p.path();
let mut s = String::new();
pr.push("routing-key-foo/attempt-id-foo");
File::open(pr).unwrap().read_to_string(&mut s).unwrap();
assert_eq!(&s, "line-1\n\n\n\nline-5\n");
let mut prf = p.path();
let mut sf = String::new();
prf.push("routing-key-foo/attempt-id-foo");
File::open(prf).unwrap().read_to_string(&mut sf).unwrap();
assert_eq!(&sf, "line-1\n\n\n\nline-5\n");


let mut pr = p.path();
@@ -476,10 +476,10 @@ mod tests {
File::open(pr).unwrap().read_to_string(&mut s).unwrap();
assert_eq!(&s, "\n\nline-3\n");

let mut pr = p.path();
let mut s = String::new();
pr.push("routing-key-foo/attempt-id-foo.result.json");
File::open(pr).unwrap().read_to_string(&mut s).unwrap();
assert_eq!(&s, "{\"repo\":{\"owner\":\"NixOS\",\"name\":\"ofborg\",\"full_name\":\"NixOS/ofborg\",\"clone_url\":\"https://github.com/nixos/ofborg.git\"},\"pr\":{\"target_branch\":\"scratch\",\"number\":42,\"head_sha\":\"6dd9f0265d52b946dd13daf996f30b64e4edb446\"},\"system\":\"x86_64-linux\",\"output\":[],\"attempt_id\":\"attempt-id-foo\",\"request_id\":\"bogus-request-id\",\"success\":true,\"status\":\"Success\",\"skipped_attrs\":[\"bar\"],\"attempted_attrs\":[\"foo\"]}");
let mut prr = p.path();
let mut sr = String::new();
prr.push("routing-key-foo/attempt-id-foo.result.json");
File::open(prr).unwrap().read_to_string(&mut sr).unwrap();
assert_eq!(&sr, "{\"repo\":{\"owner\":\"NixOS\",\"name\":\"ofborg\",\"full_name\":\"NixOS/ofborg\",\"clone_url\":\"https://github.com/nixos/ofborg.git\"},\"pr\":{\"target_branch\":\"scratch\",\"number\":42,\"head_sha\":\"6dd9f0265d52b946dd13daf996f30b64e4edb446\"},\"system\":\"x86_64-linux\",\"output\":[],\"attempt_id\":\"attempt-id-foo\",\"request_id\":\"bogus-request-id\",\"success\":true,\"status\":\"Success\",\"skipped_attrs\":[\"bar\"],\"attempted_attrs\":[\"foo\"]}");
}
}