Skip to content

Commit f1cac86

Browse files
committed
Fix tests
1 parent e425d48 commit f1cac86

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

scripts/builder/build.mk

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ POSTMAN_COLLECTION = $(CURDIR)/src/api/tests/feature_tests/postman-collection.js
66
TOOL_VERSIONS_COPY = $(TIMESTAMP_DIR)/tool-versions.copy
77
POETRY_LOCK = $(CURDIR)/poetry.lock
88
INIT_TIMESTAMP = $(CURDIR)/.timestamp/init.timestamp
9-
SRC_FILES = $(shell find src/api src/etl src/layers src/test_helpers -type f -name "*.py" -not -path "*/feature_tests/*" -not -path "*/test_*" -not -path "*/fhir/r4/strict_models.py" -not -path "*/fhir/r4/models.py" -not -path "*/archived_epr/src/*")
9+
SRC_FILES = $(shell find src/api src/etl src/layers src/test_helpers -type f -name "*.py" -not -path "*/feature_tests/*" -not -path "*/test_*" -not -path "*/fhir/r4/strict_models.py" -not -path "*/fhir/r4/models.py" -not -path "*/archived_epr/*")
1010
THIRD_PARTY_DIST = $(CURDIR)/src/layers/third_party/dist
1111
SWAGGER_DIST = $(CURDIR)/infrastructure/swagger/dist
1212
SWAGGER_PUBLIC = $(SWAGGER_DIST)/public/swagger.yaml
@@ -30,8 +30,6 @@ clean--build:
3030
[[ -f $(BUILD_TIMESTAMP) ]] && rm $(BUILD_TIMESTAMP) || :
3131

3232
build: $(BUILD_TIMESTAMP) ## Complete project install and build artifacts for deployment
33-
$(info SRC_FILES = $(SRC_FILES))
34-
@echo "SRC_FILES = $(SRC_FILES)"
3533

3634
$(BUILD_TIMESTAMP): $(BUILD_DEPENDENCIES)
3735
@find $(CURDIR) -name make.py | xargs -n 1 -P 8 -I % bash -c 'poetry run python %'

scripts/builder/lambda_build.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,11 @@ def create_zip_package(
3434

3535

3636
def build(file):
37-
lambda_base_dir = get_base_dir(file)
38-
package_name = lambda_base_dir.name
37+
if "archived_epr" not in file:
38+
lambda_base_dir = get_base_dir(file)
39+
package_name = lambda_base_dir.name
3940

40-
with create_zip_package(
41-
package_name=package_name, base_dir=lambda_base_dir
42-
) as build_dir:
43-
copy_source_code(source_dir=lambda_base_dir, build_dir=build_dir)
41+
with create_zip_package(
42+
package_name=package_name, base_dir=lambda_base_dir
43+
) as build_dir:
44+
copy_source_code(source_dir=lambda_base_dir, build_dir=build_dir)

scripts/test/test.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ test--s3: aws--login ## Run (pytest) tests that require s3 downloads
2828
$(MAKE) _pytest _INTERNAL_FLAGS="-m 's3' --ignore=archived_epr $(_INTERNAL_FLAGS)" _CACHE_CLEAR=$(_CACHE_CLEAR) AWS_ACCESS_KEY_ID=$(AWS_ACCESS_KEY_ID) AWS_SECRET_ACCESS_KEY=$(AWS_SECRET_ACCESS_KEY) AWS_SESSION_TOKEN=$(AWS_SESSION_TOKEN)
2929

3030
test--smoke: aws--login ## Run end-to-end smoke tests (pytest)
31-
AWS_DEFAULT_REGION=$(AWS_DEFAULT_REGION) AWS_ACCESS_KEY_ID=$(AWS_ACCESS_KEY_ID) AWS_SECRET_ACCESS_KEY=$(AWS_SECRET_ACCESS_KEY) AWS_SESSION_TOKEN=$(AWS_SESSION_TOKEN) WORKSPACE=$(WORKSPACE) ACCOUNT=$(ACCOUNT) poetry run python -m pytest $(PYTEST_FLAGS) -m 'smoke' --ignore=src/layers --ignore=src/etl --ignore=archived_epr/src $(_CACHE_CLEAR)
31+
AWS_DEFAULT_REGION=$(AWS_DEFAULT_REGION) AWS_ACCESS_KEY_ID=$(AWS_ACCESS_KEY_ID) AWS_SECRET_ACCESS_KEY=$(AWS_SECRET_ACCESS_KEY) AWS_SESSION_TOKEN=$(AWS_SESSION_TOKEN) WORKSPACE=$(WORKSPACE) ACCOUNT=$(ACCOUNT) poetry run python -m pytest $(PYTEST_FLAGS) -m 'smoke' --ignore=src/layers --ignore=src/etl --ignore=archived_epr/src_old $(_CACHE_CLEAR)
3232

3333
test--%--rerun: ## Rerun failed integration or unit (pytest) tests
3434
$(MAKE) test--$* _INTERNAL_FLAGS="--last-failed --last-failed-no-failures none" _CACHE_CLEAR=$(_CACHE_CLEAR)

0 commit comments

Comments
 (0)