b3b6dda18d
CentOS installs molteniron into /usr/etc/molteniron instead of /usr/local/etc/molteniron/ so we have moved the conf.yaml file into the molteniron Python directory and started using pkg_resources.resource_filename to find our data file. Change-Id: I75330d51475051a04bb2dff903f54727b9be9b6e
112 lines
4.0 KiB
INI
112 lines
4.0 KiB
INI
[tox]
|
|
minversion = 2.0
|
|
envlist = py35,py27,pypy,pep8
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
usedevelop = True
|
|
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
PYTHONWARNINGS=default::DeprecationWarning
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
# Don't worry about installing bash commands in the virtual environment.
|
|
whitelist_externals = mkdir
|
|
diff
|
|
#commands = python setup.py test --slowest --testr-args='{posargs}'
|
|
commands = mkdir -p testenv/var/run/
|
|
mkdir -p testenv/tmp/
|
|
python setup.py \
|
|
install \
|
|
--install-data=testenv/ \
|
|
--install-scripts=testenv/bin/ \
|
|
--install-purelib=testenv/lib/python2.7/site-packages/
|
|
moltenirond-helper \
|
|
--pid-dir=testenv/var/run/ \
|
|
start
|
|
molteniron \
|
|
delete_db
|
|
molteniron \
|
|
add_baremetal test1 10.1.2.1 user password 10.1.2.3,10.1.2.4 de:ad:be:ef:00:01 ppc64el 8 2048 32
|
|
molteniron \
|
|
add_keyvalue_pairs test2 \
|
|
10.1.2.2 \
|
|
10.1.2.5,10.1.2.6 \
|
|
'ipmi_user="user"' \
|
|
'ipmi_password="password"' \
|
|
'port_hwaddr="de:ad:be:ef:00:01"' \
|
|
'cpu_arch=ppc64el' \
|
|
'cpus=8' \
|
|
'ram_mb=2048' \
|
|
'disk_gb=32'
|
|
# @BUG - tox is broken
|
|
# passing in '{"ipmi_user": "user"}' results in:
|
|
# tox.ConfigError: ConfigError: No support for the "ipmi_user" substitution type
|
|
# and escaping the curly braces '\{"ipmi_user": "user"\}'
|
|
# mentioned in http://tox.readthedocs.io/en/latest/config.html#substitutions
|
|
# passes in '\\{"ipmi_user": "user"\\}' which breaks json.loads()
|
|
# ValueError: No JSON object could be decoded
|
|
# molteniron \
|
|
# add_json_blob test3 \
|
|
# 10.1.2.3 \
|
|
# 10.1.2.7,10.1.2.8 \
|
|
# '{"ipmi_user": "user", "ipmi_password": "password", "port_hwaddr": "de:ad:be:ef:00:01", "cpu_arch": "ppc64el", "cpus": 8, "ram_mb": 2048, "disk_gb": 32''}'
|
|
molteniron \
|
|
allocate hamzy 1
|
|
molteniron \
|
|
get_field hamzy port_hwaddr
|
|
molteniron \
|
|
release hamzy
|
|
# Sadly needs a bash shell to run uuidgen
|
|
test_hook_mi_ipmiblob.sh
|
|
diff testenv/tmp/hardware_info molteniron/tests/hardware_info.good
|
|
diff testenv/tmp/localrc molteniron/tests/localrc.good
|
|
python \
|
|
molteniron/tests/testAllocateBM.py
|
|
python \
|
|
molteniron/tests/testAddBMNode.py
|
|
python \
|
|
molteniron/tests/testCull.py
|
|
python \
|
|
molteniron/tests/testDeallocateBM.py
|
|
python \
|
|
molteniron/tests/testDeallocateOwner.py
|
|
python \
|
|
molteniron/tests/testDoClean.py
|
|
python \
|
|
molteniron/tests/testGetField.py
|
|
python \
|
|
molteniron/tests/testGetIps.py
|
|
python \
|
|
molteniron/tests/testRemoveBMNode.py
|
|
moltenirond-helper \
|
|
--pid-dir=testenv/var/run/ \
|
|
stop
|
|
|
|
[testenv:pep8]
|
|
commands = flake8 {posargs}
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:cover]
|
|
commands = python setup.py test --coverage --testr-args='{posargs}'
|
|
|
|
[testenv:docs]
|
|
commands = python setup.py build_sphinx
|
|
|
|
[testenv:releasenotes]
|
|
commands =
|
|
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
|
|
[testenv:debug]
|
|
commands = oslo_debug_helper {posargs}
|
|
|
|
[flake8]
|
|
# E123, E125 skipped as they are invalid PEP-8.
|
|
|
|
show-source = True
|
|
ignore = E123,E125
|
|
builtins = _
|
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
|