From b35ed149f16e6f2f6c95badcb2c738465e74d239 Mon Sep 17 00:00:00 2001 From: NastyaUrlapova Date: Mon, 18 Jul 2016 15:57:30 +0300 Subject: [PATCH] Fix for generate statistic functionality in case if test run was used repo snapshots. Change-Id: I164ac8191f4bd902ad80e90f33e0ab3f3cafd322 Closes-Bug: #1603985 --- fuelweb_test/testrail/generate_statistics.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/fuelweb_test/testrail/generate_statistics.py b/fuelweb_test/testrail/generate_statistics.py index 291764e7c..72525531b 100644 --- a/fuelweb_test/testrail/generate_statistics.py +++ b/fuelweb_test/testrail/generate_statistics.py @@ -54,8 +54,13 @@ def generate_test_plan_name(job_name, build_number): # taken from Jenkins job build parameters runner_build = Build(job_name, build_number) milestone, iso_number, prefix = get_version(runner_build.build_data) - return ' '.join(filter(lambda x: bool(x), - (milestone, prefix, 'iso', '#' + str(iso_number)))) + if 'snapshot' not in prefix: + return ' '.join(filter(lambda x: bool(x), (milestone, + prefix, 'iso', + '#' + str(iso_number)))) + else: + return ' '.join(filter(lambda x: bool(x), (milestone, + prefix))) def get_testrail():