~allenap/maas/normalise-logging--bug-1639182--yakkety

« back to all changes in this revision

Viewing changes to src/provisioningserver/boot/tests/test_uefi_amd64.py

  • Committer: MAAS Lander
  • Author(s): Lee Trager
  • Date: 2016-11-07 21:52:22 UTC
  • mfrom: (5539.2.4 lp1639258)
  • Revision ID: maas_lander-20161107215222-gsh65bsta6fjd4wg
[r=blake-rouse][bug=1639258][author=ltrager] Send the boot kernel, initrd, and dtb filename when GetBootConfig is requested.

Show diffs side-by-side

added added

removed removed

Lines of Context:
76
76
        # Given the right configuration options, the UEFI configuration is
77
77
        # correctly rendered.
78
78
        method = UEFIAMD64BootMethod()
79
 
        params = make_kernel_parameters(purpose="install")
 
79
        params = make_kernel_parameters(purpose="xinstall")
80
80
        output = method.get_reader(backend=None, kernel_params=params)
81
81
        # The output is a BytesReader.
82
82
        self.assertThat(output, IsInstance(BytesReader))
92
92
        self.assertThat(
93
93
            output, MatchesAll(
94
94
                MatchesRegex(
95
 
                    r'.*^\s+linux  %s/di-kernel .+?$' % re.escape(image_dir),
 
95
                    r'.*^\s+linux  %s/%s .+?$' % (
 
96
                        re.escape(image_dir), params.kernel),
96
97
                    re.MULTILINE | re.DOTALL),
97
98
                MatchesRegex(
98
 
                    r'.*^\s+initrd %s/di-initrd$' % re.escape(image_dir),
 
99
                    r'.*^\s+initrd %s/%s$' % (
 
100
                        re.escape(image_dir), params.initrd),
99
101
                    re.MULTILINE | re.DOTALL)))
100
102
 
101
103
    def test_get_reader_with_extra_arguments_does_not_affect_output(self):
143
145
            [
144
146
                "menuentry 'Enlist'",
145
147
                "%s/%s/%s" % (params.osystem, params.arch, params.subarch),
146
 
                "boot-kernel",
 
148
                params.kernel,
147
149
            ]))
148
150
 
149
151
    def test_get_reader_with_commissioning_purpose(self):
161
163
            [
162
164
                "menuentry 'Commission'",
163
165
                "%s/%s/%s" % (params.osystem, params.arch, params.subarch),
164
 
                "boot-kernel",
 
166
                params.kernel,
165
167
            ]))
166
168
 
167
169