Exemplo n.º 1
0
    def test_version_strings(self):
        linux_dist = version_config.get_linux_dist()
        self.assertTrue(linux_dist == version_config.LINUX_CENTOS or linux_dist == version_config.LINUX_UBUNTU)

        test_list = [
            (("2:5.0", "201509090010.2f5a1d9"), "2:5.0.0-201509090010.2f5a1d9"),
            (("05.02", "0.0.201509011045.80d8d50"), "5.2.0-201509011045.80d8d50"),
            (("1.9.5", "rc3"), "1.9.5-rc3"),
            (("5.0", "0.0.201509011045.80d8d50.el7"), "5.0.0-201509011045.80d8d50"),
            (("1.8.9", "0.1.rc0.el7"), "1.8.9-rc0"),
            (("1.9.4", "rc0"), "1.9.4-rc0"),
        ]

        for args, expected in test_list:
            mn_version = version_config.parse_midolman_version(*args)
            self.assertEqual(expected, str(mn_version))
Exemplo n.º 2
0
 def test_vars(self):
     print version_config.ConfigMap.get_configured_parameter("mn_version", config_json=CFG_FILE)
     print version_config.ConfigMap.get_configured_parameter("cmd_list_datapath", config_json=CFG_FILE)
     print version_config.ConfigMap.get_configured_parameter("option_config_mnconf", config_json=CFG_FILE)
     print version_config.ConfigMap.get_configured_parameter("option_use_v2_stack", config_json=CFG_FILE)
     print version_config.get_linux_dist()