Skip to content

Commit fab2e40

Browse files
APM-6136 modify pipeline test commands
1 parent 5271f8d commit fab2e40

File tree

3 files changed

+18
-14
lines changed

3 files changed

+18
-14
lines changed

azure/templates/e2e.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ steps:
2121
- bash: |
2222
export RELEASE_RELEASEID=$(Build.BuildId)
2323
export SOURCE_COMMIT_ID=$(Build.SourceVersion)
24+
export PROXY_NAME="$(FULLY_QUALIFIED_SERVICE_NAME)"
25+
export APIGEE_ACCESS_TOKEN="$(secret.AccessToken)"
2426
export APIGEE_ENVIRONMENT="$(APIGEE_ENVIRONMENT)"
25-
export SERVICE_BASE_PATH="$(SERVICE_BASE_PATH)"
26-
export STATUS_ENDPOINT_API_KEY="$(status-endpoint-api-key)"
27+
export APIGEE_ORGANIZATION="nhsd-$(APIGEE_ORGANIZATION)"
2728
make -C e2e ${{ parameters.test_type }}
2829
2930
workingDirectory: $(SERVICE_DIR)

e2e/Makefile

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,24 @@ guard-%:
1717
exit 1; \
1818
fi
1919

20-
TEST_CMD := pytest -v \
20+
TEST_CMD := pytest \
2121
--color=yes \
2222
--api-name=sync-wrap \
2323
--proxy-name=$(PROXY_NAME) \
24-
-s
24+
25+
ifdef APIGEE_ORGANIZATION
26+
TEST_CMD += --apigee-organization=$(APIGEE_ORGANIZATION)
27+
endif
2528

2629
test:
27-
$(activate) $(TEST_CMD)
30+
$(activate) $(TEST_CMD) -vs
31+
32+
e2e:
33+
rm -f ../reports/e2e.xml > /dev/null || true
34+
$(activate) coverage run --source ./ --module $(TEST_CMD) -rxs -v --junit-xml=../reports/e2e.xml --ignore .venv || true
35+
@if [[ ! -f ../reports/e2e.xml ]]; then echo report not created; exit 1; fi
2836

29-
#e2e:
30-
# rm -f ../reports/e2e.xml > /dev/null || true
31-
# $(activate) coverage run --source ./ --module pytest -rxs -v --junit-xml=../reports/e2e.xml --ignore .venv || true
32-
# @if [[ ! -f ../reports/e2e.xml ]]; then echo report not created; exit 1; fi
33-
#
34-
#smoketest:
35-
# rm -f ../reports/smoketest.xml > /dev/null || true
36-
# $(activate) coverage run --source ./ --module pytest -m smoketest -rxs -v --junit-xml=../reports/smoketest.xml --ignore .venv || true
37-
# @if [[ ! -f ../reports/smoketest.xml ]]; then echo report not created; exit 1; fi
37+
smoketest:
38+
rm -f ../reports/smoketest.xml > /dev/null || true
39+
$(activate) coverage run --source ./ --module $(TEST_CMD) -m smoketest -rxs -v --junit-xml=../reports/smoketest.xml --ignore .venv || true
40+
@if [[ ! -f ../reports/smoketest.xml ]]; then echo report not created; exit 1; fi

e2e/tests/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)