blob: 00a9bb58b299a2025196132269f9cd0cc9622108 [file] [log] [blame]
Tatyana Leontovich063d0ff2017-09-05 18:11:55 +03001{# Collection of sl tests macroses shared across different deployments #}
2
3{% set SL_TEST_BRANCH = os_env('SL_TEST_BRANCH','master') %}
Dmitry Kalashnikb17ac3d2018-04-06 17:37:57 +04004{% set SL_TEST_REPO = os_env('SL_TEST_REPO','https://github.com/Mirantis/stacklight-pytest') %}
vitalygusev0e57ef62018-11-30 12:13:56 +04005{% set SL_TEST_TO_RUN = os_env('set SL_TEST_TO_RUN','stacklight_tests/tests/test_smoke.py') %}
Tatyana Leontovich063d0ff2017-09-05 18:11:55 +03006
7{%- macro MACRO_CLONE_SL_TESTS() %}
8{############################################################}
Dennis Dmitrievd7883112018-01-18 00:50:56 +02009- description: Install stacklight-pytest into virlual environemnt
Tatyana Leontovich063d0ff2017-09-05 18:11:55 +030010 cmd: |
11 set -e;
Tatyana Leontovich06daf1c2018-12-19 18:56:48 +020012 apt-get install -y build-essential python-dev virtualenv;
Dennis Dmitrievd7883112018-01-18 00:50:56 +020013 apt-get -y install python-virtualenv;
Dmitry Kalashnikf90ea4c2018-04-11 16:30:00 +040014 virtualenv --system-site-packages venv-stacklight-pytest;
Dennis Dmitrievd7883112018-01-18 00:50:56 +020015 . venv-stacklight-pytest/bin/activate;
Tatyana Leontovich063d0ff2017-09-05 18:11:55 +030016 git clone -b {{ SL_TEST_BRANCH }} {{ SL_TEST_REPO }} /root/stacklight-pytest;
Dennis Dmitrievd7883112018-01-18 00:50:56 +020017 pip install /root/stacklight-pytest;
Tatyana Leontovich063d0ff2017-09-05 18:11:55 +030018 node_name: {{ HOSTNAME_CFG01 }}
19 retry: {count: 1, delay: 1}
20 skip_fail: false
21{%- endmacro %}
22
23
24{%- macro MACRO_CONFIGURE_TESTS() %}
25{#######################################################}
26- description: Configure tests
27 cmd: |
28 set -e;
Dennis Dmitrievd7883112018-01-18 00:50:56 +020029 . venv-stacklight-pytest/bin/activate;
Tatyana Leontovich063d0ff2017-09-05 18:11:55 +030030 stl-tests gen-config-mk;
Dennis Dmitrievd7883112018-01-18 00:50:56 +020031 cp venv-stacklight-pytest/lib/python2.7/site-packages/stacklight_tests/fixtures/config.yaml /root/stacklight-pytest/stacklight_tests/fixtures/config.yaml;
Tatyana Leontovich063d0ff2017-09-05 18:11:55 +030032 node_name: {{ HOSTNAME_CFG01 }}
33 retry: {count: 1, delay: 1}
34 skip_fail: false
35{%- endmacro %}