Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3497585
D4225.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
694 B
Referenced Files
None
Subscribers
None
D4225.diff
View Options
diff --git a/services/commtest/tests/lib/tools.rs b/services/commtest/tests/lib/tools.rs
new file mode 100644
--- /dev/null
+++ b/services/commtest/tests/lib/tools.rs
@@ -0,0 +1,19 @@
+use bytesize::ByteSize;
+
+#[allow(dead_code)]
+pub fn generate_nbytes(number_of_bytes: usize, predefined_byte_value: Option<u8>) -> Vec<u8> {
+ let byte_value = predefined_byte_value.unwrap_or(b'A');
+ return vec![byte_value; number_of_bytes];
+}
+
+#[derive(
+ Debug, derive_more::Display, derive_more::From, derive_more::Error,
+)]
+pub enum Error {
+ #[display(...)]
+ Proto(std::io::Error),
+ #[display(...)]
+ Tonic(tonic::transport::Error),
+ #[display(...)]
+ TonicStatus(tonic::Status),
+}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 20, 7:12 PM (17 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2679112
Default Alt Text
D4225.diff (694 B)
Attached To
Mode
D4225: [services] Tests - Add tools
Attached
Detach File
Event Timeline
Log In to Comment