Add AutoDL public base image catalog
Controller CI / test (push) Successful in 2s

This commit is contained in:
2026-10-02 14:17:42 +08:00
parent 6251fde4c1
commit d5f13caee0
4 changed files with 171 additions and 3 deletions
+14
View File
@@ -59,6 +59,20 @@ class ControllerTests(unittest.TestCase):
with self.assertRaises(controller.ControllerError):
controller.instance_spec("", 120, [])
def test_public_image_catalog_has_unique_uuids(self):
uuids = [image["image_uuid"] for image in controller.PUBLIC_BASE_IMAGES]
self.assertEqual(len(uuids), len(set(uuids)))
def test_selects_exact_public_image_profile(self):
self.assertEqual(
controller.select_public_image("PyTorch", "2.0.0", "11.8"),
"base-image-l2t43iu6uk",
)
def test_refuses_to_downgrade_an_unknown_public_image_profile(self):
with self.assertRaises(controller.ControllerError):
controller.select_public_image("pytorch", "2.8.0", "12.8")
def test_runner_has_required_host_labels_and_no_docker(self):
rendered = controller.runner_yaml()
self.assertIn('"ubuntu-latest:host"', rendered)