updating sanity tests: fix the permissions check by not using reflect.DeepEquals, and various code cleanup.
---
#### Does this PR need a docs update or release note?
- [x] ⛔ No
#### Type of change
- [x] 🤖 Test
#### Test Plan
- [x] 💪 Manual
- [x] 💚 E2E