You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "Xuanwo (via GitHub)" <gi...@apache.org> on 2023/04/17 09:39:49 UTC
[GitHub] [incubator-opendal] Xuanwo commented on a diff in pull request #2018: feat: add behavioral test for Write::abort
Xuanwo commented on code in PR #2018:
URL: https://github.com/apache/incubator-opendal/pull/2018#discussion_r1168435008
##########
core/tests/behavior/write.rs:
##########
@@ -578,6 +579,25 @@ pub async fn test_read_with_special_chars(op: Operator) -> Result<()> {
Ok(())
}
+// Delete existing file should succeed.
+pub async fn test_abort_writer(op: Operator) -> Result<()> {
+ let path = uuid::Uuid::new_v4().to_string();
+ let (content, _) = gen_bytes();
+
+ let mut writer = op.writer(&path).await.unwrap();
+ if let Err(e) = writer.append(content).await {
+ assert_eq!(e.kind(), ErrorKind::Unsupported);
Review Comment:
We should skip the entire test if `append` or `abort` not supported.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org