def METHOD_NAME(
    mock_compile,
    mock_login,
    cli_runner: RunnerFunc,
    args: list[str],
    expected: dict[str, Any],
    exitcode: int,
    tmp_path: Path,
):
    mock_compile.side_effect = verify_config(make_config(tmp_path, expected))
    result = cli_runner(["catalog", "compile", "c-cluster-id"] + args)
    assert result.exit_code == exitcode
    if exitcode == 1:
        assert (
            "Cannot push changes when local global or tenant repo override is specified"
            in result.stdout
        )
    if "push" in expected and not expected.get("fetch_dependencies", True):
        assert (
            "--no-fetch-dependencies doesn't take effect unless --local is specified"
            in result.stdout
        )
    if expected.get("login", False):
        mock_login.assert_called()