~curtin-dev/curtin/bionic

« back to all changes in this revision

Viewing changes to tests/unittests/test_config.py

  • Committer: Scott Moser
  • Date: 2017-08-03 19:51:16 UTC
  • mfrom: (1.1.50)
  • Revision ID: smoser@ubuntu.com-20170803195116-0xc6onji18peerm5
* New upstream snapshot.
  - tests: Add CiTestCase common parent for all curtin tests.
  - vmtests: Remove force flag for centos curthooks
  - tools/jenkins-runner: improve tgtd cleanup logic
  - tests: Drop EOL Wily Vivid and Yakkety tests.
  - Disable yum plugins when installing packages, update ca-certs for https
  - Rename centos_network_curthooks -> centos_apply_network_config.
  - tests: in centos_defaults use write_files for grub serial.
  - write_files: write files after extract, change write_files signature.
  - pass network configuration through to target for ubuntu and centos
  - tests: disable yakkety tests.
  - tools/launch: automatically pass on proxy settings to curtin
  - Add top level 'proxy' to config, deprecate top level http_proxy.
  - tools/curtainer: fix to enable deb-src for -proposed.
  - Use unshare to put chroot commands in own pid namespace.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
from unittest import TestCase
2
1
import copy
3
2
import json
4
3
import textwrap
5
4
 
6
5
from curtin import config
7
 
 
8
 
 
9
 
class TestMerge(TestCase):
 
6
from .helpers import CiTestCase
 
7
 
 
8
 
 
9
class TestMerge(CiTestCase):
10
10
    def test_merge_cfg_string(self):
11
11
        d1 = {'str1': 'str_one'}
12
12
        d2 = {'dict1': {'d1.e1': 'd1-e1'}}
16
16
        self.assertEqual(d1, expected)
17
17
 
18
18
 
19
 
class TestCmdArg2Cfg(TestCase):
 
19
class TestCmdArg2Cfg(CiTestCase):
20
20
    def test_cmdarg_flat(self):
21
21
        self.assertEqual(config.cmdarg2cfg("foo=bar"), {'foo': 'bar'})
22
22
 
50
50
        self.assertEqual(via_merge, via_merge_cmdarg)
51
51
 
52
52
 
53
 
class TestConfigArchive(TestCase):
 
53
class TestConfigArchive(CiTestCase):
54
54
    def test_archive_dict(self):
55
55
        myarchive = _replace_consts(textwrap.dedent("""
56
56
            _ARCH_HEAD_