This directory contains tools for building and testing the Iceberg C API integration test.
./run_integration_test.sh
This script will:
- Build the Rust library
- Build the integration test
- Run the integration test
- Show colored output with status messages
make all
make build-lib
make build-test
make build
make test
make clean
make clean-all
make help
The integration test is designed to fail with a permission error when run without proper S3 credentials. This is expected behavior and indicates that:
- The C API is working correctly
- The S3 path handling is functioning properly
- The integration between Rust and C is successful
The test will fail with an error like:
S3Error { code: "NoSuchBucket", message: "The specified bucket does not exist" }
This confirms that the API is properly accessible from C code and the S3 path construction is working correctly.
Makefile
- Build system for the integration testrun_integration_test.sh
- Bash script for building and running the testtests/integration_test.c
- C integration testinclude/iceberg_rust_ffi.h
- C API header filesrc/lib.rs
- Rust implementation of the C API
The integration test requires AWS S3 credentials and configuration. You can set these in several ways:
Create a .env
file in the project root with your AWS configuration:
AWS_ENDPOINT_URL=http://localhost:9000
AWS_ACCESS_KEY_ID=your_access_key_here
AWS_SECRET_ACCESS_KEY=your_secret_key_here
AWS_REGION=us-east-1
export AWS_ENDPOINT_URL="http://localhost:9000"
export AWS_ACCESS_KEY_ID="your_access_key"
export AWS_SECRET_ACCESS_KEY="your_secret_key"
export AWS_REGION="us-east-1"
AWS_ENDPOINT_URL="http://localhost:9000" \
AWS_ACCESS_KEY_ID="your_access_key" \
AWS_SECRET_ACCESS_KEY="your_secret_key" \
AWS_REGION="us-east-1" \
./integration_test
./run_with_env.sh
- Rust and Cargo
- GCC compiler
- Standard C libraries (pthread, dl, m)
- AWS S3 credentials (for actual S3 access)