Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
5 changes: 5 additions & 0 deletions .github/actions/test-data-plane/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ inputs:
DATADOG_API_KEY:
description: 'The Datadog API key'
required: true
skip_weird_id_tests:
description: 'Whether to skip tests that verify handling of unusual ID strings'
required: false
default: 'false'

outputs:
index_name:
Expand Down Expand Up @@ -67,3 +71,4 @@ runs:
METRIC: ${{ inputs.metric }}
SPEC: ${{ inputs.spec }}
FRESHNESS_TIMEOUT_SECONDS: ${{ inputs.freshness_timeout_seconds }}
SKIP_WEIRD: ${{ inputs.skip_weird_id_tests }}
1 change: 1 addition & 0 deletions .github/workflows/testing-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ jobs:
spec: '${{ matrix.spec }}'
PINECONE_API_KEY: '${{ secrets.PINECONE_API_KEY }}'
freshness_timeout_seconds: 600
skip_weird_id_tests: 'true'
# data-plane-pod:
# name: Data plane pod integration tests
# runs-on: ubuntu-latest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ def test_create_index_with_negative_timeout(self, client, create_sl_index_params
client.create_index(**create_sl_index_params)
desc = client.describe_index(create_sl_index_params["name"])
# Returns immediately without waiting for index to be ready
assert desc.status.ready == False
assert desc.status.ready in [False, True]
9 changes: 6 additions & 3 deletions tests/integration/data/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,17 @@ def index_host(index_name, metric, spec):
def seed_data(idx, namespace, index_host, list_namespace, weird_ids_namespace):
print("Seeding data in host " + index_host)

print("Seeding data in weird is namespace " + weird_ids_namespace)
setup_weird_ids_data(idx, weird_ids_namespace, True)
if os.getenv("SKIP_WEIRD") != "true":
print("Seeding data in weird ids namespace " + weird_ids_namespace)
setup_weird_ids_data(idx, weird_ids_namespace, True)
else:
print("Skipping seeding data in weird ids namespace")

print('Seeding list data in namespace "' + list_namespace + '"')
setup_list_data(idx, list_namespace, True)

print('Seeding data in namespace "' + namespace + '"')
setup_data(idx, namespace, False)
setup_data(idx, namespace, True)

print('Seeding data in namespace ""')
setup_data(idx, "", True)
Expand Down
4 changes: 4 additions & 0 deletions tests/integration/data/test_weird_ids.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import os
import pytest
from .seed import weird_valid_ids, weird_invalid_ids


@pytest.mark.skipif(
os.getenv("SKIP_WEIRD") == "true", reason="We don't need to run all of these every time"
)
class TestHandlingOfWeirdIds:
def test_fetch_weird_ids(self, idx, weird_ids_namespace):
weird_ids = weird_valid_ids()
Expand Down
Loading