Skip to content

Commit

Permalink
fix: skip test if abort/append is not supported yet
Browse files Browse the repository at this point in the history
  • Loading branch information
v0y4g3r committed Apr 17, 2023
1 parent d485a72 commit b0c4d0c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion core/tests/behavior/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -584,13 +584,22 @@ 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();
let mut writer = match op.writer(&path).await {
Ok(writer) => writer,
Err(e) => {
assert_eq!(e.kind(), ErrorKind::Unsupported);
return Ok(());
}
};

if let Err(e) = writer.append(content).await {
assert_eq!(e.kind(), ErrorKind::Unsupported);
return Ok(());
}

if let Err(e) = writer.abort().await {
assert_eq!(e.kind(), ErrorKind::Unsupported);
return Ok(());
}

// Aborted writer should not write actual file.
Expand Down

0 comments on commit b0c4d0c

Please sign in to comment.