Sort the list of supported output types

This commit is contained in:
Brian C. Lane 2018-04-24 11:57:08 -07:00
parent 1fc7cff52b
commit 85f365bd73
2 changed files with 2 additions and 2 deletions

View File

@ -250,7 +250,7 @@ def compose_types(share_dir):
The output types come from the kickstart names in /usr/share/lorax/composer/\*ks
"""
return [os.path.basename(ks)[:-3] for ks in glob(joinpaths(share_dir, "composer/*.ks"))]
return sorted([os.path.basename(ks)[:-3] for ks in glob(joinpaths(share_dir, "composer/*.ks"))])
def compose_args(compose_type):
""" Returns the settings to pass to novirt_install for the compose type

View File

@ -570,7 +570,7 @@ class ServerTestCase(unittest.TestCase):
data = json.loads(resp.data)
self.assertNotEqual(data, None)
self.assertEqual(data["status"], False, "Failed to fail to start test compose: %s" % data)
self.assertEqual(data["errors"], ["Invalid compose type (snakes), must be one of ['live-iso', 'partitioned-disk', 'tar', 'qcow2', 'ext4-filesystem']"],
self.assertEqual(data["errors"], ["Invalid compose type (snakes), must be one of ['ext4-filesystem', 'live-iso', 'partitioned-disk', 'qcow2', 'tar']"],
"Failed to get errors: %s" % data)
def test_compose_03_status_fail(self):