pinecone-io / go-pinecone

Pinecone.io Golang Client
Apache License 2.0
49 stars 9 forks source link

Add Pinecone Local testing support in CI #77

Closed austin-denoble closed 2 months ago

austin-denoble commented 2 months ago

Problem

We want to add CI that validates testing the Go SDK against an instance of pclocal hosted in a Docker container.

Solution

To Do

I'd like to expand the number of different tests we exercise on each index. Specifically:

Type of Change

Test Plan

Make sure the CI workflow passes for this PR.

If you'd like to run the local integration tests locally, you will need to download Docker, and use docker compose up to create the same indexes on your local machine. Once you've done that, you'll need to export environment variables for the different index addresses, along with the dimension.

Here's an example:

export PINECONE_INDEX_URL_POD="http://localhost:5082" PINECONE_INDEX_URL_SERVERLESS="http://localhost:5081" PINECONE_DIMENSION="1536"

Then, you can run the local integration tests directly:

go test -count=1 -v ./pinecone -run TestRunLocalIntegrationSuite -tags=localServer