Xuanwo commented on code in PR #3079:
URL:
https://github.com/apache/incubator-opendal/pull/3079#discussion_r1328211128
##########
.github/workflows/fs_write_full_disk.yml:
##########
@@ -0,0 +1,35 @@
+name: Fs write full disk
+
+on:
+ push:
+ branches:
+ - main
+
+jobs:
+ test:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v2
+
+ - name: Create disk image
+ run: |
+ fallocate -l 512K disk.img
+ mkfs disk.img
+
+ - name: Mount disk image
+ run: |
+ mkdir ./td
+ sudo mount -o loop disk.img ./td
+
+ - name: Set permissions
+ run: chmod a+wr ./td
+
+ # Add more steps for testing as needed
Review Comment:
In this PR, you already setup a test env. We should write some rust code
that do test to make sure our code works as expected.
For example:
```rust
#[tokio::test]
async fn test_file_write_on_full_disk() {
let data = [96u8; 1024 * 512]; // The writable was smaller than 512KB
op.write("/test", data.to_vec()).await.unwrap();
}
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]