]> review.fuel-infra Code Review - openstack-build/heat-build.git/commit
Split functional test into standalone and utility class
authorJeff Peeler <jpeeler@redhat.com>
Tue, 21 Aug 2012 20:26:41 +0000 (16:26 -0400)
committerJeff Peeler <jpeeler@redhat.com>
Thu, 23 Aug 2012 17:31:42 +0000 (13:31 -0400)
commit8ba6c8ffe869a7f6db0321bbeeea200a0fb140c4
treec29b560375da7763e9592c8713590faa4e348e70
parentecc5a408a33f83b428a77376000c0b6f409393cd
Split functional test into standalone and utility class

This allows functional tests to be written for each individual template.
See the test_Wordpress_Single_Instance for an example, but the basic
form to follow is:

import util

def test_template():
    func_utils = util.FuncUtils()

    func_utils.create_stack(template, 'F17')
    func_utils.check_cfntools()
    func_utils.wait_for_provisioning()
    func_utils.check_user_data(template)

    ssh = func_utils.get_ssh_client()

    # test stuff here

    func_utils.cleanup()

Functional test changes:
Changed jeos creation to use new tool.
Added distribution to heat stack creation.
Improved IP parsing from glance.
Improve SSH connection exception handling.
Changed cfntools SHA check to match installed copy instead of locally.
Fixed stack parsing to check correct file and handle user-data injection.

Clean up run_tests a little to make it clear default execution is on host.
Add a short option for unit test running only (may be important due to not
wanting to run functional tests locally).

Also added paramiko to test-requires.

Change-Id: Ib2ae1be32801cb0ee3d1937c4f82ab9f574b4591
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
heat/tests/functional/__init__.py [new file with mode: 0644]
heat/tests/functional/test_WordPress_Single_Instance.py [new file with mode: 0644]
heat/tests/functional/test_bin_heat.py [deleted file]
heat/tests/functional/util.py [new file with mode: 0644]
run_tests.sh
tools/test-requires