Until now the flake8 tests run by tox and run_tests.sh were a bit
different - run_tests.sh was not checking heat-* python scripts in bin
folder and was checking the docs folder that is ignored in tox' pep8
check.
This patch brings pep8 style checking done by run_tests.sh in line with
what is done by tox (and thus the gate).
Change-Id: Ie3f2c25210075df6b941854737f0d926d141601b
Modified run_tests.sh comments to show that
both pep8 and unit tests are run by default
Closes-Bug: #1280866
Change-Id: I53525011bd7e4bc2080f8aa1d7294350aa0839b8
Before this change, when you called the script using the -V option, the tests
were run outside the virtualenv that the script creates.
To fix it, I modified the lines of the script that run the tests to run
inside the virtualenv using the $wrapper variable.
Change-Id: I5c202727e0b5214670d54e14c80a68cc8ebec400
Closes-Bug: #1251730
As requested by the Debian package maintainer, this makes the
coverage report work more easily on Debian/Ubuntu
Change-Id: Ibed9e164c89543b679393ee18ccdb4a15bdea6d7
Closes-Bug: #1241330
When doing development work, all kinds of issue can result when moving
between versions of the code that have added/removed DB migration scripts
if the compiled .pyc files are left behind. To save the need to do this
manually, remove all of the .pyc files when the unit tests are run.
Change-Id: Ia4bc889edeeed499e5fc2172d5f7c1b4e693a27b
testr migration removed the text CLI summary report, so add
it back in now for easy visibility of coverage results
Change-Id: I419b1a9ea45f391a2cf623ad4431c93982ae5231
Running testr directly or running the tests in tox are the preferred
method at this point, but developers may still have automation around
run_tests.sh.
Change-Id: I5cd8a0e6bcee192440bdbc072dbd560615130def
This patch imports nova's HACKING.rst guidelines altered for Heat.
This patch imports nova's run_pep8.sh with some minor alterations.
This patch imports nova's hacking.py extensions to pep8.
This patch places the run_pep8 logic in a separate file rather than
having it spread between tox.ini and run_tests.sh. The HACKING.rst
requirements as well as general pep8 requirements are then enforced
with run_pep8.sh.
Avoid running once the N802 rule until dependency changelogs are
less then 50 characters.
Change-Id: If46c14668eae3cf11b8fbff46d766cc589d701aa
Fixes: Bug #1131275
run_tests.sh parses tox.ini, which has been changed removing the
pep8 version, so remove this test and specify the version in
test-requires. This allows the pep tests to run via run_tests.sh
again, a subsequent patch can reinstate the version check based
on the test-requires version
fixes bug 1131251
Change-Id: Ib24f588cbe81ded768376c138d9d89f5bb311185
The section which prompts y/n for creating a new venv can never be
reached with any combination of CLI options (since always_venv=0 and
never_venv=0 can never happen simultaneously)
This actually makes the --no-virtual-env option pointless, so we may
as well remove it and explicitly set it as the default (it was anyway
previously but by virtue of the never_venv option being undefined)
Change-Id: I3c803533fda55a6814b7536b5c1328312acd3d57
Signed-off-by: Steven Hardy <shardy@redhat.com>
I introduced an inconsistent style with the pep8 check patch, so fixing this up here
Change-Id: I9a1a612172e493e0d2476c7f6613bbb9b9de2878
Signed-off-by: Steven Hardy <shardy@redhat.com>
Most of the core projects are currently 1.3.3, but since 1.3.4 is
the current latest it seemed best to align with the latest.A
Also add a check to run_tests.sh to ensure peoples local tests align
with the new gate version
fixes bug 1092057
Change-Id: I16dc7e51536781f7a14b7954c24b1aa078b37fa8
Signed-off-by: Steven Hardy <shardy@redhat.com>
This is to allow python-heatclient to eventually become the default heat
client.
Documentation in heat.wiki will be updated to refer to heat-cfn when this
change is pushed.
Change-Id: I2209c36adf41fa5d0df0caf9200f7fedbdd51805
So far only access to stacks (not resources and events) is implemented.
Change-Id: I9655e9441087ef60c06e67e2d6ae68ec4a3b2d11
Signed-off-by: Zane Bitter <zbitter@redhat.com>
The previous heat-api is, in fact, a CloudFormation-compatible API. Rename
it to heat-api-cfn, analogous to how the EC2 API in Nova is named
nova-api-ec2.
Change-Id: I9759f10cee6a60cdc9cb917966eb9fb95a618f85
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Allow each category of test (unit/funtional/pep) to be
more easily selected via CLI options, default with no args
remains unit+pep8
Change-Id: I85bbe0afe6170559a42f8c1619db24df16c6d9b0
Signed-off-by: Steven Hardy <shardy@redhat.com>
Execute unit tests and pep8 by default. Allow tests to be chosen in a more
additive fashion. Cleaned up unnecessary let statements and variable
defines.
Change-Id: I40676c5d0deda7bd3abc4bdadfd404f5909c166e
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
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>
Add initial version of the heat cli tool which uses boto
- revised following review comments to remove jeos/cfn paths
ref #92
Change-Id: I61b5815b250f3b01d33844ff46dd1612000d51fd
Signed-off-by: Steven Hardy <shardy@redhat.com>
Made sure that `run_tests.sh` works properly (it was failing on the heat/bin
directory) and that all tests pass and the generated logs are .gitignored.
Signed-off-by: Tomas Sedovic <tomas@sedovic.cz>
For usage documentation, refer to heat/tests/testing-overview.txt.
run_tests.sh is what runs the tests.
Fixes #44
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>