File: docker_tests.py

package info (click to toggle)
bootstrap-vz 0.9.11%2B20180121git-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,244 kB
  • sloc: python: 8,800; sh: 813; makefile: 16
file content (29 lines) | stat: -rw-r--r-- 643 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
from manifests import merge_manifest_data
from tools import boot_manifest

partials = {'docker': '''
provider:
  name: docker
  virtualization: hvm
  dockerfile: CMD /bin/bash
bootstrapper:
  variant: minbase
system:
  bootloader: none
volume:
  backing: folder
  partitions:
    type: none
    root:
      filesystem: ext4
      size: 1GiB
''',
            }


def test_stable():
    std_partials = ['base', 'stable64']
    custom_partials = [partials['docker']]
    manifest_data = merge_manifest_data(std_partials, custom_partials)
    with boot_manifest(manifest_data) as instance:
        print('\n'.join(instance.run(['echo', 'test'])))