Fix incorrect resource's information while describing
We can't get the resource'infos from db once the resource
is deleted. All information of a deleted resource come
from the initialization. So this change will modify some
infos when resource init:
1. set the action of resource to stack'action
2. set the created_time to stack's created_time
3. set the updated_time to stack's updated_time
Then the information will be reset for normal resources.
Change-Id: Iafdc99c572c5dab06bf1843842ed47554d6de128
Closes-Bug: #1480183
diff --git a/functional/test_preview.py b/functional/test_preview.py
index b4389ff..19da01b 100644
--- a/functional/test_preview.py
+++ b/functional/test_preview.py
@@ -53,9 +53,10 @@
'description'):
self.assertIn(field, res)
self.assertEqual('', res[field])
+ # 'creation_time' and 'updated_time' are None when preview
for field in ('creation_time', 'updated_time'):
self.assertIn(field, res)
- self.assertIsNotNone(res[field])
+ self.assertIsNone(res[field])
self.assertIn('output', res['attributes'])
# resource_identity