Use retry in helper
Add agent.check pass/warn/fail tests