mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-26 19:56:43 +00:00
GODT-1779: Remove go-imap
This commit is contained in:
22
tests/features/smtp/auth.feature
Normal file
22
tests/features/smtp/auth.feature
Normal file
@ -0,0 +1,22 @@
|
||||
Feature: A user can authenticate an SMTP client
|
||||
Background:
|
||||
Given there exists an account with username "user@pm.me" and password "password"
|
||||
And bridge starts
|
||||
And the user logs in with username "user@pm.me" and password "password"
|
||||
|
||||
Scenario: SMTP client can authenticate successfully
|
||||
When user "user@pm.me" connects SMTP client "1"
|
||||
Then SMTP client "1" can authenticate
|
||||
|
||||
Scenario: SMTP client cannot authenticate with wrong username
|
||||
When user "user@pm.me" connects SMTP client "1"
|
||||
Then SMTP client "1" cannot authenticate with incorrect username
|
||||
|
||||
Scenario: SMTP client cannot authenticate with wrong password
|
||||
When user "user@pm.me" connects SMTP client "1"
|
||||
Then SMTP client "1" cannot authenticate with incorrect password
|
||||
|
||||
Scenario: SMTP client cannot authenticate for disconnected user
|
||||
When user "user@pm.me" logs out
|
||||
And user "user@pm.me" connects SMTP client "1"
|
||||
Then SMTP client "1" cannot authenticate
|
||||
48
tests/features/smtp/init.feature
Normal file
48
tests/features/smtp/init.feature
Normal file
@ -0,0 +1,48 @@
|
||||
Feature: SMTP initiation
|
||||
Background:
|
||||
Given there exists an account with username "user@pm.me" and password "password"
|
||||
And bridge starts
|
||||
And the user logs in with username "user@pm.me" and password "password"
|
||||
When user "user@pm.me" connects and authenticates SMTP client "1"
|
||||
|
||||
Scenario: Send without first announcing FROM and TO
|
||||
When SMTP client "1" sends DATA "Subject: test"
|
||||
Then it fails with error "Missing RCPT TO command"
|
||||
|
||||
Scenario: Reset is the same as without FROM and TO
|
||||
When SMTP client "1" sends MAIL FROM "<user@pm.me>"
|
||||
Then it succeeds
|
||||
When SMTP client "1" sends RCPT TO "<user@pm.me>"
|
||||
Then it succeeds
|
||||
When SMTP client "1" sends RSET
|
||||
Then it succeeds
|
||||
When SMTP client "1" sends DATA "Subject: test"
|
||||
Then it fails with error "Missing RCPT TO command"
|
||||
|
||||
Scenario: Send without FROM
|
||||
When SMTP client "1" sends RCPT TO "<user@pm.me>"
|
||||
Then it fails with error "Missing MAIL FROM command"
|
||||
|
||||
Scenario: Send without TO
|
||||
When SMTP client "1" sends MAIL FROM "<user@pm.me>"
|
||||
Then it succeeds
|
||||
When SMTP client "1" sends DATA "Subject: test"
|
||||
Then it fails with error "Missing RCPT TO command"
|
||||
|
||||
Scenario: Send with empty FROM
|
||||
When SMTP client "1" sends MAIL FROM "<>"
|
||||
Then it fails with error "invalid return path"
|
||||
|
||||
Scenario: Send with empty TO
|
||||
When SMTP client "1" sends MAIL FROM "<user@pm.me>"
|
||||
Then it succeeds
|
||||
When SMTP client "1" sends RCPT TO "<>"
|
||||
Then it fails with error "invalid recipient"
|
||||
|
||||
Scenario: Allow BODY parameter of MAIL FROM command
|
||||
When SMTP client "1" sends MAIL FROM "<user@pm.me> BODY=7BIT"
|
||||
Then it succeeds
|
||||
|
||||
Scenario: FROM not owned by user
|
||||
When SMTP client "1" sends MAIL FROM "<user@pm.test>"
|
||||
Then it fails with error "invalid return path"
|
||||
10
tests/features/smtp/ports.feature
Normal file
10
tests/features/smtp/ports.feature
Normal file
@ -0,0 +1,10 @@
|
||||
Feature: A user can connect an SMTP client to custom ports
|
||||
Background:
|
||||
Given there exists an account with username "user@pm.me" and password "password"
|
||||
And bridge starts
|
||||
And the user logs in with username "user@pm.me" and password "password"
|
||||
And the user changes the SMTP port to 1144
|
||||
|
||||
Scenario: Authenticates successfully on custom port
|
||||
When user "user@pm.me" connects SMTP client "1" on port 1144
|
||||
Then SMTP client "1" can authenticate
|
||||
Reference in New Issue
Block a user