~curtin-dev/curtin/trunk

« back to all changes in this revision

Viewing changes to tests/vmtests/test_vmtests.py

  • Committer: Scott Moser
  • Date: 2017-12-20 17:33:03 UTC
  • Revision ID: smoser@ubuntu.com-20171220173303-29gha5qb8wpqrd40
README: Mention move of revision control to git.

curtin development has moved its revision control to git.
It is available at
  https://code.launchpad.net/curtin

Clone with
  git clone https://git.launchpad.net/curtin
or
  git clone git+ssh://git.launchpad.net/curtin

For more information see
  http://curtin.readthedocs.io/en/latest/topics/development.html

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
"""
2
 
This just tests the vmtest harness.  Useful for quickly running
3
 
multiple tests that can pass or fail.
4
 
 
5
 
To see these tests fail, run:
6
 
  CURTIN_VMTEST_DEBUG_ALLOW_FAIL=1 nosetests3 tests/vmtests/test_vmtests.py
7
 
"""
8
 
 
9
 
from . import (PsuedoVMBaseClass)
10
 
from .releases import base_vm_classes as relbase
11
 
 
12
 
 
13
 
class PsuedoBase(PsuedoVMBaseClass):
14
 
    # Just present to show structure used in other tests
15
 
    pass
16
 
 
17
 
 
18
 
class PsuedoTestAllPass(relbase.trusty, PsuedoBase):
19
 
    __test__ = True
20
 
    # These boot_results would cause first_boot failure
21
 
    # boot_results = {
22
 
    #   'install': {'timeout': 0, 'exit': 0},
23
 
    #   'first_boot': {'timeout': 0, 'exit': 1},
24
 
    # }
25
 
 
26
 
    def test_pass(self):
27
 
        pass
28
 
 
29
 
    def test_pass2(self):
30
 
        pass
31
 
 
32
 
 
33
 
class PsuedoTestMixedPassAndFail(relbase.xenial, PsuedoBase):
34
 
    __test__ = True
35
 
 
36
 
    def test_pass(self):
37
 
        pass
38
 
 
39
 
    def test_fail(self):
40
 
        self._maybe_raise(Exception("This failed."))
41
 
 
42
 
    def test_fail2(self):
43
 
        self._maybe_raise(Exception("This second test failed."))