Commit 2469f36b authored by Marco Mariani's avatar Marco Mariani

updated tests

parent 27c3df49
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
import os import os
import shutil import shutil
import slapos.entry as entry from slapos.cli_legacy import entry
import sys import sys
import tempfile import tempfile
import unittest import unittest
......
...@@ -243,7 +243,9 @@ class TestComputer(SlapformatMixin): ...@@ -243,7 +243,9 @@ class TestComputer(SlapformatMixin):
@unittest.skip("Not implemented") @unittest.skip("Not implemented")
def test_construct_empty_prepared(self): def test_construct_empty_prepared(self):
computer = slapos.format.Computer('computer', computer = slapos.format.Computer('computer',
interface=slapos.format.Interface('bridge', '127.0.0.1/16')) interface=slapos.format.Interface(logger=self.test_result,
name='bridge',
ipv4_local_network='127.0.0.1/16'))
computer.instance_root = '/instance_root' computer.instance_root = '/instance_root'
computer.software_root = '/software_root' computer.software_root = '/software_root'
computer.construct() computer.construct()
...@@ -262,7 +264,9 @@ class TestComputer(SlapformatMixin): ...@@ -262,7 +264,9 @@ class TestComputer(SlapformatMixin):
def test_construct_empty_prepared_no_alter_user(self): def test_construct_empty_prepared_no_alter_user(self):
computer = slapos.format.Computer('computer', computer = slapos.format.Computer('computer',
interface=slapos.format.Interface('bridge', '127.0.0.1/16')) interface=slapos.format.Interface(logger=self.test_result,
name='bridge',
ipv4_local_network='127.0.0.1/16'))
computer.instance_root = '/instance_root' computer.instance_root = '/instance_root'
computer.software_root = '/software_root' computer.software_root = '/software_root'
computer.construct(alter_user=False) computer.construct(alter_user=False)
...@@ -278,7 +282,9 @@ class TestComputer(SlapformatMixin): ...@@ -278,7 +282,9 @@ class TestComputer(SlapformatMixin):
@unittest.skip("Not implemented") @unittest.skip("Not implemented")
def test_construct_empty_prepared_no_alter_network(self): def test_construct_empty_prepared_no_alter_network(self):
computer = slapos.format.Computer('computer', computer = slapos.format.Computer('computer',
interface=slapos.format.Interface('bridge', '127.0.0.1/16')) interface=slapos.format.Interface(logger=self.test_result,
name='bridge',
ipv4_local_network='127.0.0.1/16'))
computer.instance_root = '/instance_root' computer.instance_root = '/instance_root'
computer.software_root = '/software_root' computer.software_root = '/software_root'
computer.construct(alter_network=False) computer.construct(alter_network=False)
...@@ -297,7 +303,9 @@ class TestComputer(SlapformatMixin): ...@@ -297,7 +303,9 @@ class TestComputer(SlapformatMixin):
def test_construct_empty_prepared_no_alter_network_user(self): def test_construct_empty_prepared_no_alter_network_user(self):
computer = slapos.format.Computer('computer', computer = slapos.format.Computer('computer',
interface=slapos.format.Interface('bridge', '127.0.0.1/16')) interface=slapos.format.Interface(logger=self.test_result,
name='bridge',
ipv4_local_network='127.0.0.1/16'))
computer.instance_root = '/instance_root' computer.instance_root = '/instance_root'
computer.software_root = '/software_root' computer.software_root = '/software_root'
computer.construct(alter_network=False, alter_user=False) computer.construct(alter_network=False, alter_user=False)
...@@ -314,7 +322,9 @@ class TestComputer(SlapformatMixin): ...@@ -314,7 +322,9 @@ class TestComputer(SlapformatMixin):
@unittest.skip("Not implemented") @unittest.skip("Not implemented")
def test_construct_prepared(self): def test_construct_prepared(self):
computer = slapos.format.Computer('computer', computer = slapos.format.Computer('computer',
interface=slapos.format.Interface('bridge', '127.0.0.1/16')) interface=slapos.format.Interface(logger=self.test_result,
name='bridge',
ipv4_local_network='127.0.0.1/16'))
computer.instance_root = '/instance_root' computer.instance_root = '/instance_root'
computer.software_root = '/software_root' computer.software_root = '/software_root'
partition = slapos.format.Partition('partition', '/part_path', partition = slapos.format.Partition('partition', '/part_path',
...@@ -358,7 +368,9 @@ class TestComputer(SlapformatMixin): ...@@ -358,7 +368,9 @@ class TestComputer(SlapformatMixin):
def test_construct_prepared_no_alter_user(self): def test_construct_prepared_no_alter_user(self):
computer = slapos.format.Computer('computer', computer = slapos.format.Computer('computer',
interface=slapos.format.Interface('bridge', '127.0.0.1/16')) interface=slapos.format.Interface(logger=self.test_result,
name='bridge',
ipv4_local_network='127.0.0.1/16'))
computer.instance_root = '/instance_root' computer.instance_root = '/instance_root'
computer.software_root = '/software_root' computer.software_root = '/software_root'
partition = slapos.format.Partition('partition', '/part_path', partition = slapos.format.Partition('partition', '/part_path',
...@@ -399,7 +411,9 @@ class TestComputer(SlapformatMixin): ...@@ -399,7 +411,9 @@ class TestComputer(SlapformatMixin):
@unittest.skip("Not implemented") @unittest.skip("Not implemented")
def test_construct_prepared_no_alter_network(self): def test_construct_prepared_no_alter_network(self):
computer = slapos.format.Computer('computer', computer = slapos.format.Computer('computer',
interface=slapos.format.Interface('bridge', '127.0.0.1/16')) interface=slapos.format.Interface(logger=self.test_result,
name='bridge',
ipv4_local_network='127.0.0.1/16'))
computer.instance_root = '/instance_root' computer.instance_root = '/instance_root'
computer.software_root = '/software_root' computer.software_root = '/software_root'
partition = slapos.format.Partition('partition', '/part_path', partition = slapos.format.Partition('partition', '/part_path',
...@@ -439,7 +453,9 @@ class TestComputer(SlapformatMixin): ...@@ -439,7 +453,9 @@ class TestComputer(SlapformatMixin):
def test_construct_prepared_no_alter_network_user(self): def test_construct_prepared_no_alter_network_user(self):
computer = slapos.format.Computer('computer', computer = slapos.format.Computer('computer',
interface=slapos.format.Interface('bridge', '127.0.0.1/16')) interface=slapos.format.Interface(logger=self.test_result,
name='bridge',
ipv4_local_network='127.0.0.1/16'))
computer.instance_root = '/instance_root' computer.instance_root = '/instance_root'
computer.software_root = '/software_root' computer.software_root = '/software_root'
partition = slapos.format.Partition('partition', '/part_path', partition = slapos.format.Partition('partition', '/part_path',
......
...@@ -44,6 +44,8 @@ import unittest ...@@ -44,6 +44,8 @@ import unittest
import urlparse import urlparse
import xml_marshaller import xml_marshaller
dummylogger = logging.getLogger()
WATCHDOG_TEMPLATE = """#!%(python_path)s -S WATCHDOG_TEMPLATE = """#!%(python_path)s -S
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment