MCPcopy
hub / github.com/ray-project/ray / test_deploy_duplicate_apps

Function test_deploy_duplicate_apps

python/ray/serve/tests/test_cli.py:285–298  ·  view source on GitHub ↗

If a config with duplicate app names is deployed, `serve deploy` should fail. The response should clearly indicate a validation error.

(serve_instance)

Source from the content-addressed store, hash-verified

283
284@pytest.mark.skipif(sys.platform == "win32", reason="File path incorrect on Windows.")
285def test_deploy_duplicate_apps(serve_instance):
286 """If a config with duplicate app names is deployed, `serve deploy` should fail.
287 The response should clearly indicate a validation error.
288 """
289
290 config_file = os.path.join(
291 os.path.dirname(__file__), "test_config_files", "duplicate_app_names.yaml"
292 )
293
294 with pytest.raises(subprocess.CalledProcessError) as e:
295 subprocess.check_output(
296 ["serve", "deploy", config_file], stderr=subprocess.STDOUT
297 )
298 assert "ValidationError" in e.value.output.decode("utf-8")
299
300
301@pytest.mark.skipif(sys.platform == "win32", reason="File path incorrect on Windows.")

Callers

nothing calls this directly

Calls 3

check_outputMethod · 0.80
joinMethod · 0.45
decodeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…