From 9b215e6cd7eba49689f2a4048eaf092f8768b072 Mon Sep 17 00:00:00 2001 From: Kasper Hasior Date: Wed, 10 Apr 2019 15:09:06 +0200 Subject: [PATCH] Fix backup tests This patch add an additional possibility when checking instance status after backup - backup may be done fast so we may get response 'ACTIVE'. Change-Id: I93efba6aa11842ee2499550ab9293b65d75448e0 Story: #2005422 Task: #30444 Signed-off-by: Kasper Hasior --- trove/tests/api/backups.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/trove/tests/api/backups.py b/trove/tests/api/backups.py index dd0e9cb4ef..0d92f10468 100644 --- a/trove/tests/api/backups.py +++ b/trove/tests/api/backups.py @@ -15,6 +15,7 @@ from proboscis.asserts import assert_equal from proboscis.asserts import assert_not_equal from proboscis.asserts import assert_raises +from proboscis.asserts import assert_true from proboscis.asserts import fail from proboscis.decorators import time_out from proboscis import SkipTest @@ -81,7 +82,7 @@ class CreateBackups(object): assert_equal('NEW', result.status) instance = instance_info.dbaas.instances.get(instance_info.id) - assert_equal('BACKUP', instance.status) + assert_true(instance.status in ['ACTIVE', 'BACKUP']) assert_equal(instance_info.dbaas_datastore, result.datastore['type']) assert_equal(instance_info.dbaas_datastore_version,