def test_validate_configuration(container_from_file: t.Callable[[str], ConfigDictType]):
    CONFIG = """\
version: 1
api_server:
  http:
    host: 0.0.0.0
"""
    config = container_from_file(CONFIG)
    assert config["api_server"]["http"]["host"] == "0.0.0.0"

    INVALID_CONFIG = """\
version: 1
api_server:
  cors:
    max_age: 12345
"""
    with pytest.raises(
        BentoMLConfigException, match="Invalid configuration file was given:*"
    ):
        container_from_file(INVALID_CONFIG)
config = container_from_file(CONFIG)
assert config["api_server"]["http"]["host"] == "0.0.0.0"

INVALID_CONFIG = """\
version: 1
api_server:
cors:
max_age: 12345
tests/unit/_internal/configuration/test_containers.py