def METHOD_NAME(
    self, request, ad_data, target_sat, pre_upgrade_data
):
    """After upgrade, check the LDAP user created before the upgrade still exists and its
     update functionality should work.
    :id: postupgrade-7545fc6a-bd57-4403-90c8-c68a7a3b5bca
    :steps:
        1. verify ldap user(created before upgrade) is part of user group.
        2. Update ldap auth.
    :expectedresults: After upgrade, user group membership should remain the same and LDAP
    auth update should work.
    """
    ad_data = ad_data()
    user_group = target_sat.api.UserGroup().search(
        query={'search': f'name={pre_upgrade_data["user_group_name"]}'}
    )
    auth_source = target_sat.api.AuthSourceLDAP().search(
        query={'search': f'name={pre_upgrade_data["auth_source_name"]}'}
    )[0]
    request.addfinalizer(auth_source.delete)
    request.addfinalizer(user_group[0].delete)
    user = target_sat.api.User().search(query={'search': f'login={ad_data["ldap_user_name"]}'})[
        0
    ]
    assert user.read().id == user_group[0].read().user[0].id
    request.addfinalizer(user.delete)
    role_list = target_sat.cli.Role.with_user(
        username=ad_data['ldap_user_name'], password=ad_data['ldap_user_passwd']
    ).list()
    assert len(role_list) > 1