blob: 6b5ab87ef4ccc0b09dbb359e758aa422e74a8c12 [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') %}
Tatyana Leontovich063d0ff2017-09-05 18:11:55 +03005{% set SL_TEST_TO_RUN = os_env('set SL_TEST_TO_RUN','stacklight_tests/tests/prometheus/test_smoke.py') %}
6
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;
Dennis Dmitrievd7883112018-01-18 00:50:56 +020012 apt-get -y install python-virtualenv;
Dmitry Kalashnikf90ea4c2018-04-11 16:30:00 +040013 virtualenv --system-site-packages venv-stacklight-pytest;
Dennis Dmitrievd7883112018-01-18 00:50:56 +020014 . venv-stacklight-pytest/bin/activate;
Tatyana Leontovich063d0ff2017-09-05 18:11:55 +030015 git clone -b {{ SL_TEST_BRANCH }} {{ SL_TEST_REPO }} /root/stacklight-pytest;
Dennis Dmitrievd7883112018-01-18 00:50:56 +020016 pip install /root/stacklight-pytest;
Tatyana Leontovich063d0ff2017-09-05 18:11:55 +030017 node_name: {{ HOSTNAME_CFG01 }}
18 retry: {count: 1, delay: 1}
19 skip_fail: false
20{%- endmacro %}
21
22
23{%- macro MACRO_CONFIGURE_TESTS() %}
24{#######################################################}
25- description: Configure tests
26 cmd: |
27 set -e;
Tatyana Leontovich7e77fc22018-07-06 13:13:17 +030028 apt-get install -y build-essential python-dev;
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 %}