def write_random_objects_in_pod(io_pod, file_dir, amount, pattern="ObjKey"):
    """
    Uses /dev/urandom to create and write random files in a given
    directory in a pod

    Args:
        io_pod (ocs_ci.ocs.ocp.OCP): The pod object in which the files should be
        generated and written

        file_dir (str): A string describing the path in which
        to write the files to

        amount (int): The amount of files to generate

        pattern (str): The file name pattern to use

    Returns:
        list: A list with the names of all written objects
    """
    obj_lst = []
    for i in range(amount):
        object_key = pattern + "-{}".format(i)
        obj_lst.append(object_key)
        io_pod.exec_cmd_on_pod(
            f"dd if=/dev/urandom of={file_dir}/{object_key} bs=1M count=1 status=none"
        )
    return obj_lst