mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-22 09:50:37 +00:00
Add first integration test
This takes all the manifests and does a dry-run on them. The plan is to later on enable testing of partial plugin examples as well.
This commit is contained in:
parent
6a7a6e21d5
commit
77307e3bbf
3 changed files with 32 additions and 0 deletions
0
tests/integration/__init__.py
Normal file
0
tests/integration/__init__.py
Normal file
26
tests/integration/dry_run_tests.py
Normal file
26
tests/integration/dry_run_tests.py
Normal file
|
@ -0,0 +1,26 @@
|
|||
|
||||
|
||||
def test_manifest_generator():
|
||||
"""
|
||||
manifests_tests - test_manifest_generator.
|
||||
|
||||
Loops through the manifests directory and tests that
|
||||
each file can successfully be loaded and validated.
|
||||
"""
|
||||
|
||||
from bootstrapvz.base.manifest import Manifest
|
||||
from bootstrapvz.base.main import run
|
||||
|
||||
def dry_run(path):
|
||||
manifest = Manifest(path=path)
|
||||
run(manifest, dry_run=True)
|
||||
|
||||
import os.path
|
||||
from .. import recursive_glob
|
||||
from itertools import chain
|
||||
manifests = os.path.join(os.path.dirname(os.path.realpath(__file__)),
|
||||
'../../manifests')
|
||||
manifest_paths = chain(recursive_glob(manifests, '*.yml'), recursive_glob(manifests, '*.json'))
|
||||
for manifest_path in manifest_paths:
|
||||
dry_run.description = "Dry-running %s" % os.path.relpath(manifest_path, manifests)
|
||||
yield dry_run, manifest_path
|
6
tox.ini
6
tox.ini
|
@ -15,6 +15,12 @@ deps =
|
|||
nose-cov
|
||||
commands = nosetests --with-coverage --cover-package=bootstrapvz --cover-inclusive --verbose {posargs:tests/unit}
|
||||
|
||||
[testenv:integration]
|
||||
deps =
|
||||
nose
|
||||
nose-cov
|
||||
commands = nosetests --with-coverage --cover-package=bootstrapvz --cover-inclusive --verbose {posargs:tests/integration}
|
||||
|
||||
[testenv:system]
|
||||
deps =
|
||||
nose
|
||||
|
|
Loading…
Add table
Reference in a new issue