add test for read-only mode