mirror of
https://blitiri.com.ar/repos/chasquid
synced 2025-12-20 15:07:03 +00:00
test: Add a new integration test with minor dialogs
This patch adds a new integration test, which executes various small dialogs, to cover corner cases that are not well covered (according to our coverage report). For example, "EHLO" without domain, or invalid DATA. While we could do them via Go tests, this way is more realistic, and the tests are easier to write.
This commit is contained in:
23
test/t-12-minor_dialogs/sendmail.cmy
Normal file
23
test/t-12-minor_dialogs/sendmail.cmy
Normal file
@@ -0,0 +1,23 @@
|
||||
|
||||
c tcp_connect localhost:1025
|
||||
|
||||
c <~ 220
|
||||
c -> EHLO localhost
|
||||
c <... 250 HELP
|
||||
c -> MAIL FROM: <>
|
||||
c <~ 250
|
||||
c -> RCPT TO: user@testserver
|
||||
c <~ 250
|
||||
c -> DATA
|
||||
c <~ 354
|
||||
c -> From: Mailer daemon <somewhere@horns.com>
|
||||
c -> Subject: I've come to haunt you
|
||||
c ->
|
||||
c -> Muahahahaha
|
||||
c ->
|
||||
c ->
|
||||
c -> .
|
||||
c <~ 250
|
||||
c -> QUIT
|
||||
c <~ 221
|
||||
|
||||
Reference in New Issue
Block a user