Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Centralize Go test suite #48

Merged
merged 33 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
fbe03b0
Save work
aulorbe Jul 19, 2024
58a7f90
Save work
aulorbe Jul 20, 2024
b999395
Got pods working, provided index does not already exist
aulorbe Jul 20, 2024
3d551e4
Save work
aulorbe Jul 22, 2024
317a661
Got most things to work
aulorbe Jul 22, 2024
8016f9d
Holy crap it is working
aulorbe Jul 22, 2024
17e7f35
All tests working for index_connection now
aulorbe Jul 22, 2024
e7d8985
Update CI
aulorbe Jul 22, 2024
146d041
Update env var to correct
aulorbe Jul 22, 2024
4d87263
Update env var name in client_test.go
aulorbe Jul 23, 2024
f270ea4
Merge branch 'main' into Audrey/integration-tests
aulorbe Jul 23, 2024
f4bf712
Move index deletion process to teardown
aulorbe Jul 23, 2024
ff07545
Try to force no caching and tests to run sequentially
aulorbe Jul 23, 2024
80d338b
Try to just run index_connection tests
aulorbe Jul 23, 2024
3994fa1
gofmt
aulorbe Jul 23, 2024
e8d814e
Remove test for a diff pr
aulorbe Jul 23, 2024
b59874b
cleanup
aulorbe Jul 23, 2024
7cd2da1
remove changes to client_test
aulorbe Jul 23, 2024
9b086f4
remove changes to client_test
aulorbe Jul 23, 2024
1aadcdb
Try to remove content-type header to see what happens
aulorbe Jul 24, 2024
eab6b0b
Remove hard-coded env vars
aulorbe Jul 24, 2024
ce7cd8b
Randomize Array generation funcs
aulorbe Jul 24, 2024
e3aa2bf
Make naming more descriptive
aulorbe Jul 24, 2024
ac4d29d
pull out test suite into own file to use for all tests
aulorbe Jul 25, 2024
e46d008
index_connection tests working
aulorbe Jul 25, 2024
5bdf6d0
New arch for centralized go testing
aulorbe Jul 25, 2024
5630a58
Update CI
aulorbe Jul 25, 2024
600c06b
Update .env part of README
aulorbe Jul 26, 2024
8b79a56
Experiment with condensing names into simply ts.IdxName
aulorbe Jul 26, 2024
b91dfa9
Update struct in experimentation
aulorbe Jul 26, 2024
cf5d0eb
Cleanup
aulorbe Jul 26, 2024
517e8ed
New setup, global RunSuites so no duplication, yay!
aulorbe Jul 26, 2024
bc8a4f5
Remove integration-test-only command bc no longer works
aulorbe Jul 26, 2024
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
2 changes: 0 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
PINECONE_API_KEY="<Project API Key>"
TEST_PODS_INDEX_NAME="<Pod based Index name>"
TEST_SERVERLESS_INDEX_NAME="<Serverless based Index name>"
Comment on lines -2 to -3
Copy link
Contributor Author

Choose a reason for hiding this comment

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

buh bai

Copy link
Contributor

Choose a reason for hiding this comment

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

👋

5 changes: 2 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ jobs:
run: |
go get ./pinecone
- name: Run tests
run: go test ./pinecone
# run: go test -count=1 -v ./pinecone
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We will re-enable this (and remove the line below) once the tests for client are working

Copy link
Contributor

Choose a reason for hiding this comment

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

Would it make sense to just do that in this PR as well rather than having tests commented out between cycles?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah -- lemme rebase your changes (where you added the new env vars for the client integration tests) into mine once you merge, and then it'll be done

run: go test -count=1 -v -run IndexConnection ./pinecone
env:
TEST_PODS_INDEX_NAME: ${{ secrets.TEST_PODS_INDEX_NAME }}
TEST_SERVERLESS_INDEX_NAME: ${{ secrets.TEST_SERVERLESS_INDEX_NAME }}
PINECONE_API_KEY: ${{ secrets.API_KEY }}
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@
Official Pinecone Go Client

## Documentation

To see the latest documentation on `main`, visit https://pkg.go.dev/github.com/pinecone-io/go-pinecone@main/pinecone.

To see the latest versioned-release's documentation, visit https://pkg.go.dev/github.com/pinecone-io/go-pinecone/pinecone.
To see the latest versioned-release's documentation,
visit https://pkg.go.dev/github.com/pinecone-io/go-pinecone/pinecone.

## Features

Expand Down Expand Up @@ -101,7 +103,7 @@ Then, execute `just bootstrap` to install the necessary Go packages
### .env Setup

To avoid race conditions or having to wait for index creation, the tests require a project with at least one pod index
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I think we can remove this whole first part since it's not longer true that we're avoiding waiting for indexes to create.

and one serverless index. Copy the api key and index names to a `.env` file. See `.env.example` for a template.
and one serverless index. Copy the api key to a `.env` file. See `.env.example` for a template.

### API Definitions submodule

Expand All @@ -111,7 +113,8 @@ The API Definitions are in a private submodule. To checkout or update the submod
git submodule update --init --recursive
```

For working with submodules, see the [Git Submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules) documentation.
For working with submodules, see the [Git Submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules)
documentation.

### Just commands

Expand Down
1 change: 1 addition & 0 deletions pinecone/client_test_2.go
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package pinecone
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this can be removed, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(I know this file is renamed, but answering anyways -- apparently no it needs to be there (says my IDE))

Loading
Loading