MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_sink_discards_output

Function test_sink_discards_output

atomic-core/src/output/mod.rs:678–687  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

676
677 #[test]
678 fn test_sink_discards_output() {
679 use std::io::Write;
680
681 let sink = Sink::new();
682 assert!(!sink.is_writable("/any/path").unwrap());
683
684 let mut writer = sink.write_file("/test", Inode::ROOT).unwrap();
685 writer.write_all(b"discarded").unwrap();
686 // No error, but nothing stored
687 }
688}

Callers

nothing calls this directly

Calls 2

unwrapMethod · 0.45
write_fileMethod · 0.45

Tested by

no test coverage detected