[test] Add missing tests and error handling to mechanism_test
I was looking around to get how vpnweb was working and I thought this would be a good "issue" to learn more about go and vpnweb.
To add the missing tests to mechanism_test, I refactor the code a
little bit so GetAuthenticator
is now returning an error instaed of
using log.Fatal
Since doAuthenticationChecks
was only used by sip2.GetAuthenticator
I move it to the sip2.auth
module.
Edited by Justin !