Skip to content

Commit

Permalink
modify base zaza poackage into zaza.openstack package
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisMacNaughton committed May 8, 2019
1 parent ebf9aa0 commit 0c2f36f
Show file tree
Hide file tree
Showing 29 changed files with 21 additions and 4,482 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
build/
dist/
.local
zaza.egg-info/
zaza.openstack.egg-info/
.coverage
.vscode/
# Sphinx
Expand Down
20 changes: 1 addition & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,5 @@ python:
install: pip install tox-travis
env:
- ENV=pep8
- ENV=py3
- ENV=func-travis
comment: |
install dependencies in script phase saving time on simpler test environments
sudo back to ourself to activate lxd group membership executable search path
script:
- if [ $ENV = 'func-travis' ]; then
sudo apt remove -y --purge lxd lxd-client;
sudo snap install lxd;
sudo snap install juju --classic;
sudo sh -c 'echo PATH=/snap/bin:$PATH >> /etc/environment';
sudo lxd waitready;
sudo lxd init --auto;
sudo usermod -a -G lxd travis;
sudo su travis -c 'juju bootstrap --debug --no-gui localhost';
fi
- tox -c tox.ini -e $ENV
- if [ $ENV = 'func-travis' ]; then
sudo su travis -c 'juju status -m $(juju models --format yaml|grep "^- name:.*zaza"|cut -f2 -d/)';
fi
- tox -c tox.ini -e $ENV
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

aiounittest
async_generator
juju
Expand Down Expand Up @@ -35,3 +36,4 @@ paramiko
# Documentation requirements
sphinx
sphinxcontrib-asyncio
git+https://github.com/openstack-charmers/zaza#egg=zaza
22 changes: 11 additions & 11 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[metadata]
name = zaza
summary = A Python3-only functional test framework for OpenStack Charms
version = 0.0.2.dev1
name = zaza.openstack
summary = Zaza tests for the OpenStack Charms project
version = 0.0.1.dev1
description-file =
README.rst
author = OpenStack Charmers
author-email = [email protected]
url = https://github.com/openstack-charmers/zaza
url = https://github.com/openstack-charmers/zaza-openstack-tests
classifier =
Development Status :: 2 - Pre-Alpha
Intended Audience :: Developers
Expand All @@ -26,18 +26,18 @@ all_files = 1
upload-dir = doc/build/html

[compile_catalog]
directory = zaza/locale
domain = zaza
directory = zaza_openstack_tests/locale
domain = zaza_openstack_tests

[update_catalog]
domain = zaza
output_dir = zaza/locale
input_file = zaza/locale/zaza.pot
domain = zaza_openstack_tests
output_dir = zaza_openstack_tests/locale
input_file = zaza_openstack_tests/locale/zaza.pot

[extract_messages]
keywords = _ gettext ngettext l_ lazy_gettext
mapping_file = babel.cfg
output_file = zaza/locale/zaza.pot
output_file = zaza_openstack_tests/locale/zaza.pot

[nosetests]
nologcapture=1
nologcapture=1
18 changes: 3 additions & 15 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

"""Module used to setup the zaza framework."""
"""Module used to setup the zaza framework tests."""

from __future__ import print_function

Expand All @@ -41,6 +41,7 @@
'python-octaviaclient',
'python-cinderclient',
'python-swiftclient',
'zaza@git+https://github.com/openstack-charmers/zaza.git#egg=zaza',
]

tests_require = [
Expand Down Expand Up @@ -92,19 +93,6 @@ def run_tests(self):


setup(
entry_points={
'console_scripts': [
'functest-run-suite = zaza.charm_lifecycle.func_test_runner:main',
'functest-deploy = zaza.charm_lifecycle.deploy:main',
'functest-configure = zaza.charm_lifecycle.configure:main',
'functest-destroy = zaza.charm_lifecycle.destroy:main',
'functest-prepare = zaza.charm_lifecycle.prepare:main',
'functest-test = zaza.charm_lifecycle.test:main',
'current-apps = zaza.model:main',
'tempest-config = zaza.tempest_config:main',
'remove-placement = zaza.openstack.utilities.bundle:main',
]
},
license='Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0',
packages=find_packages(exclude=["unit_tests"]),
zip_safe=False,
Expand All @@ -114,4 +102,4 @@ def run_tests(self):
'testing': tests_require,
},
tests_require=tests_require,
)
)
29 changes: 3 additions & 26 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
[tox]
envlist = pep8,py3
envlist = pep8, py3
skipsdist = True

[testenv]
setenv = VIRTUAL_ENV={envdir}
PYTHONHASHSEED=0
install_command =
pip install {opts} {packages}

commands = nosetests --with-coverage --cover-package=zaza {posargs} {toxinidir}/unit_tests

[testenv:py3]
Expand All @@ -33,28 +34,4 @@ basepython = python3
changedir = doc/source
deps =
-r{toxinidir}/requirements.txt
commands = sphinx-build -W -b html -d {toxinidir}/doc/build/doctrees . {toxinidir}/doc/build/html

[testenv:func]
basepython = python3
deps = -r{toxinidir}/requirements.txt
commands =
{envdir}/bin/python3 setup.py install
functest-run-suite --keep-model

[testenv:func-travis]
basepython = python3
deps = -r{toxinidir}/requirements.txt
# sudo back to ourself to activate lxd group membership executable search path
whitelist_externals = sudo
passenv = USER
commands =
{envdir}/bin/python3 setup.py install
sudo su {env:USER} -c 'source {envdir}/bin/activate && functest-run-suite --keep-model'

[testenv:remove-placement]
basepython = python3
deps = -r{toxinidir}/requirements.txt
commands =
{envdir}/bin/python3 setup.py install
remove-placement {posargs}
commands = sphinx-build -W -b html -d {toxinidir}/doc/build/doctrees . {toxinidir}/doc/build/html
51 changes: 0 additions & 51 deletions unit_tests/test_zaza_charm_lifecycle_configure.py

This file was deleted.

Loading

0 comments on commit 0c2f36f

Please sign in to comment.