zeroshade commented on code in PR #732: URL: https://github.com/apache/iceberg-go/pull/732#discussion_r2813905702
########## README.md: ########## @@ -34,6 +34,51 @@ $ git clone https://github.com/apache/iceberg-go.git $ cd iceberg-go/cmd/iceberg && go build . ``` +## Running Tests + +### Unit tests + +Run all unit tests: + +```shell +go test ./... +``` + +### Linting + +Run [golangci-lint](https://golangci-lint.run/) (matches CI): + +```shell +golangci-lint run --timeout=10m +``` + +### Integration tests +1. Start the docker containers using docker compose. + + ```shell + docker compose -f internal/recipe/docker-compose.yml up -d + sleep 10 + docker compose -f internal/recipe/docker-compose.yml exec -T spark-iceberg ipython ./provision.py + sleep 10 + ``` + +2. export the required environment variables. + + ```shell + export AWS_S3_ENDPOINT=http://$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' minio):9000 + export AWS_REGION=us-east-1 + export SPARK_CONTAINER_ID=$(docker ps -qf 'name=spark-iceberg') + export DOCKER_API_VER=$(docker version -f '{{.Server.APIVersion}}') + ``` + +3. Run the tests. + ```shell + go test -tags=integration -v -run="^TestScanner" ./table + go test -tags=integration -v ./io + go test -tags=integration -v -run="^TestRestIntegration$" ./catalog/rest + go test -tags=integration -v -run="^TestSparkIntegration" ./table + ``` Review Comment: I don't think we necessarily need a makefile, a simple shell script would likely be enough -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
