Пример #1
0
    def test_build_default_entries(self):
        """ Default menu entry unit test for AI ISO
        """
        self.boot_menu = AIISOImageBootMenu("Test AIISOBootMenu Checkpoint")
        self.boot_menu.parse_doc()

        # This assignment permits convenient copy and paste from the
        # AIISOImageBootMenu checkpoint codes ai_titles and ai_kargs values
        self.boot_title = self.boot_menu.boot_title
        ai_titles = [
            self.boot_title + " Automated Install custom",
            self.boot_title + " Automated Install",
            self.boot_title + " Automated Install custom ttya",
            self.boot_title + " Automated Install custom ttyb",
            self.boot_title + " Automated Install ttya",
            self.boot_title + " Automated Install ttyb"
        ]
        ai_kargs = [
            "-B install=true,aimanifest=prompt", "-B install=true",
            "-B install=true,aimanifest=prompt,console=ttya",
            "-B install=true,aimanifest=prompt,console=ttyb",
            "-B install=true,console=ttya", "-B install=true,console=ttyb"
        ]

        self._test_build_default_entries(ai_titles, ai_kargs)
Пример #2
0
 def test_update_img_info_path(self):
     self.boot_menu = AIISOImageBootMenu("Test AI Boot Checkpoint")
     boot_mods_dom = etree.fromstring(BOOT_MODS_XML)
     self.doc.import_from_manifest_xml(boot_mods_dom, volatile=True)
     self.boot_menu.parse_doc()
     self.boot_menu.img_info_path = tempfile.mktemp(dir=TMP_TEST_DIR,
                                                    prefix="img_info_")
     self.boot_menu.update_img_info_path()
     os.unlink(self.boot_menu.img_info_path)
Пример #3
0
class AIISOBootMenuTestCase(ISOBootMenuTestCase):
    """ Unit test class for AIIsoBootMenu class
    """
    def test_boot_timeout(self):
        self.boot_menu = AIISOImageBootMenu("Test AI Boot Checkpoint")
        super(AIISOBootMenuTestCase, self)._test_boot_timeout()

    def test_build_custom_entries(self):
        self.boot_menu = AIISOImageBootMenu("Test AI Boot Checkpoint")
        self._test_build_custom_entries()

    def test_update_img_info_path(self):
        self.boot_menu = AIISOImageBootMenu("Test AI Boot Checkpoint")
        boot_mods_dom = etree.fromstring(BOOT_MODS_XML)
        self.doc.import_from_manifest_xml(boot_mods_dom, volatile=True)
        self.boot_menu.parse_doc()
        self.boot_menu.img_info_path = tempfile.mktemp(dir=TMP_TEST_DIR,
                                                       prefix="img_info_")
        self.boot_menu.update_img_info_path()
        os.unlink(self.boot_menu.img_info_path)

    def test_install_boot_loader(self):
        self.boot_menu = AIISOImageBootMenu("Test AIISOBootMenu Checkpoint")
        self._test_install_boot_loader()

    def test_handle_boot_config_list(self):
        self.boot_menu = AIISOImageBootMenu("Test AIISOBootMenu Checkpoint")
        self._test_handle_boot_config_list()

    def test_build_default_entries(self):
        """ Default menu entry unit test for AI ISO
        """
        self.boot_menu = AIISOImageBootMenu("Test AIISOBootMenu Checkpoint")
        self.boot_menu.parse_doc()

        # This assignment permits convenient copy and paste from the
        # AIISOImageBootMenu checkpoint codes ai_titles and ai_kargs values
        self.boot_title = self.boot_menu.boot_title
        ai_titles = [
            self.boot_title + " Automated Install custom",
            self.boot_title + " Automated Install",
            self.boot_title + " Automated Install custom ttya",
            self.boot_title + " Automated Install custom ttyb",
            self.boot_title + " Automated Install ttya",
            self.boot_title + " Automated Install ttyb"
        ]
        ai_kargs = [
            "-B install=true,aimanifest=prompt", "-B install=true",
            "-B install=true,aimanifest=prompt,console=ttya",
            "-B install=true,aimanifest=prompt,console=ttyb",
            "-B install=true,console=ttya", "-B install=true,console=ttyb"
        ]

        self._test_build_default_entries(ai_titles, ai_kargs)
Пример #4
0
 def test_handle_boot_config_list(self):
     self.boot_menu = AIISOImageBootMenu("Test AIISOBootMenu Checkpoint")
     self._test_handle_boot_config_list()
Пример #5
0
 def test_install_boot_loader(self):
     self.boot_menu = AIISOImageBootMenu("Test AIISOBootMenu Checkpoint")
     self._test_install_boot_loader()
Пример #6
0
 def test_build_custom_entries(self):
     self.boot_menu = AIISOImageBootMenu("Test AI Boot Checkpoint")
     self._test_build_custom_entries()
Пример #7
0
 def test_boot_timeout(self):
     self.boot_menu = AIISOImageBootMenu("Test AI Boot Checkpoint")
     super(AIISOBootMenuTestCase, self)._test_boot_timeout()