~maas-committers/maas/trunk

« back to all changes in this revision

Viewing changes to src/provisioningserver/tests/test_kernel_opts.py

Merge 1.2 into trunk, resolve conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
133
133
                "overlayroot=tmpfs",
134
134
                "ip=::::%s:BOOTIF" % params.hostname]))
135
135
 
 
136
    def test_commissioning_compose_kernel_command_line_inc_extra_opts(self):
 
137
        extra_opts = "special console=ABCD -- options to pass"
 
138
        params = make_kernel_parameters(extra_opts=extra_opts)
 
139
        cmdline = compose_kernel_command_line(params)
 
140
        # There should be a blank space before the options, but otherwise added
 
141
        # verbatim.
 
142
        self.assertThat(cmdline, Contains(' ' + extra_opts))
 
143
 
 
144
    def test_commissioning_compose_kernel_command_line_handles_extra_opts_None(self):
 
145
        params = make_kernel_parameters(extra_opts=None)
 
146
        cmdline = compose_kernel_command_line(params)
 
147
        self.assertNotIn(cmdline, "None")
 
148
 
136
149
    def test_compose_kernel_command_line_inc_common_opts(self):
137
150
        # Test that some kernel arguments appear on both commissioning
138
151
        # and install command lines.