Merge "Fix depths for up(down)load in execute_commands.py"
diff --git a/jobs/pipelines/swarm-testrail-report.groovy b/jobs/pipelines/swarm-testrail-report.groovy
index 059eef7..3849e16 100644
--- a/jobs/pipelines/swarm-testrail-report.groovy
+++ b/jobs/pipelines/swarm-testrail-report.groovy
@@ -57,12 +57,15 @@
def tempest_report_name = sh(script: "find ${PARENT_WORKSPACE} -name \"report_*.xml\"", returnStdout: true)
// k8s_conformance_report_name =~ conformance_result.xml
def k8s_conformance_report_name = sh(script: "find ${PARENT_WORKSPACE} -name \"conformance_result.xml\"", returnStdout: true)
+ // k8s_conformance_report_name =~ conformance_virtlet_result.xml
+ def k8s_conformance_virtlet_report_name = sh(script: "find ${PARENT_WORKSPACE} -name \"conformance_virtlet_result.xml\"", returnStdout: true)
// stacklight_report_name =~ "stacklight_report.xml" or "report.xml"
def stacklight_report_name = sh(script: "find ${PARENT_WORKSPACE} -name \"*report.xml\"", returnStdout: true)
common.printMsg(deployment_report_name ? "Found deployment report: ${deployment_report_name}" : "Deployment report not found", deployment_report_name ? "blue" : "red")
common.printMsg(tcpqa_report_name ? "Found tcp-qa report: ${tcpqa_report_name}" : "tcp-qa report not found", tcpqa_report_name ? "blue" : "red")
common.printMsg(tempest_report_name ? "Found tempest report: ${tempest_report_name}" : "tempest report not found", tempest_report_name ? "blue" : "red")
common.printMsg(k8s_conformance_report_name ? "Found k8s conformance report: ${k8s_conformance_report_name}" : "k8s conformance report not found", k8s_conformance_report_name ? "blue" : "red")
+ common.printMsg(k8s_conformance_virtlet_report_name ? "Found k8s conformance virtlet report: ${k8s_conformance_virtlet_report_name}" : "k8s conformance virtlet report not found", k8s_conformance_virtlet_report_name ? "blue" : "red")
common.printMsg(stacklight_report_name ? "Found stacklight-pytest report: ${stacklight_report_name}" : "stacklight-pytest report not found", stacklight_report_name ? "blue" : "red")
@@ -150,6 +153,28 @@
}
}
+ if ('k8s' in stacks && k8s_conformance_virtlet_report_name) {
+ stage("K8s conformance virtlet report") {
+ testSuiteName = "[k8s] Virtlet"
+ methodname = "{methodname}"
+ testrail_name_template = "{title}"
+ reporter_extra_options = [
+ "--send-duplicates",
+ "--testrail-add-missing-cases",
+ "--testrail-case-custom-fields {\\\"custom_qa_team\\\":\\\"9\\\"}",
+ "--testrail-case-section-name \'Conformance\'",
+ ]
+ report_result = shared.upload_results_to_testrail(k8s_conformance_virtlet_report_name, testSuiteName, methodname, testrail_name_template, reporter_extra_options)
+ common.printMsg(report_result, "blue")
+ report_url = report_result.split("\n").each {
+ if (it.contains("[TestRun URL]")) {
+ common.printMsg("Found report URL: " + it.trim().split().last(), "blue")
+ description += "\n<a href=" + it.trim().split().last() + ">${testSuiteName}</a>"
+ }
+ }
+ }
+ }
+
if ('stacklight' in stacks && stacklight_report_name) {
stage("stacklight-pytest report") {
testSuiteName = "LMA2.0_Automated"
diff --git a/src/com/mirantis/system_qa/SharedPipeline.groovy b/src/com/mirantis/system_qa/SharedPipeline.groovy
index d34867e..58da420 100644
--- a/src/com/mirantis/system_qa/SharedPipeline.groovy
+++ b/src/com/mirantis/system_qa/SharedPipeline.groovy
@@ -204,6 +204,7 @@
// Run pytest tests
def common = new com.mirantis.mk.Common()
def tcp_qa_refs = env.TCP_QA_REFS ?: ''
+ def tempest_image_version = env.TEMPEST_IMAGE_VERSION ?: 'pike'
def parameters = [
string(name: 'ENV_NAME', value: "${ENV_NAME}"),
string(name: 'PASSED_STEPS', value: passed_steps),
@@ -216,7 +217,7 @@
string(name: 'REPOSITORY_SUITE', value: "${MCP_VERSION}"),
string(name: 'MCP_IMAGE_PATH1604', value: "${MCP_IMAGE_PATH1604}"),
string(name: 'IMAGE_PATH_CFG01_DAY01', value: "${IMAGE_PATH_CFG01_DAY01}"),
- string(name: 'TEMPEST_IMAGE_VERSION', value: "${TEMPEST_IMAGE_VERSION}"),
+ string(name: 'TEMPEST_IMAGE_VERSION', value: "${tempest_image_version}"),
]
common.printMsg("Start building job 'swarm-run-pytest' with parameters:", "purple")
diff --git a/tcp_tests/managers/k8smanager.py b/tcp_tests/managers/k8smanager.py
index 7ca518e..5e8ea56 100644
--- a/tcp_tests/managers/k8smanager.py
+++ b/tcp_tests/managers/k8smanager.py
@@ -230,28 +230,29 @@
raise_on_err=raise_on_err, verbose=True)
def run_virtlet_conformance(self, timeout=60 * 120,
- log_file='virtlet_conformance.log'):
+ log_file='virtlet_conformance.log',
+ report_name="report.xml"):
if self.__config.k8s.run_extended_virtlet_conformance:
ci_image = "cloud-images.ubuntu.com/xenial/current/" \
"xenial-server-cloudimg-amd64-disk1.img"
cmd = ("set -o pipefail; "
"docker run --net=host {0} /virtlet-e2e-tests "
- "-include-cloud-init-tests -junitOutput report.xml "
+ "-include-cloud-init-tests -junitOutput {3} "
"-image {2} -sshuser ubuntu -memoryLimit 1024 "
"-alsologtostderr -cluster-url http://127.0.0.1:8080 "
"-ginkgo.focus '\[Conformance\]' "
"| tee {1}".format(
self.__config.k8s_deploy.kubernetes_virtlet_image,
- log_file, ci_image))
+ log_file, ci_image, report_name))
else:
cmd = ("set -o pipefail; "
"docker run --net=host {0} /virtlet-e2e-tests "
- "-junitOutput report.xml "
+ "-junitOutput {2} "
"-alsologtostderr -cluster-url http://127.0.0.1:8080 "
"-ginkgo.focus '\[Conformance\]' "
"| tee {1}".format(
self.__config.k8s_deploy.kubernetes_virtlet_image,
- log_file))
+ log_file, report_name))
LOG.info("Executing: {}".format(cmd))
with self.__underlay.remote(
node_name=self.controller_name) as remote:
diff --git a/tcp_tests/templates/cookied-cicd-k8s-calico-sl/cookiecutter-context-k8s-sl.yaml b/tcp_tests/templates/cookied-cicd-k8s-calico-sl/cookiecutter-context-k8s-sl.yaml
index 061b4db..438696b 100644
--- a/tcp_tests/templates/cookied-cicd-k8s-calico-sl/cookiecutter-context-k8s-sl.yaml
+++ b/tcp_tests/templates/cookied-cicd-k8s-calico-sl/cookiecutter-context-k8s-sl.yaml
@@ -128,7 +128,7 @@
kubernetes_externaldns_enabled: 'False'
kubernetes_keepalived_vip_interface: br_ctl
kubernetes_network_calico_enabled: 'True'
- kubernetes_virtlet_enabled: 'False'
+ kubernetes_virtlet_enabled: 'True'
kubernetes_proxy_hostname: prx
kubernetes_proxy_node01_hostname: prx01
kubernetes_proxy_node02_hostname: prx02
diff --git a/tcp_tests/tests/system/test_3rdparty_suites.py b/tcp_tests/tests/system/test_3rdparty_suites.py
index d5b012f..78583af 100644
--- a/tcp_tests/tests/system/test_3rdparty_suites.py
+++ b/tcp_tests/tests/system/test_3rdparty_suites.py
@@ -83,11 +83,16 @@
k8s_actions.run_conformance()
@pytest.mark.grab_versions
+ @pytest.mark.extract(container_system='docker',
+ extract_from='mirantis/virtlet',
+ files_to_extract=['conformance_virtlet_result.xml'])
@pytest.mark.grab_k8s_results(name=['virtlet_conformance.log',
- 'report.xml'])
+ 'conformance_virtlet_result.xml'])
@pytest.mark.parametrize("_", [settings.ENV_NAME])
@pytest.mark.k8s_conformance_virtlet
def test_run_k8s_conformance_virtlet(self, show_step, config, k8s_actions,
k8s_logs, _):
"""Test run of k8s virtlet conformance tests"""
- k8s_actions.run_virtlet_conformance()
+ config.k8s.run_extended_virtlet_conformance = True
+ k8s_actions.run_virtlet_conformance(
+ report_name="conformance_virtlet_result.xml")
diff --git a/tcp_tests/tests/system/test_virtlet_actions.py b/tcp_tests/tests/system/test_virtlet_actions.py
index 83fd33a..d3b6c27 100644
--- a/tcp_tests/tests/system/test_virtlet_actions.py
+++ b/tcp_tests/tests/system/test_virtlet_actions.py
@@ -25,6 +25,7 @@
@pytest.mark.grab_versions
@pytest.mark.fail_snapshot
+ @pytest.mark.k8s_virtlet
def test_virtlet_create_delete_vm(self, show_step, config, k8s_deployed):
"""Test for deploying an mcp environment with virtlet
@@ -51,6 +52,7 @@
@pytest.mark.grab_versions
@pytest.mark.fail_snapshot
+ @pytest.mark.k8s_virtlet
def test_vm_resource_quotas(self, show_step, config, k8s_deployed):
"""Test for deploying a VM with specific quotas