Refactored test setup to remove dupe code. Also moved the secret to a system env