From c4637af0cf40222a8e745b7dd2f2c0ce9c64b494 Mon Sep 17 00:00:00 2001 From: Anders Ingemann Date: Sat, 11 Apr 2015 13:54:59 +0200 Subject: [PATCH] Integration testing for S3 backed PVM instances --- tests/integration/ec2_s3_pvm.py | 41 +++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 tests/integration/ec2_s3_pvm.py diff --git a/tests/integration/ec2_s3_pvm.py b/tests/integration/ec2_s3_pvm.py new file mode 100644 index 0000000..da64923 --- /dev/null +++ b/tests/integration/ec2_s3_pvm.py @@ -0,0 +1,41 @@ +from manifests import merge_manifest_data +from tools import boot_manifest +import random + +s3_bucket_name = '{id:x}'.format(id=random.randrange(16 ** 16)) +partials = {'s3_pvm': ''' +provider: + name: ec2 + virtualization: pvm +image: {bucket: ''' + s3_bucket_name + '''} +system: {bootloader: pvgrub} +volume: {backing: s3} +''' + } + + +def test_unpartitioned_oldstable(): + std_partials = ['base', 'oldstable64', 'unpartitioned', 'root_password'] + custom_partials = [partials['s3_pvm']] + manifest_data = merge_manifest_data(std_partials, custom_partials) + boot_vars = {'instance_type': 'm1.small'} + with boot_manifest(manifest_data, boot_vars) as instance: + print(instance.get_console_output().output) + + +def test_unpartitioned_stable(): + std_partials = ['base', 'stable64', 'unpartitioned', 'root_password'] + custom_partials = [partials['s3_pvm']] + manifest_data = merge_manifest_data(std_partials, custom_partials) + boot_vars = {'instance_type': 'm1.small'} + with boot_manifest(manifest_data, boot_vars) as instance: + print(instance.get_console_output().output) + + +def test_unpartitioned_unstable(): + std_partials = ['base', 'unstable64', 'unpartitioned', 'root_password'] + custom_partials = [partials['s3_pvm']] + manifest_data = merge_manifest_data(std_partials, custom_partials) + boot_vars = {'instance_type': 'm1.small'} + with boot_manifest(manifest_data, boot_vars) as instance: + print(instance.get_console_output().output)