MCPcopy Index your code
hub / github.com/endbasic/endbasic / random_file

Method random_file

client/src/cloud.rs:575–579  ·  view source on GitHub ↗

Generates a random filename and its content for testing, and makes sure the file gets deleted during cleanup in case the test didn't do it on its own.

(&mut self)

Source from the content-addressed store, hash-verified

573 /// Generates a random filename and its content for testing, and makes sure the file gets
574 /// deleted during cleanup in case the test didn't do it on its own.
575 pub(crate) fn random_file(&mut self) -> (String, Vec<u8>) {
576 let filename = format!("file-{}", rand::random::<u64>());
577 let content = format!("Test content for {}", filename);
578 (filename, content.into_bytes())
579 }
580 }
581}
582

Callers 1

runFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected