Add pull action functional test

Change-Id: I3e754f4e7594eb23f73b8da6bee3af0b91f44ad4
This commit is contained in:
jacky06 2019-07-31 15:41:07 +08:00 committed by cao.yuan
parent c5ba7f2704
commit 6b63c00967
1 changed files with 15 additions and 0 deletions

View File

@ -175,6 +175,21 @@ class TestFunctional(KollaCliTest):
finally:
CLIENT.host_remove(['dummy_host'])
def test_pull(self):
# test will upgrade an environment with no hosts, mostly a NOP,
# but it will go through the client code paths.
self.run_cli_cmd('pull -v')
CLIENT.host_add(['test_pull_host'])
CLIENT.set_deploy_mode(remote_mode=True)
job = CLIENT.pull()
job.wait()
msg = job.get_console_output()
self.assertEqual(job.get_status(), 1,
'pull succeeded unexpectedly: %s'
% msg)
self.assertIn(UNREACHABLE, msg)
def check_json(self, msg, groups, hosts, included_groups, included_hosts):
err_msg = ('included groups: %s\n' % included_groups +
'included hosts: %s\n' % included_hosts)