1
# vim: tabstop=4 shiftwidth=4 softtabstop=4
3
# Licensed under the Apache License, Version 2.0 (the "License"); you may
4
# not use this file except in compliance with the License. You may obtain
5
# a copy of the License at
7
# http://www.apache.org/licenses/LICENSE-2.0
9
# Unless required by applicable law or agreed to in writing, software
10
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12
# License for the specific language governing permissions and limitations
21
basepath = os.path.join(heat.__path__[0], os.path.pardir)
24
class CliTest(testtools.TestCase):
26
def test_heat_cfn(self):
27
self.bin_run('heat-cfn')
29
def test_heat_boto(self):
30
self.bin_run('heat-boto')
32
def test_heat_watch(self):
33
self.bin_run('heat-watch')
35
def bin_run(self, bin):
36
fullpath = basepath + '/bin/' + bin
38
proc = subprocess.Popen(fullpath,
39
stdout=subprocess.PIPE,
40
stderr=subprocess.PIPE)
41
stdout, stderr = proc.communicate()
44
print('Error executing %s:\n %s %s ' % (bin, stdout, stderr))
45
raise subprocess.CalledProcessError(proc.returncode, bin)