1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2025-12-17 14:37:02 +00:00
Files
go-chasquid-smtp/cmd/dovecot-auth-cli/test_auth_bad_proto.cmy
Alberto Bertogli cf81fbee74 dovecot: Add tests for more error cases
This patch adds more tests for the dovecot library, in particular:
 - Protocol errors (invalid versions, etc.).
 - Invalid command (cli-specific test).
 - Connection breakups.
2018-06-04 01:34:32 +01:00

38 lines
806 B
Plaintext

# Break the handhake early.
client unix_listen .dovecot-client
c = ./dovecot-auth-cli .dovecot auth username password
client <- VERSION 1 1
client <~ CPID
# We are supposed to send the handshake here.
client close
c <- no: error receiving handshake: EOF
c wait 0
# Break before sending the final response.
client unix_listen .dovecot-client
c = ./dovecot-auth-cli .dovecot auth username password
client -> VERSION 1 1
client -> SPID 12345
client -> CUID 12345
client -> COOKIE lovelycookie
client -> MECH PLAIN
client -> MECH LOGIN
client -> DONE
client <- VERSION 1 1
client <~ CPID
client <- AUTH 1 PLAIN service=smtp secured no-penalty nologin resp=dXNlcm5hbWUAdXNlcm5hbWUAcGFzc3dvcmQ=
# We're supposed to send the OK/FAIL here.
client close
c <- no: error receiving response: EOF
c wait 0