mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 07:26:29 +00:00
commit
ff79056522
5 changed files with 54 additions and 14 deletions
14
.gitignore
vendored
14
.gitignore
vendored
|
@ -1,14 +1,14 @@
|
|||
*.pyc
|
||||
# Jekyll-generated files
|
||||
Gemfile.lock
|
||||
_site/
|
||||
/Gemfile.lock
|
||||
/_site/
|
||||
# When developing for ec2 `vagrant provision' is quite handy
|
||||
/Vagrantfile
|
||||
/.vagrant
|
||||
/.vagrant/
|
||||
# Building the package
|
||||
/build
|
||||
/dist
|
||||
/bootstrap_vz.egg-info
|
||||
/build/
|
||||
/dist/
|
||||
/bootstrap_vz.egg-info/
|
||||
# Testing
|
||||
/.coverage
|
||||
/.tox
|
||||
/.tox/
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
bootstrap-vz
|
||||
===========================================
|
||||
|
||||
bootstrap-vz is a bootstrapping framework for Debian.
|
||||
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
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
provider: "ec2"
|
||||
virtualization: "pvm"
|
||||
credentials:
|
||||
access-key: null
|
||||
secret-key: null
|
||||
access-key: ""
|
||||
secret-key: ""
|
||||
bootstrapper:
|
||||
workspace: "/target"
|
||||
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
|
||||
|
||||
[tox]
|
||||
envlist = flake8
|
||||
envlist = flake8, integration
|
||||
|
||||
[testenv:flake8]
|
||||
deps = flake8
|
||||
commands = flake8 bootstrapvz/ --exclude=minify_json.py
|
||||
|
||||
# Once tests have started being written, uncomment this to run tests when running tox.
|
||||
#[testenv]
|
||||
#commands = nosetests -v tests --with-coverage --cover-package=bootstrapvz --cover-inclusive
|
||||
[testenv:integration]
|
||||
deps =
|
||||
nose
|
||||
nose-cov
|
||||
commands = nosetests -v tests/integration --with-coverage --cover-package=bootstrapvz --cover-inclusive
|
||||
|
|
Loading…
Add table
Reference in a new issue