mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 15:36:27 +00:00
commit
ff79056522
5 changed files with 54 additions and 14 deletions
14
.gitignore
vendored
14
.gitignore
vendored
|
@ -1,14 +1,14 @@
|
||||||
*.pyc
|
*.pyc
|
||||||
# Jekyll-generated files
|
# Jekyll-generated files
|
||||||
Gemfile.lock
|
/Gemfile.lock
|
||||||
_site/
|
/_site/
|
||||||
# When developing for ec2 `vagrant provision' is quite handy
|
# When developing for ec2 `vagrant provision' is quite handy
|
||||||
/Vagrantfile
|
/Vagrantfile
|
||||||
/.vagrant
|
/.vagrant/
|
||||||
# Building the package
|
# Building the package
|
||||||
/build
|
/build/
|
||||||
/dist
|
/dist/
|
||||||
/bootstrap_vz.egg-info
|
/bootstrap_vz.egg-info/
|
||||||
# Testing
|
# Testing
|
||||||
/.coverage
|
/.coverage
|
||||||
/.tox
|
/.tox/
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
bootstrap-vz
|
bootstrap-vz
|
||||||
===========================================
|
===========================================
|
||||||
|
|
||||||
bootstrap-vz is a bootstrapping framework for Debian.
|
bootstrap-vz is a bootstrapping framework for Debian.
|
||||||
It is is specifically targeted at bootstrapping systems for virtualized environments.
|
It is is specifically targeted at bootstrapping systems for virtualized environments.
|
||||||
bootstrap-vz runs without any user intervention and generates ready-to-boot images for
|
bootstrap-vz runs without any user intervention and generates ready-to-boot images for
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
provider: "ec2"
|
provider: "ec2"
|
||||||
virtualization: "pvm"
|
virtualization: "pvm"
|
||||||
credentials:
|
credentials:
|
||||||
access-key: null
|
access-key: ""
|
||||||
secret-key: null
|
secret-key: ""
|
||||||
bootstrapper:
|
bootstrapper:
|
||||||
workspace: "/target"
|
workspace: "/target"
|
||||||
image:
|
image:
|
||||||
|
|
39
tests/integration/manifests_tests.py
Normal file
39
tests/integration/manifests_tests.py
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
import os
|
||||||
|
from nose.tools import assert_true
|
||||||
|
from bootstrapvz.base.manifest import Manifest
|
||||||
|
|
||||||
|
MANIFEST_DIR = os.path.join(
|
||||||
|
os.path.dirname(os.path.realpath(__file__)),
|
||||||
|
'../../manifests'
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
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.
|
||||||
|
"""
|
||||||
|
for fobj in os.listdir(MANIFEST_DIR):
|
||||||
|
path = os.path.join(os.path.abspath(MANIFEST_DIR), fobj)
|
||||||
|
|
||||||
|
yield validate_manifests, path
|
||||||
|
|
||||||
|
|
||||||
|
def validate_manifests(path):
|
||||||
|
"""
|
||||||
|
manifests_tests - validate_manifests.
|
||||||
|
|
||||||
|
Actually creates the manifest for a given path
|
||||||
|
and checks that all the data values have successfully
|
||||||
|
been created.
|
||||||
|
"""
|
||||||
|
manifest = Manifest(path)
|
||||||
|
|
||||||
|
assert_true(manifest.data)
|
||||||
|
assert_true(manifest.data['provider'])
|
||||||
|
assert_true(manifest.data['bootstrapper'])
|
||||||
|
assert_true(manifest.data['image'])
|
||||||
|
assert_true(manifest.data['volume'])
|
||||||
|
assert_true(manifest.data['system'])
|
10
tox.ini
10
tox.ini
|
@ -3,12 +3,14 @@ ignore = E101,E221,E241,E501,W191
|
||||||
max-line-length = 110
|
max-line-length = 110
|
||||||
|
|
||||||
[tox]
|
[tox]
|
||||||
envlist = flake8
|
envlist = flake8, integration
|
||||||
|
|
||||||
[testenv:flake8]
|
[testenv:flake8]
|
||||||
deps = flake8
|
deps = flake8
|
||||||
commands = flake8 bootstrapvz/ --exclude=minify_json.py
|
commands = flake8 bootstrapvz/ --exclude=minify_json.py
|
||||||
|
|
||||||
# Once tests have started being written, uncomment this to run tests when running tox.
|
[testenv:integration]
|
||||||
#[testenv]
|
deps =
|
||||||
#commands = nosetests -v tests --with-coverage --cover-package=bootstrapvz --cover-inclusive
|
nose
|
||||||
|
nose-cov
|
||||||
|
commands = nosetests -v tests/integration --with-coverage --cover-package=bootstrapvz --cover-inclusive
|
||||||
|
|
Loading…
Add table
Reference in a new issue