summaryrefslogtreecommitdiff
path: root/heat/tests/db/test_sqlalchemy_api.py
diff options
context:
space:
mode:
authorramishra <ramishra@redhat.com>2021-04-01 10:19:31 +0530
committerRabi Mishra <ramishra@redhat.com>2021-04-04 08:10:20 +0000
commite95a7fd21deea111d97b9e8e8ecff431091100d9 (patch)
tree0d047672425b5484d4d2c8299e20746ccef95975 /heat/tests/db/test_sqlalchemy_api.py
parent49ef181bb229ded1131582a64fd4cba9be6fc953 (diff)
downloadheat-e95a7fd21deea111d97b9e8e8ecff431091100d9.tar.gz
Don't update status for replaced resource
With I04e7ad90944c2d03ce0e59ba16af9d60d6e01222 we allowed update of previously-existing resource if replacement creation has failed during last update. However, we force update the status of the existing resource to 'COMPLETE'. Therefore, in the next update if properties/type has not changed for the resource it won't try to update/replace the previously existing resource resulting in false positive of stack updated successfully. Task: 42194 Change-Id: Icc90a921ec67e49aec2c4acfad72235c57c78421 (cherry picked from commit bfbaab107d709c37548a22239b952c6221b9ac85)
Diffstat (limited to 'heat/tests/db/test_sqlalchemy_api.py')
-rw-r--r--heat/tests/db/test_sqlalchemy_api.py6
1 files changed, 0 insertions, 6 deletions
diff --git a/heat/tests/db/test_sqlalchemy_api.py b/heat/tests/db/test_sqlalchemy_api.py
index d5e1e523e..bc4bf2c3b 100644
--- a/heat/tests/db/test_sqlalchemy_api.py
+++ b/heat/tests/db/test_sqlalchemy_api.py
@@ -2670,7 +2670,6 @@ class DBAPIResourceReplacementTest(common.HeatTestCase):
repl = db_api.resource_create_replacement(
self.ctx,
orig.id,
- {'status_reason': 'test replacement'},
{'name': orig.name, 'replaces': orig.id,
'stack_id': orig.stack_id, 'current_template_id': tmpl_id},
1, None)
@@ -2690,7 +2689,6 @@ class DBAPIResourceReplacementTest(common.HeatTestCase):
repl = db_api.resource_create_replacement(
self.ctx,
orig.id,
- {'status_reason': 'test replacement'},
{'name': orig.name, 'replaces': orig.id,
'stack_id': orig.stack_id, 'current_template_id': tmpl_id},
1, None)
@@ -2708,7 +2706,6 @@ class DBAPIResourceReplacementTest(common.HeatTestCase):
db_api.resource_create_replacement,
self.ctx,
orig.id,
- {'status_reason': 'test replacement'},
{'name': orig.name, 'replaces': orig.id,
'stack_id': orig.stack_id,
'current_template_id': tmpl_id},
@@ -2732,7 +2729,6 @@ class DBAPIResourceReplacementTest(common.HeatTestCase):
db_api.resource_create_replacement,
self.ctx,
orig.id,
- {'status_reason': 'test replacement'},
{'name': orig.name, 'replaces': orig.id,
'stack_id': orig.stack_id,
'current_template_id': tmpl_id},
@@ -2750,7 +2746,6 @@ class DBAPIResourceReplacementTest(common.HeatTestCase):
db_api.resource_create_replacement,
self.ctx,
orig.id,
- {'status_reason': 'test replacement'},
{'name': orig.name, 'replaces': orig.id,
'stack_id': orig.stack_id,
'current_template_id': tmpl_id},
@@ -2775,7 +2770,6 @@ class DBAPIResourceReplacementTest(common.HeatTestCase):
db_api.resource_create_replacement,
self.ctx,
orig.id,
- {'status_reason': 'test replacement'},
{'name': orig.name, 'replaces': orig.id,
'stack_id': orig.stack_id,
'current_template_id': tmpl_id},