Skip to content

Commit

Permalink
create index if it doesnt exist
Browse files Browse the repository at this point in the history
  • Loading branch information
George Burton authored and gecBurton committed Jul 17, 2024
1 parent c79a4bc commit e71ac72
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core-api/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ def es_index(env) -> str:
@pytest.fixture(autouse=True)
def create_index(env, es_index):
es: Elasticsearch = env.elasticsearch_client()
es.indices.create(index=es_index)
if not es.indices.exists(index=es_index):
es.indices.create(index=es_index)


@pytest.fixture()
Expand Down

0 comments on commit e71ac72

Please sign in to comment.