def METHOD_NAME(ver_cmp_ret, old_ver, test_data):
    """
    Test for seting up a cluster
    """
    exp_cmd = ["pcs", "cluster", "setup"]
    if old_ver:
        exp_cmd.append("--name")
    exp_cmd = (
        exp_cmd + [test_data.cluster_name] + test_data.nodes + test_data.extra_args
    )
    mock_cmd = MagicMock()
    patch_salt = patch.dict(
        pcs.__salt__,
        {
            "cmd.run_all": mock_cmd,
            "pkg.version_cmp": MagicMock(return_value=ver_cmp_ret),
        },
    )
    with patch_salt:
        pcs.cluster_setup(
            test_data.nodes, test_data.cluster_name, extra_args=test_data.extra_args
        )
    assert mock_cmd.call_args_list[0][0][0] == exp_cmd