Don't invoke old task command from tests

In I3e532b513698b1b11c5cf0450eef866b057b9392 the old fuel task
command was deleted. After that change was merged some of the
functional tests started failing because they still invoked the
deleted command.

This patch replaces that invokation with the correct one.

Change-Id: Ic6d459593ab8dd5dc556f39e94590ee62c677ef3
Closes-bug: #1598864
This commit is contained in:
Roman Prykhodchenko 2016-07-04 16:42:09 +02:00
parent e3d7c0e0de
commit 175c5467d0
1 changed files with 5 additions and 5 deletions

View File

@ -95,10 +95,10 @@ class BaseTestCase(oslo_base.BaseTestCase):
cls.nailgun_root, file_path)
cls.run_command(cmd, cwd=cls.fuel_web_root)
def run_cli_command(self, command_line,
def run_cli_command(self, command_line, handler=None,
check_errors=True, env=os.environ.copy()):
command_args = [" ".join((self.handler, command_line))]
command_args = [" ".join((handler or self.handler, command_line))]
process_handle = subprocess.Popen(
command_args,
stdout=subprocess.PIPE,
@ -203,9 +203,9 @@ class CLIv1TestCase(BaseTestCase):
handler = 'fuel'
def _get_task_info(self, task_id):
command = "task --task {0} --json".format(str(task_id))
call = self.run_cli_command(command)
return json.loads(call.stdout)[0]
command = "task show -f json {0}".format(str(task_id))
call = self.run_cli_command(command, handler='fuel2')
return json.loads(call.stdout)
class CLIv2TestCase(BaseTestCase):