[tests] fix bad usage of read_index_from and test_write_chunk

- low priority