blob: 9d239d2fe2c7c9fcadbdcf6128004a2821954949 [file] [log] [blame]
Jakub Josef79ecec32017-02-17 14:36:28 +01001package com.mirantis.mk
2
3/**
4 *
5 * Tests providing functions
6 *
7 */
8
9/**
10 * Run e2e conformance tests
11 *
12 * @param k8s_api Kubernetes api address
13 * @param image Docker image with tests
14 */
15def runConformanceTests(master, k8s_api, image) {
16 def salt = new com.mirantis.mk.Salt()
Tatyana Leontovichc73d63c2017-02-28 14:41:38 +020017 salt.runSaltProcessStep(master, 'ctl01*', 'cmd.run', ["docker run --rm --net=host -e API_SERVER=${k8s_api} ${image} >> ${image}.output"])
18}
19
20/**
21 * Copy test output to cfg node
22 *
23 * @param image Docker image with tests
24 */
25def copyTestsOutput(master, image) {
26 def salt = new com.mirantis.mk.Salt()
27 salt.runSaltProcessStep(master, 'cfg01*', 'cmd.run', ["scp ctl01:/root/${image}.output /home/ubuntu/"])
28}
29