moonfire-nvr/db
Scott Lamb d6fa470713 tests and fixes for Writer and Syncer
* separate these out into a new file, writer.rs, as dir.rs was getting
  unwieldy.
* extract traits for the parts of SampleFileDir and std::fs::File they needed;
  set up mock implementations.
* move clock.rs to a new base crate to be accessible from the db crate.
* add tests that exercise all the retry paths.
* bugfix: account for the new recording's bytes when calculating how much to
  delete.
* bugfix: when retrying an unlink failure in collect_garbage, we shouldn't
  warn about all the recordings no longer existing. Do this by retrying each
  step rather than the whole procedure again.
* avoid double-panic scenarios, which I hit while tweaking the mocks. These
  are quite annoying to debug as Rust doesn't print information about either
  panic. I ended up using lldb to get a backtrace. Better to be cautious about
  what we're doing when already panicking.
* give more context on raw::insert_recording errors, which I hit as well while
  tweaking the new tests.
2018-03-07 04:42:46 -08:00
..
testdata initial split of database to a separate crate 2018-02-20 23:15:39 -08:00
upgrade refine 1->3 upgrade process 2018-03-01 09:47:56 -08:00
Cargo.toml tests and fixes for Writer and Syncer 2018-03-07 04:42:46 -08:00
check.rs update "moonfire-nvr check" for new schema 2018-03-01 17:07:42 -08:00
coding.rs initial split of database to a separate crate 2018-02-20 23:15:39 -08:00
db.rs tests and fixes for Writer and Syncer 2018-03-07 04:42:46 -08:00
dir.rs tests and fixes for Writer and Syncer 2018-03-07 04:42:46 -08:00
lib.rs tests and fixes for Writer and Syncer 2018-03-07 04:42:46 -08:00
raw.rs tests and fixes for Writer and Syncer 2018-03-07 04:42:46 -08:00
recording.rs view in-progress recordings! 2018-03-02 15:40:32 -08:00
schema.proto more safety around adding/deleting dirs 2018-03-01 12:24:32 -08:00
schema.rs initial split of database to a separate crate 2018-02-20 23:15:39 -08:00
schema.sql move open_id from recording_playback to recording 2018-02-28 20:52:43 -08:00
testutil.rs tests and fixes for Writer and Syncer 2018-03-07 04:42:46 -08:00
writer.rs tests and fixes for Writer and Syncer 2018-03-07 04:42:46 -08:00