~terceiro/lava-dispatcher/filter-ansi-color-codes

« back to all changes in this revision

Viewing changes to lava_dispatcher/tests/test_config.py

  • Committer: Antonio Terceiro
  • Date: 2013-08-07 16:14:32 UTC
  • mfrom: (644.1.1 fix-unit-tests)
  • Revision ID: antonio.terceiro@linaro.org-20130807161432-ktl11lo81x0u2qwa
update from parent branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
from lava_dispatcher.tests.helper import *
27
27
 
28
 
test_config_dir = os.path.join(os.path.dirname(__file__), 'test-config')
29
 
 
30
 
 
31
 
class TestConfigData(TestCase):
32
 
 
33
 
    def setUp(self):
34
 
        setup_config_dir()
35
 
        lava_dispatcher.config.custom_config_path = test_config_dir
36
 
 
37
 
    def tearDown(self):
38
 
        cleanup_config_dir()
39
 
        lava_dispatcher.config.custom_config_path = None
40
 
 
41
 
    def test_beagle01_uboot_cmds(self):
42
 
        beagle01_config = get_device_config("beaglexm01")
43
 
        expected = [
44
 
            "mmc init",
45
 
            "mmc part 0",
46
 
            "setenv bootcmd 'fatload mmc 0:3 0x80000000 uImage; fatload mmc "
47
 
            "0:3 0x81600000 uInitrd; bootm 0x80000000 0x81600000'",
48
 
            "setenv bootargs ' console=tty0 console=ttyO2,115200n8 "
49
 
            "root=LABEL=testrootfs rootwait ro earlyprintk fixrtc "
50
 
            "nocompcache vram=12M omapfb.debug=y "
51
 
            "omapfb.mode=dvi:1280x720MR-16@60'",
52
 
            "boot"]
53
 
        uboot_cmds = beagle01_config.boot_cmds
54
 
        self.assertEquals(expected, string_to_list(uboot_cmds))
 
28
class TestConfigData(LavaDispatcherTestCase):
55
29
 
56
30
    def test_server_ip(self):
 
31
        create_config('lava-dispatcher.conf', { 'LAVA_SERVER_IP': '99.99.99.99' })
57
32
        server_config = get_config()
58
 
        expected = "192.168.200.200"
 
33
        expected = "99.99.99.99"
59
34
        lava_server_ip = server_config.lava_server_ip
60
35
        self.assertEqual(expected, lava_server_ip)