Update Makefile dev bootstrap; fix test (#4582)

Update Makefile rule for backend bootstrap dev environment (uv wasn't
finding Python in env).
Also update test to prevent timing/ordering issues.
This commit is contained in:
Matias Bordese 2024-06-25 11:43:50 -03:00 committed by GitHub
parent 5ca0d13fef
commit f6715e072f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View file

@ -245,7 +245,7 @@ pip-compile-locked-dependencies: ## compile engine requirements.txt files
define backend_command
export `grep -v '^#' $(DEV_ENV_FILE) | xargs -0` && \
export BROKER_TYPE=$(BROKER_TYPE) && \
. ./venv/bin/activate && \
. $(VENV_DIR)/bin/activate && \
cd engine && \
$(1)
endef
@ -253,9 +253,9 @@ endef
backend-bootstrap:
python3.12 -m venv $(VENV_DIR)
$(VENV_DIR)/bin/pip install -U pip wheel uv
$(VENV_DIR)/bin/uv pip sync $(REQUIREMENTS_TXT) $(REQUIREMENTS_DEV_TXT)
$(VENV_DIR)/bin/uv pip sync --python=$(VENV_DIR)/bin/python $(REQUIREMENTS_TXT) $(REQUIREMENTS_DEV_TXT)
@if [ -f $(REQUIREMENTS_ENTERPRISE_TXT) ]; then \
$(VENV_DIR)/bin/uv pip install -r $(REQUIREMENTS_ENTERPRISE_TXT); \
$(VENV_DIR)/bin/uv pip install --python=$(VENV_DIR)/bin/python -r $(REQUIREMENTS_ENTERPRISE_TXT); \
fi
backend-migrate:

View file

@ -80,7 +80,7 @@ def test_list_filters(
def assert_expected(response, expected):
assert response.status_code == status.HTTP_200_OK
returned = [s["id"] for s in response.json().get("results", [])]
assert returned == [s.public_primary_key for s in expected]
assert sorted(returned) == sorted([s.public_primary_key for s in expected])
client = APIClient()
base_url = reverse("api-public:shift_swap-list")