mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 07:26:29 +00:00

The work consists of three parts: * Allow for bootstrapping remotely, this makes it possible to run the tests on e.g. OSX with VirtualBox installed * Make bootstrapping a fully automated process where the manifests can be generated by the tests and the tests can call the bootstrapper directly in python * Create a framework wherein instances can be booted up using the bootstrapped images and subsequently tested
28 lines
973 B
Python
28 lines
973 B
Python
import tools
|
|
from . import manifests
|
|
from . import build_settings
|
|
|
|
|
|
def test_virtualbox_unpartitioned_extlinux():
|
|
specific_settings = {}
|
|
specific_settings['provider'] = {'name': 'virtualbox',
|
|
'guest_additions': build_settings['virtualbox']['guest_additions']}
|
|
specific_settings['system'] = {'release': 'wheezy',
|
|
'architecture': 'amd64',
|
|
'bootloader': 'extlinux'}
|
|
specific_settings['volume'] = {'backing': 'vdi',
|
|
'partitions': {'type': 'msdos'}}
|
|
manifest = tools.merge_dicts(manifests['base'], manifests['unpartitioned'], specific_settings)
|
|
|
|
client = tools.get_client(build_settings['virtualbox'])
|
|
|
|
image = client.bootstrap(manifest, build_settings['virtualbox'])
|
|
instance = image.create_instance()
|
|
instance.boot()
|
|
|
|
tools.test_instance(instance, build_settings['virtualbox'])
|
|
|
|
instance.destroy()
|
|
image.destroy()
|
|
|
|
client.shutdown()
|