From ece34c7a3dcf512143a68e3995e706ea357bf2de Mon Sep 17 00:00:00 2001 From: Ivan Mikushin Date: Wed, 6 May 2015 18:23:16 +0500 Subject: [PATCH] py.test module: integration --- .gitignore | 3 +++ tests/integration/README.txt | 1 + tests/integration/rancherostest/test_sample.py | 6 ++++++ tests/integration/requirements.txt | 4 ++++ tests/integration/setup.py | 11 +++++++++++ tests/integration/tox.ini | 12 ++++++++++++ 6 files changed, 37 insertions(+) create mode 100644 tests/integration/README.txt create mode 100644 tests/integration/rancherostest/test_sample.py create mode 100644 tests/integration/requirements.txt create mode 100644 tests/integration/setup.py create mode 100644 tests/integration/tox.ini diff --git a/.gitignore b/.gitignore index f7bb8f07..766527ca 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,6 @@ .dockerfile *.swp Dockerfile +/tests/integration/MANIFEST +/tests/integration/.venv +/tests/integration/.tox diff --git a/tests/integration/README.txt b/tests/integration/README.txt new file mode 100644 index 00000000..b141b71e --- /dev/null +++ b/tests/integration/README.txt @@ -0,0 +1 @@ +RancherOS Integration Tests diff --git a/tests/integration/rancherostest/test_sample.py b/tests/integration/rancherostest/test_sample.py new file mode 100644 index 00000000..1030a2e3 --- /dev/null +++ b/tests/integration/rancherostest/test_sample.py @@ -0,0 +1,6 @@ +def func(x): + return x + 1 + + +def test_answer(): + assert func(3) == 4 diff --git a/tests/integration/requirements.txt b/tests/integration/requirements.txt new file mode 100644 index 00000000..78314c8d --- /dev/null +++ b/tests/integration/requirements.txt @@ -0,0 +1,4 @@ +flake8==2.4.0 +pytest==2.7.0 +tox==1.9.2 +virtualenv==12.1.1 diff --git a/tests/integration/setup.py b/tests/integration/setup.py new file mode 100644 index 00000000..fba2685f --- /dev/null +++ b/tests/integration/setup.py @@ -0,0 +1,11 @@ +from distutils.core import setup + +setup( + name='RancherOSIntegrationTests', + version='0.1', + packages=[ + 'rancherostest' + ], + license='ASL 2.0', + long_description=open('README.txt').read(), +) diff --git a/tests/integration/tox.ini b/tests/integration/tox.ini new file mode 100644 index 00000000..2ee35660 --- /dev/null +++ b/tests/integration/tox.ini @@ -0,0 +1,12 @@ +[tox] +envlist=flake8, py27 + +[testenv] +deps=-rrequirements.txt +changedir={toxinidir} +commands=py.test --durations=20 {posargs} + +[testenv:flake8] +deps=-rrequirements.txt +changedir={toxinidir} +commands=flake8 rancherostest