Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3499642
D4275.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
948 B
Referenced Files
None
Subscribers
None
D4275.diff
View Options
diff --git a/services/commtest/tests/blob/get.rs b/services/commtest/tests/blob/get.rs
new file mode 100644
--- /dev/null
+++ b/services/commtest/tests/blob/get.rs
@@ -0,0 +1,29 @@
+#[path = "./blob_utils.rs"]
+mod blob_utils;
+#[path = "../lib/tools.rs"]
+mod tools;
+
+use tonic::Request;
+
+use crate::blob_utils::{proto::GetRequest, BlobData, BlobServiceClient};
+use crate::tools::Error;
+
+pub async fn run(
+ client: &mut BlobServiceClient<tonic::transport::Channel>,
+ blob_data: &BlobData,
+) -> Result<Vec<usize>, Error> {
+ let cloned_holder = blob_data.holder.clone();
+ println!("get {}", cloned_holder);
+
+ let response = client
+ .get(Request::new(GetRequest {
+ holder: cloned_holder,
+ }))
+ .await?;
+ let mut inbound = response.into_inner();
+ let mut sizes: Vec<usize> = Vec::new();
+ while let Some(response) = inbound.message().await? {
+ sizes.push(response.data_chunk.len());
+ }
+ Ok(sizes)
+}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 20, 11:48 PM (17 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2682203
Default Alt Text
D4275.diff (948 B)
Attached To
Mode
D4275: [services] Tests - Blob - Add Get
Attached
Detach File
Event Timeline
Log In to Comment