abyssnlp commented on issue #81:
URL: https://github.com/apache/hudi-rs/issues/81#issuecomment-2256795432

   Sorry about delay. 
   Thanks for pointing to that. So we can mount the existing tables under 
[here](https://github.com/apache/hudi-rs/tree/main/crates/tests/data/tables) 
into the container before running the tests.
   
   Something like:
   ```rust
   
.with_mount(Mount::bind_mount(canonicalize(Path::new("tests/data"))?.into_os_string().into_string().unwrap(),
   ```
   
   However something that I found out about testcontainers  in Rust is that it 
doesn't support reusing the container for multiple tests so the integration 
tests would be for ex. in a single test function. More about it 
[here](https://github.com/testcontainers/testcontainers-rs/issues/354). There 
are also 
[workarounds](https://gist.github.com/vinicius73/26480c792c888ef185582c14f24e96d5).
 Alternative would be to use `docker-compose` to spin up minio before running 
integration tests and spin it down after. 
   
   So this is how I'm thinking about approaching it:
   - (optional) `./docker-compose.yaml` for spinning up required containers for 
MinIO
   - `crates/tests/src/common.rs` - some utility code for ex. to create an s3 
bucket, put the pre-generated tables
   - `crates/tests/src/integration_test.rs` - spin up minio using 
testcontainers and run integration tests 
   - Integration tests are marked as a separate feature (`integration_test`) so 
they can be run separately
   
   I had some questions as well. 
   - Does this approach make sense? Would love to hear what you think
   - Do we plan on also running integration tests for Azure and GCP? 
   
   
   


-- 
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]

Reply via email to