Add offline test mode / config flag

This pull implements
1. A offline flag as described here [T76885](https://phabricator.wikimedia.org/T76885)
2. It also fixes mixed indents
3. run swagger specs test before server restart