test: remove time checks

This commit is contained in:
James Houlahan 2020-06-17 15:29:32 +02:00
parent 02804d067c
commit 012be60311
8 changed files with 55 additions and 63 deletions

View File

@ -15,24 +15,25 @@ Changelog [format](http://keepachangelog.com/en/1.0.0/)
* GODT-308 Better user error message when request is canceled.
* GODT-312 Validate recipient emails in send before asking for their public keys.
* GODT-368 Bump docker-credential-helpers version.
* GODT-280 Migrate to gopenpgp v2
* `Unlock()` call on pmapi-client unlocks both User keys and Address keys
* Salt is available via `AuthSalt()` method
* GODT-280 Migrate to gopenpgp v2:
* `Unlock()` call on pmapi-client unlocks both User keys and Address keys.
* Salt is available via `AuthSalt()` method.
* GODT-394 Don't check SMTP message send time in integration tests.
### Fixed
* GODT-356 Fix crash when removing account while mail client is fetching messages (regression from GODT-204).
* GODT-390 Don't logout user if AuthRefresh fails because internet was off.
* GODT-358 Bad timeouts with Alternative Routing
* GODT-358 Bad timeouts with Alternative Routing.
* GODT-363 Drafts are not deleted when already created on webapp.
* GODT-390 Don't logout user if AuthRefresh fails because internet was off
* GODT-341 Fixed flaky unittest for Store synchronization cooldown
* Crash when failing to match necessary html element
* Crash in message.combineParts when copying nil slice
* Handle double charset better by using local ParseMediaType instead of mime.ParseMediaType
* Don't remove log dir
* GODT-422 Fix element not found (avoid listing credentials, prefer getting)
* GODT-404 Don't keep connections to proxy servers alive if user disables DoH
* Ensure DoH is used at startup to load users for the initial auth
* GODT-390 Don't logout user if AuthRefresh fails because internet was off.
* GODT-341 Fixed flaky unittest for Store synchronization cooldown.
* Crash when failing to match necessary html element.
* Crash in message.combineParts when copying nil slice.
* Handle double charset better by using local ParseMediaType instead of mime.ParseMediaType.
* Don't remove log dir.
* GODT-422 Fix element not found (avoid listing credentials, prefer getting).
* GODT-404 Don't keep connections to proxy servers alive if user disables DoH.
* Ensure DoH is used at startup to load users for the initial auth.
## [v1.2.7] Donghai-hotfix - beta (2020-05-07)

View File

@ -15,8 +15,8 @@ Feature: SMTP with bcc
"""
Then SMTP response is "OK"
And mailbox "Sent" for "user" has messages
| time | from | to | subject |
| now | [userAddress] | bridgetest@protonmail.com | hello |
| from | to | subject |
| [userAddress] | bridgetest@protonmail.com | hello |
And message is sent with API call:
"""
{
@ -50,8 +50,8 @@ Feature: SMTP with bcc
"""
Then SMTP response is "OK"
And mailbox "Sent" for "user" has messages
| time | from | to | subject |
| now | [userAddress] | | hello |
| from | to | subject |
| [userAddress] | | hello |
And message is sent with API call:
"""
{

View File

@ -20,8 +20,8 @@ Feature: SMTP sending of HTML messages
"""
Then SMTP response is "OK"
And mailbox "Sent" for "user" has messages
| time | from | to | subject |
| now | [userAddress] | pm.bridge.qa@gmail.com | HTML text external |
| from | to | subject |
| [userAddress] | pm.bridge.qa@gmail.com | HTML text external |
And message is sent with API call:
"""
{
@ -95,8 +95,8 @@ Feature: SMTP sending of HTML messages
"""
Then SMTP response is "OK"
And mailbox "Sent" for "user" has messages
| time | from | to | subject |
| now | [userAddress] | pm.bridge.qa@gmail.com | Html Inline External |
| from | to | subject |
| [userAddress] | pm.bridge.qa@gmail.com | Html Inline External |
And message is sent with API call:
"""
{
@ -184,8 +184,8 @@ Feature: SMTP sending of HTML messages
"""
Then SMTP response is "OK"
And mailbox "Sent" for "user" has messages
| time | from | to | subject |
| now | [userAddress] | bridgetest@protonmail.com | Html Inline Alternative Internal |
| from | to | subject |
| [userAddress] | bridgetest@protonmail.com | Html Inline Alternative Internal |
And message is sent with API call:
"""
{
@ -273,8 +273,8 @@ Feature: SMTP sending of HTML messages
"""
Then SMTP response is "OK"
And mailbox "Sent" for "user" has messages
| time | from | to | subject |
| now | [userAddress] | pm.bridge.qa@gmail.com | Html Inline Alternative External |
| from | to | subject |
| [userAddress] | pm.bridge.qa@gmail.com | Html Inline Alternative External |
And message is sent with API call:
"""
{

View File

@ -39,8 +39,8 @@ Feature: SMTP sending of HTML messages with attachments
"""
Then SMTP response is "OK"
And mailbox "Sent" for "user" has messages
| time | from | to | subject |
| now | [userAddress] | bridgetest@protonmail.com | HTML with attachment internal |
| from | to | subject |
| [userAddress] | bridgetest@protonmail.com | HTML with attachment internal |
And message is sent with API call:
"""
{
@ -98,8 +98,8 @@ Feature: SMTP sending of HTML messages with attachments
"""
Then SMTP response is "OK"
And mailbox "Sent" for "user" has messages
| time | from | to | subject |
| now | [userAddress] | pm.bridge.qa@gmail.com | HTML with attachment external PGP |
| from | to | subject |
| [userAddress] | pm.bridge.qa@gmail.com | HTML with attachment external PGP |
And message is sent with API call:
"""
{

View File

@ -14,8 +14,8 @@ Feature: SMTP sending of plain messages
"""
Then SMTP response is "OK"
And mailbox "Sent" for "user" has messages
| time | from | to | subject |
| now | [userAddress] | bridgetest@protonmail.com | |
| from | to | subject |
| [userAddress] | bridgetest@protonmail.com | |
And message is sent with API call:
"""
{
@ -48,8 +48,8 @@ Feature: SMTP sending of plain messages
"""
Then SMTP response is "OK"
And mailbox "Sent" for "user" has messages
| time | from | to | subject |
| now | [userAddress] | pm.bridge.qa@gmail.com | |
| from | to | subject |
| [userAddress] | pm.bridge.qa@gmail.com | |
And message is sent with API call:
"""
{
@ -85,8 +85,8 @@ Feature: SMTP sending of plain messages
"""
Then SMTP response is "OK"
And mailbox "Sent" for "user" has messages
| time | from | to | subject |
| now | [userAddress] | bridgetest@protonmail.com | Plain text internal |
| from | to | subject |
| [userAddress] | bridgetest@protonmail.com | Plain text internal |
And message is sent with API call:
"""
{
@ -122,8 +122,8 @@ Feature: SMTP sending of plain messages
"""
Then SMTP response is "OK"
And mailbox "Sent" for "user" has messages
| time | from | to | subject |
| now | [userAddress] | pm.bridge.qa@gmail.com | Plain text external |
| from | to | subject |
| [userAddress] | pm.bridge.qa@gmail.com | Plain text external |
And message is sent with API call:
"""
{
@ -159,8 +159,8 @@ Feature: SMTP sending of plain messages
"""
Then SMTP response is "OK"
And mailbox "Sent" for "user" has messages
| time | from | to | subject |
| now | [userAddress] | pm.bridge.qa@gmail.com | Plain text no charset external |
| from | to | subject |
| [userAddress] | pm.bridge.qa@gmail.com | Plain text no charset external |
And message is sent with API call:
"""
{
@ -199,8 +199,8 @@ Feature: SMTP sending of plain messages
"""
Then SMTP response is "OK"
And mailbox "Sent" for "user" has messages
| time | from | to | subject |
| now | [userAddress] | pm.bridge.qa@gmail.com | Plain text no charset external |
| from | to | subject |
| [userAddress] | pm.bridge.qa@gmail.com | Plain text no charset external |
And message is sent with API call:
"""
{
@ -234,8 +234,8 @@ Feature: SMTP sending of plain messages
"""
Then SMTP response is "OK"
And mailbox "Sent" for "user" has messages
| time | from | to | subject |
| now | [userAddress] | pm.bridge.qa@gmail.com | Plain, no charset, no content, external |
| from | to | subject |
| [userAddress] | pm.bridge.qa@gmail.com | Plain, no charset, no content, external |
And message is sent with API call:
"""
{

View File

@ -39,8 +39,8 @@ Feature: SMTP sending of plain messages with attachments
"""
Then SMTP response is "OK"
And mailbox "Sent" for "user" has messages
| time | from | to | subject |
| now | [userAddress] | bridgetest@protonmail.com | Plain with attachment |
| from | to | subject |
| [userAddress] | bridgetest@protonmail.com | Plain with attachment |
And message is sent with API call:
"""
{
@ -98,8 +98,8 @@ Feature: SMTP sending of plain messages with attachments
"""
Then SMTP response is "OK"
And mailbox "Sent" for "user" has messages
| time | from | to | subject |
| now | [userAddress] | pm.bridge.qa@gmail.com | Plain with attachment external |
| from | to | subject |
| [userAddress] | pm.bridge.qa@gmail.com | Plain with attachment external |
And message is sent with API call:
"""
{
@ -158,8 +158,8 @@ Feature: SMTP sending of plain messages with attachments
"""
Then SMTP response is "OK"
And mailbox "Sent" for "user" has messages
| time | from | to | cc | subject |
| now | [userAddress] | pm.bridge.qa@gmail.com | bridgeqa@seznam.cz | Plain with attachment external PGP and external CC |
| from | to | cc | subject |
| [userAddress] | pm.bridge.qa@gmail.com | bridgeqa@seznam.cz | Plain with attachment external PGP and external CC |
And message is sent with API call:
"""
{

View File

@ -25,8 +25,8 @@ Feature: SMTP sending the same message twice
"""
Then SMTP response is "OK"
And mailbox "Sent" for "user" has messages
| time | from | to | subject |
| now | [userAddress] | bridgetest@protonmail.com | Hello |
| from | to | subject |
| [userAddress] | bridgetest@protonmail.com | Hello |
Scenario: Slight change means different message and is sent twice
When SMTP client sends message
@ -40,6 +40,6 @@ Feature: SMTP sending the same message twice
"""
Then SMTP response is "OK"
And mailbox "Sent" for "user" has messages
| time | from | to | subject |
| now | [userAddress] | bridgetest@protonmail.com | Hello |
| now | [userAddress] | bridgetest@protonmail.com | Hello. |
| from | to | subject |
| [userAddress] | bridgetest@protonmail.com | Hello |
| [userAddress] | bridgetest@protonmail.com | Hello. |

View File

@ -172,15 +172,6 @@ func messagesContainsMessageRow(account *accounts.TestAccount, allMessages []*pm
matches := true
for n, cell := range row.Cells {
switch head[n].Value {
case "time":
switch cell.Value {
case "now":
if (time.Now().Unix() - message.Time) > 5 {
matches = false
}
default:
return false, fmt.Errorf("unexpected time value: %s", cell.Value)
}
case "from":
address := ctx.EnsureAddress(account.Username(), cell.Value)
if !areAddressesSame(message.Sender.Address, address) {