Add shared sl tests yaml
Change-Id: Ic9422d44e58e2ce5d08a6371a855b7e60f8766e2
Reviewed-on: https://review.gerrithub.io/377203
Reviewed-by: Tatyanka Leontovich <tleontovich@mirantis.com>
Tested-by: Tatyanka Leontovich <tleontovich@mirantis.com>
diff --git a/tcp_tests/templates/shared-sl-tests.yaml b/tcp_tests/templates/shared-sl-tests.yaml
new file mode 100644
index 0000000..e0f7823
--- /dev/null
+++ b/tcp_tests/templates/shared-sl-tests.yaml
@@ -0,0 +1,34 @@
+{# Collection of sl tests macroses shared across different deployments #}
+
+{% set SL_TEST_BRANCH = os_env('SL_TEST_BRANCH','master') %}
+{% set SL_TEST_REPO = os_env('SL_TEST_REPO','https://github.com/dkalashnik/stacklight-pytest') %}
+{% set SL_TEST_TO_RUN = os_env('set SL_TEST_TO_RUN','stacklight_tests/tests/prometheus/test_smoke.py') %}
+
+{%- macro MACRO_CLONE_SL_TESTS() %}
+{############################################################}
+- description: Clone repo and install tests on cfg node
+ cmd: |
+ set -e;
+ git clone -b {{ SL_TEST_BRANCH }} {{ SL_TEST_REPO }} /root/stacklight-pytest;
+ cd /root/stacklight-pytest;
+ python setup.py sdist;
+ pip install dist/stacklight_tests-1.0.tar.gz --process-dependency-links
+ node_name: {{ HOSTNAME_CFG01 }}
+ retry: {count: 1, delay: 1}
+ skip_fail: false
+{%- endmacro %}
+
+
+{%- macro MACRO_CONFIGURE_TESTS() %}
+{#######################################################}
+- description: Configure tests
+ cmd: |
+ set -e;
+ stl-tests gen-config-mk;
+ cp /usr/local/lib/python2.7/dist-packages/stacklight_tests/fixtures/config.yaml /root/stacklight-pytest/stacklight_tests/fixtures/config.yaml;
+ node_name: {{ HOSTNAME_CFG01 }}
+ retry: {count: 1, delay: 1}
+ skip_fail: false
+{%- endmacro %}
+
+