Add a tox environment for bandit so it can be run as a gate job
eventually. As-is, there are no high severity issues detected in heat.
Change-Id: Iab098a1d8bac5c95d67e6867ad5249987c3a786e
As discussed in the Liberty Design Summit "Moving apps to Python 3"
cross-project workshop, the way forward in the near future is to
switch to the pure-python PyMySQL library as a default.
https://etherpad.openstack.org/p/liberty-cross-project-python3
Also set the OS_TEST_DBAPI_ADMIN_CONNECTION override variable so
that oslo.db opportunistic detection will know to use PyMySQL until
I12b32dc097a121bd43991bc38dd4d289b65e86c1 makes it the default
behavior.
Change-Id: I17e052215ce6e1604cdda848ccc20862452ccbc7
Co-Authored-By: Victor Sergeyev <vsergeyev@mirantis.com>
This also brings in newer versions of flake8, pyflakes and pep8,
with new and updated checks.
Some of them fail on our current code base, so first those failing are
disabled.
Most of them will be enabled one-by-one in subsequent patches.
Change-Id: Ib5fc4640b33c238ddb4e59a441c6710f607296b1
These support classes started as a forklift of the classes needed
to run tempest scenario orchestration tests.
The original tempest code has been pared back to provide the
small subset required by heat integration tests. From this point on
these support classes can evolve to the specific needs of the
integration tests.
There is some unused code (especially in remote_client) which has
been left in as it may become useful in the future, and is already
extremely well reviewed and tested from being developed for tempest.
The script heat_integrationtests/generate_sample.sh will generate
an up-to-date heat_integrationtests/heat_integrationtests.conf.sample
file which can be copied to
heat_integrationtests/heat_integrationtests.conf
to override default configuration values. A local ConfigOpts is created
for each test to avoid any potential interaction with heat's
global CONF. Configuration options for credentials default to
being sourced from the environment.
The default tox testenv now excludes tests in heat_integrationtests.
A new testenv called "integration" will only run tests in
heat_integrationtests.
Integration tests will fail if preconditions are not met, including
a keystone endpoint, credentials and glance containing the expected
named image.
Devstack gate hooks have been moved to heat_integrationtests now that
the name of the package has been decided.
Change-Id: I174429c16bb606c5c325ee8b62c6e600ea77a6e6
Partial-Blueprint: functional-tests
Refactored migration tests due to use OpportunisticTestCase.
This change allows tests use database ``openstack_citest`` only
for connection to the database backend - for each migration test
a new database, with a random name, will be created. This will avoid
migration tests of race conditions and reduce tests interaction.
Added MySQL-python and psycopg2 to test-requirements, because we need
some database connectors to run tests on PostgreSQL and MySQL.
``test_migrations.conf`` file was removed, because we create test
database for migration test, so we no longer need test database
credentials.
Some migrations scripts was modified to ensure, that they executed
with a single DB connection.
Removed get_table() method - we can use a similar function from
oslo.db.sqlalchemy.utils module.
This patch also add "forward compatibility" with the next version of oslo.db
- class BaseMigrationsTestCase was removed from master, so we should
avoid of it's usage and signature of method _walk_versions() from class
test_migrations.WalkVersionsMixin
Co-Authored-By: Roman Podoliaka <rpodolyaka@mirantis.com>
Change-Id: Ia503f01fdf2df00cce7212fcc9e0b6cc98ad6520
To enable implementation of a glance image resource, we first need to add
access to glanceclient in heat.
Change-Id: Ie0623e0307f6d3163ae584ceab89453f71f48053
Implements: blueprint glance-image
There is a new support library extracted from oslo incubator: the patch
starts using it and removes deprecated modules.
Change-Id: I3839af20613ff6ab905dddb8fc4be65654c6e949
This makes code more readable, and can check whether specific library
in the requirement files easily. We also enforce the check in pep8.
Change-Id: I032c3c3d29522ce85f64b21d6428d975e46cc701
Closes-Bug: #1285478
oslosphinx is now available as a replacement for oslo.sphinx that
won't conflict with oslo.config in virtual envs
Change-Id: I7dc3349c8102cc8f358de7e0088128b6705c5f8e
Closes-Bug: #1277168
Hacking already pins them to the compatible versions,
so avoid running out of sync by letting hacking
determine the correct code checker versions.
Change-Id: I22151423b7884428d71de364ea81d6ec0a1fdafa
Change is necessary due to update to hacking 0.8.0, which is in
alignment with project standards.
Change-Id: I012958e63d9e0efaf36ee57fe9102e835ef8533c
Closes-bug: #1218190
Sync the global requirements to pin sphinx. This addresses an issue
where Sphinx 1.2 is not building documents correctly and causing
check/gate to fail.
Change-Id: Id4a54ec708102e35602e87ee9773ca119ce5b4f6
A common pattern for templates is to define parameters
for passwords and specify the password on stack create.
For complex templates this can impact template maintainability
and makes stack creation more complicated.
In addition, a password parameter leaves the temptation of
using the same password (or worse, the parameter default) on
each stack launch which raises the security risk.
This resource allows secrets to be generated in the template and
propagated to compute resources as needed. Often the user will
never want to see the generated string, but if they do they
can put it in a stack output.
This resource has been requested by the tripleo project
who run trunk heat, so it will be of immediate benefit to them.
Implements blueprint random-string-resource
Change-Id: I044fc7717133fc7a3520dca774300024925ff2aa
Babel is required by heat.openstack.common.gettextutils but was only in
test-requirements.txt.
Fixes bug #1208673
Change-Id: Iaffcbc861e64caa37d64335f0fb6e568672ffc52
Causes issues with the recent re-merge with setuptools. Advice from
upstream is to stop doing explicit depends.
Change-Id: If390cdf328b361d0f76315083f3e6da97bbe4b2f
This is stricter, but also provides plumbing for more advanced things
like fixtures and testscenarios.
Change-Id: I607b50390708ca3caa9799ef0b27007df5045a6c
From bug report:
Rename tools/pip-requires to requirements.txt and tools/test-requires
to test-requirements.txt. These are standard files and tools in the
general world are growing intelligence about them.
Change-Id: Ie0bdb4908f45e47db43e84cd0c5fdc5263c035f4
Fixes: Bug #1179008
Now that testtools and testr have replaced nose, trims all references
and removes nose from test-requires.
Change-Id: I0aae8fe2c09c5b25741226555838dc330d5c4d91