tests: fix permissions-assumption bug in test