# Development instructions
## Running Tests
Tests can be run using `cargo`
```shell
cargo test
```
## Running Storage Integration Tests
By default, storage integration tests are not run. These test use the `testcontainers` crate to start up a local MinIO server using docker on port 9000.
To run them you will need to set `TEST_STORAGE_INTEGRATION`:
```shell
TEST_STORAGE_INTEGRATION=1 cargo test
```
For some of the tests, [snapshots](https://datafusion.apache.org/contributor-guide/testing.html#snapshot-testing) are used.
### AWS
S3 integration is tested against [Minio](https://github.com/minio/minio) with [TestContainers](https://github.com/testcontainers/testcontainers-rs)
This requires Docker to be running on your machine and port 9000 to be free.
If you see an error mentioning "failed to load IMDS session token" such as
> ---- object_storage::tests::s3_object_store_builder_resolves_region_when_none_provided stdout ----
> Error: ObjectStore(Generic { store: "S3", source: "Error getting credentials from provider: an error occurred while loading credentials: failed to load IMDS session token" })
You my need to disable trying to fetch S3 credentials from the environment using the `AWS_EC2_METADATA_DISABLED`, for example:
> $ AWS_EC2_METADATA_DISABLED=true TEST_STORAGE_INTEGRATION=1 cargo test