bootstrap-vz/tests/integration/virtualbox_tests.py
Anders Ingemann e271f3e49a Initial work on integration testing started.
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
2015-04-16 22:15:17 +02:00

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()