def METHOD_NAME(test, params, env):
    """
    Test virsh polkit for non-root user
    """
    ssh_connection = params.get("ssh_connection", "no") == "yes"
    non_root_name = params.get("su_user")
    status_error = "yes" == params.get("status_error", "no")
    create_non_root_user(params, test)
    tailed_log_file = get_tailed_log_file()
    try:
        if ssh_connection:
            ssh_access(params, test)
        else:
            local_access(params, test)
        if not status_error:
            libvirt.check_logfile('error :', tailed_log_file, str_in_log=False)
    except (exceptions.TestFail, exceptions.TestCancel):
        raise
    except Exception as e:
        test.error("Unexpected error: {}".format(e))
    finally:
        res = utils_misc.wait_for(lambda: not process.METHOD_NAME("userdel {}".
                                                          format(non_root_name),
                                                          ignore_status=True).exit_status, 50)
        if not res:
            test.error("Cannot delete non-root user: {}.".format(non_root_name))