enhance singleton testing
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
This commit is contained in:
parent
8ab760ad90
commit
c1441fc676
4 changed files with 17 additions and 0 deletions
|
|
@ -83,6 +83,13 @@ class EmulatorTestCase(test.CdistTestCase):
|
|||
emu = emulator.Emulator(argv, env=self.env)
|
||||
self.assertRaises(core.cdist_object.MissingObjectIdError, emu.run)
|
||||
|
||||
def test_no_singleton_no_requirement(self):
|
||||
argv = ['__file', '/tmp/foobar']
|
||||
self.env['require'] = '__test_singleton'
|
||||
emu = emulator.Emulator(argv, env=self.env)
|
||||
emu.run()
|
||||
# If reached here, everything is fine
|
||||
|
||||
def test_singleton_object_requirement(self):
|
||||
argv = ['__file', '/tmp/foobar']
|
||||
self.env['require'] = '__issue'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue