Check that snapshot is 'ready' before download

Tests must skip snapshot downloading if the task
for its generation failed.

Change-Id: Ib8f0d47bd748415f3a1bcfa0b1c2217963519423
Related-bug: #1528815
This commit is contained in:
Artem Panchenko 2015-12-23 23:29:28 +02:00
parent 726466b484
commit d216569f0a
1 changed files with 3 additions and 0 deletions

View File

@ -30,6 +30,7 @@ from fuelweb_test.helpers.checkers import check_stats_private_info
from fuelweb_test.helpers.checkers import count_stats_on_collector
from proboscis import SkipTest
from proboscis.asserts import assert_equal
from proboscis.asserts import assert_true
from fuelweb_test import logger
from fuelweb_test import settings
@ -313,6 +314,8 @@ def revert_info(snapshot_name, master_ip, description=""):
def create_diagnostic_snapshot(env, status, name=""):
task = env.fuel_web.task_wait(env.fuel_web.client.generate_logs(), 60 * 10)
assert_true(task['status'] == 'ready',
"Generation of diagnostic snapshot failed: {}".format(task))
url = "http://{}:8000{}".format(env.get_admin_node_ip(), task['message'])
log_file_name = '{status}_{name}-{basename}'.format(
status=status,