diff --git a/.gitignore b/.gitignore index ca3c9ea..3a6afa9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ .idea *.swp +.testrepository +.tox diff --git a/.gitreview b/.gitreview new file mode 100644 index 0000000..5ea5f11 --- /dev/null +++ b/.gitreview @@ -0,0 +1,4 @@ +[gerrit] +host=review.openstack.org +port=29418 +project=openstack/charm-interface-ceph-mds diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 0000000..1bae0c7 --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1,2 @@ +flake8>=2.2.4,<=2.4.1 +os-testr>=0.4.1 \ No newline at end of file diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..0facda6 --- /dev/null +++ b/tox.ini @@ -0,0 +1,43 @@ +[tox] +envlist = pep8,py27,py34,py35 +skipsdist = True +skip_missing_interpreters = True + +[testenv] +setenv = VIRTUAL_ENV={envdir} + PYTHONHASHSEED=0 +install_command = + pip install --allow-unverified python-apt {opts} {packages} +commands = ostestr {posargs} + +[testenv:py27] +basepython = python2.7 +deps = -r{toxinidir}/test-requirements.txt +# TODO: Need to write unit tests then remove the following command. +# https://github.com/juju/charm-tools/issues/249 +commands = /bin/true + +[testenv:py34] +basepython = python3.4 +deps = -r{toxinidir}/test-requirements.txt +# TODO: Need to write unit tests then remove the following command. +# https://github.com/juju/charm-tools/issues/249 +commands = /bin/true + +[testenv:py35] +basepython = python3.5 +deps = -r{toxinidir}/test-requirements.txt +# TODO: Need to write unit tests then remove the following command. +# https://github.com/juju/charm-tools/issues/249 +commands = /bin/true + +[testenv:pep8] +basepython = python2.7 +deps = -r{toxinidir}/test-requirements.txt +commands = flake8 {posargs} + +[testenv:venv] +commands = {posargs} + +[flake8] +ignore = E402,E226