Skip to content

Commit

Permalink
add class scoped index alias fixt
Browse files Browse the repository at this point in the history
  • Loading branch information
babebe committed Jan 31, 2025
1 parent 0d88a45 commit 8d42ab4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions api/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,14 @@ def opportunity_index_alias(search_client, monkeypatch_session):
return alias


@pytest.fixture(scope="class")
def opportunity_search_index_class(search_client, monkeypatch):
# Note we don't actually create anything, this is just a random name
alias = f"test-opportunity-index-alias-{uuid.uuid4().int}"
monkeypatch.setenv("OPPORTUNITY_SEARCH_INDEX_ALIAS", alias)
return alias


def _generate_rsa_key_pair():
# Rather than define a private/public key, generate one for the tests
key = rsa.generate_private_key(public_exponent=65537, key_size=2048)
Expand Down

0 comments on commit 8d42ab4

Please sign in to comment.