Skip to content
Snippets Groups Projects

Prerequisites for reusing `.pattern_tests_template` in Hived and HAF-apps CI

Merged Bartek Wrona requested to merge bw_reusing_pattern_tests_template_defs into develop
@@ -36,7 +36,10 @@ variables:
before_script:
- python3 -m venv venv/
- . venv/bin/activate
- (cd "${POETRY_INSTALL_ROOT_DIR}" && poetry install)
- echo "Entering ${POETRY_INSTALL_ROOT_DIR}"
- cd "${POETRY_INSTALL_ROOT_DIR}"
- poetry install
artifacts:
reports:
junit: $JUNIT_REPORT
@@ -51,11 +54,11 @@ variables:
.pattern_test_executor:
extends: .pytest_based_template
variables:
TESTED_ENDPOINT: "" # To be overrided in derived job
TEST_SUITE: "" # To be overrided in derived job
PATTERN_TESTS_DIR: "" # To be overrided in derived job
DIRECT_CALLS: 0 # To be overrided in derived job
TESTED_ENDPOINT: "" # To be overrided in derived job
TEST_SUITE: "" # To be overrided in derived job
PATTERN_TESTS_DIR: "" # To be overrided in derived job
DIRECT_CALLS: 0 # To be overrided in derived job
script:
# run pattern tests
- cd "${PATTERN_TESTS_DIR}"
@@ -83,8 +86,8 @@ variables:
extends: .pattern_test_executor
variables:
HAF_IMAGE_NAME: "" # Must be overrided at derived job
HAF_APP_IMAGE: "" # Image path name to be used at app testing. App will be instantiated as a service.
HAF_APP_PORT: "" # To be specified by derived job
HAF_APP_IMAGE: "" # Image path name to be used at app testing. App will be instantiated as a service.
HAF_APP_PORT: "" # To be specified by derived job
TESTED_ENDPOINT: app:${HAF_APP_PORT}
services:
- name: ${HAF_IMAGE_NAME}
@@ -126,10 +129,22 @@ variables:
.comparison_tests_template:
extends: .haf_app_pattern_tests_template
variables:
COMPARISON_TESTS_DIR: "" # Must be specified by derived job
HIVED_ENDPOINT: hived-instance:8091
JUNIT_REPORT: "comparsion_tests.xml"
JUNIT_REPORT: "comparsion_tests.xml"
services:
- !reference [.hived_pattern_tests_template, services]
- !reference [.haf_app_pattern_tests_template, services]
script:
- python3 -m pytest -n 8 --ref http://$HIVED_ENDPOINT --test http://$TESTED_ENDPOINT --start 4900000 --stop 4915000 --junitxml=${JUNIT_REPORT}
- cd "${COMPARISON_TESTS_DIR}"
- pytest -n 8 --junitxml="${JUNIT_REPORT}" --ref http://$HIVED_ENDPOINT --test http://$TESTED_ENDPOINT --start 4900000 --stop 4915000
artifacts:
paths:
- "$CI_JOB_NAME"
- "**/from_node.log"
- "**/ah.log"
- "**/*.out.json"
- "${COMPARISON_TESTS_DIR}/comparsion_tests.xml"
Loading