Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Comment on lines +47 to +83
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shall we add a makefile to use both in CI and readme?

Otherwise, it might easily get outdated or golangci-lint version might be different, etc.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we necessarily need a makefile, a simple shell script would likely be enough


## Feature Support / Roadmap

### FileSystem Support
Expand Down
Loading