summaryrefslogtreecommitdiff
path: root/heatclient/tests/functional
diff options
context:
space:
mode:
authorMark Vanderwiel <vanderwl@us.ibm.com>2016-03-29 13:54:05 -0500
committerMark Vanderwiel <vanderwl@us.ibm.com>2016-04-06 09:53:38 -0500
commit919d066f624186f59f5557282ea62edb9775bfa2 (patch)
tree2c38e5910da312d9528470d583ec8297b07c4d03 /heatclient/tests/functional
parent00a95ad4f6941e72d0f596810f74599561aef6d6 (diff)
downloadpython-heatclient-919d066f624186f59f5557282ea62edb9775bfa2.tar.gz
Add basic read-only function test for template validate
Add basic functional test for "openstack orchestration template validate". Change-Id: I8c0bf3a27a266eaa140f033ecf32d97d0f2f1ee7
Diffstat (limited to 'heatclient/tests/functional')
-rw-r--r--heatclient/tests/functional/osc/v1/test_readonly.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/heatclient/tests/functional/osc/v1/test_readonly.py b/heatclient/tests/functional/osc/v1/test_readonly.py
index cd8e023..7f7b51e 100644
--- a/heatclient/tests/functional/osc/v1/test_readonly.py
+++ b/heatclient/tests/functional/osc/v1/test_readonly.py
@@ -110,3 +110,23 @@ class SimpleReadOnlyOpenStackClientTest(base.OpenStackClientTestBase):
'heat_minimal_hot.yaml',
['test_client_name=test_client_name', 'test_wait_secs=123']
)
+
+ def _orchestration_template_validate(self, templ_name, parms):
+ template_path = self.get_template_path(templ_name)
+ cmd = 'orchestration template validate --template %s' % template_path
+ for parm in parms:
+ cmd += ' --parameter ' + parm
+ ret = self.openstack(cmd)
+ self.assertRegex(ret, r'Value:.*123')
+
+ def test_orchestration_template_validate_yaml(self):
+ self._orchestration_template_validate(
+ 'heat_minimal.yaml',
+ ['ClientName=ClientName', 'WaitSecs=123']
+ )
+
+ def test_orchestration_template_validate_hot(self):
+ self._orchestration_template_validate(
+ 'heat_minimal_hot.yaml',
+ ['test_client_name=test_client_name', 'test_wait_secs=123']
+ )