Pārlūkot izejas kodu

Adding tests
Signed-off-by: John Harris <[email protected]>

johnharris85 9 gadi atpakaļ
vecāks
revīzija
377be5aa1f
1 mainītis faili ar 11 papildinājumiem un 0 dzēšanām
  1. 11 0
      tests/unit/config/config_test.py

+ 11 - 0
tests/unit/config/config_test.py

@@ -1360,6 +1360,17 @@ class ConfigTest(unittest.TestCase):
             config.load(config_details)
         assert "Service 'one' depends on service 'three'" in exc.exconly()
 
+    def test_linked_service_is_undefined(self):
+        with self.assertRaises(ConfigurationError):
+            config.load(
+                build_config_details({
+                    'version': '2',
+                    'services': {
+                        'web': {'image': 'busybox', 'links': ['db']},
+                    },
+                })
+            )
+
     def test_load_dockerfile_without_context(self):
         config_details = build_config_details({
             'version': '2',