GODT-1779: Remove go-imap

This commit is contained in:
James Houlahan
2022-08-26 17:00:21 +02:00
parent 3b0bc1ca15
commit 39433fe707
593 changed files with 12725 additions and 91626 deletions

View File

@ -0,0 +1,14 @@
Feature: A user can be deleted
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: Delete a connected user
When user "user@pm.me" is deleted
Then user "user@pm.me" is not listed
Scenario: Delete a disconnected user
Given user "user@pm.me" logs out
When user "user@pm.me" is deleted
Then user "user@pm.me" is not listed

View File

View File

@ -0,0 +1,28 @@
Feature: A user can login
Background:
Given there exists an account with username "user@pm.me" and password "password"
And bridge starts
Scenario: Login to account
When the user logs in with username "user@pm.me" and password "password"
Then user "user@pm.me" is listed and connected
Scenario: Login to account with wrong password
When the user logs in with username "user@pm.me" and password "wrong"
Then user "user@pm.me" is not listed
Scenario: Login to nonexistent account
When the user logs in with username "other@pm.me" and password "unknown"
Then user "other@pm.me" is not listed
Scenario: Login to account without internet
Given the internet is turned off
When the user logs in with username "user@pm.me" and password "password"
Then user "user@pm.me" is not listed
Scenario: Login to multiple accounts
Given there exists an account with username "additional@pm.me" and password "other"
When the user logs in with username "user@pm.me" and password "password"
And the user logs in with username "additional@pm.me" and password "other"
Then user "user@pm.me" is listed and connected
And user "additional@pm.me" is listed and connected

View File

@ -0,0 +1,15 @@
Feature: A logged out user can login again
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: Login to disconnected account
When user "user@pm.me" logs out
And bridge restarts
And the user logs in with username "user@pm.me" and password "password"
Then user "user@pm.me" is listed and connected
Scenario: Cannot login to removed account
When user "user@pm.me" is deleted
Then user "user@pm.me" is not listed

View File

@ -0,0 +1,16 @@
Feature: A logged in user is logged out when its auth is revoked.
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: The auth is revoked while bridge is running
When the auth of user "user@pm.me" is revoked
Then bridge sends a deauth event for user "user@pm.me"
And user "user@pm.me" is listed but not connected
Scenario: The auth is revoked while bridge is not running
Given bridge stops
And the auth of user "user@pm.me" is revoked
When bridge starts
Then user "user@pm.me" is listed but not connected

View File

@ -0,0 +1,38 @@
Feature: Bridge can fully sync an account
Background:
Given there exists an account with username "user@pm.me" and password "password"
And the account "user@pm.me" has the following custom mailboxes:
| name | type |
| one | folder |
| two | folder |
| three | label |
And the account "user@pm.me" has the following messages in "one":
| sender | recipient | subject | unread |
| a@pm.me | a@pm.me | one | true |
| b@pm.me | b@pm.me | two | false |
And the account "user@pm.me" has the following messages in "two":
| sender | recipient | subject | unread |
| a@pm.me | a@pm.me | one | true |
| b@pm.me | b@pm.me | two | false |
And bridge starts
Scenario: The account is synced when the user logs in and persists across bridge restarts
When the user logs in with username "user@pm.me" and password "password"
Then bridge sends sync started and finished events for user "user@pm.me"
When bridge restarts
And user "user@pm.me" connects and authenticates IMAP client "1"
Then IMAP client "1" sees the following mailbox info:
| name | total | unread |
| INBOX | 0 | 0 |
| Drafts | 0 | 0 |
| Sent | 0 | 0 |
| Starred | 0 | 0 |
| Archive | 0 | 0 |
| Spam | 0 | 0 |
| Trash | 0 | 0 |
| All Mail | 4 | 2 |
| Folders | 0 | 0 |
| Folders/one | 2 | 1 |
| Folders/two | 2 | 1 |
| Labels | 0 | 0 |
| Labels/three | 0 | 0 |