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

Add control plane integration tests #223

Closed

Conversation

austin-denoble
Copy link
Contributor

Problem

Our Python client doesn't have true integration tests. Currently, we have tests under /integ/test_index.py which mock all the requests and responses and primarily stress the connections between various elements of the client codebase. Fleshing out integration tests would help us have more confidence when making changes to the Python client, especially when involving the network layer.

Solution

The plan is to split between control plane and data plane tests. For PRs I thought it'd be reasonable to split things out, and then finish off with CI changes to bring everything together.

  • Add a new section for integration tests under /tests/integration/control/
  • Implement control plane integration tests:
    • test_create_index.py
    • test_configure_index.py
    • test_describe_index.py
    • test_list_indexes.py

Currently, the entire control plane suite completes in about ~35 seconds or so. sdk-python-testing currently has a Pod Limit of 7, and these seem to complete fine, but I'd like to get quote bumped to reduce possibility of flaking.

Screenshot 2023-10-19 at 1 45 55 PM

**Question: ** Should I look at rolling some collection tests here as well?

Type of Change

  • Infrastructure change (CI configs, etc)

Test Plan

Currently, these tests aren't being run in CI. That will come in a following PR. The environment variables that are used will be setup in GitHub secrets for the repo/workflows.

To test locally, you'll need to set environment variables and then call pytest:

$ export PINECONE_API_KEY="my-api-key"
$ export PINECONE_ENVIRONMENT="my-environment"

$ poetry run pytest tests/integration/control/
...

@jackpertschuk
Copy link
Contributor

is this for new version of the SDKs or old?

@austin-denoble
Copy link
Contributor Author

austin-denoble commented Oct 19, 2023

is this for new version of the SDKs or old?

@jackpertschuk Old technically, but we'll be updating them around the changes for the new SDK.

@jhamon jhamon deleted the adenoble/control-plane-integration-tests branch June 20, 2024 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants