Skip to content

Commit d111a36

Browse files
committed
fix integ test
1 parent fa3b4b1 commit d111a36

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

Makefile

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,16 @@ lint:
2424
test-unit:
2525
@PYTHONPATH=. pytest -s api/tests/unit --config-file=pyproject.toml --cov=api --cov-report=html --cov-report=term-missing --cov-branch
2626

27+
TEST_INTEG_ARG := $(word 2,$(MAKECMDGOALS))
28+
TEST_INTEG_SUFFIX := $(if $(TEST_INTEG_ARG),/$(TEST_INTEG_ARG),)
29+
2730
# test-integ -----------------------------------------------------------------------------------------------------------------------------------------
2831
test-integ:
29-
@python cli.py --test-integ
30-
@bash -c 'set -a; . .github/.env.ci; PYTHONPATH=. pytest api/tests/integ --config-file=pyproject.toml --cov=./api --cov-report=xml'
32+
@python cli.py --test-integ && \
33+
set -a; . .github/.env.ci; set +a; \
34+
PYTHONPATH=. pytest api/tests/integ$(TEST_INTEG_SUFFIX) --config-file=pyproject.toml --cov=./api --cov-report=xml;
35+
36+
%:
37+
@:
3138

32-
.PHONY: help test-unit test-integ lint quickstart dev
39+
.PHONY: help quickstart dev lint test-unit test-integ

api/tests/integ/test_search.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def test_search_with_collection_ids_filter(self, collection_id: int, client: Tes
155155

156156
self._create_document_with_chunk(client=client, collection_id=second_collection_id, chunks=[{"content": "Test"}])
157157

158-
data = {"query": "Test", "limit": 10}
158+
data = {"query": "Test", "limit": 100}
159159
response = client.post_without_permissions(url=f"/v1{EndpointRoute.SEARCH}", json=data)
160160
assert response.status_code == 200, response.text
161161
searches = Searches(**response.json())

0 commit comments

Comments
 (0)