If a config with duplicate app names is deployed, `serve deploy` should fail. The response should clearly indicate a validation error.
(serve_instance)
| 283 | |
| 284 | @pytest.mark.skipif(sys.platform == "win32", reason="File path incorrect on Windows.") |
| 285 | def 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.") |
nothing calls this directly
no test coverage detected
searching dependent graphs…