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

View File

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

View File

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

View File

@ -14,8 +14,8 @@ Feature: SMTP sending of plain messages
""" """
Then SMTP response is "OK" Then SMTP response is "OK"
And mailbox "Sent" for "user" has messages And mailbox "Sent" for "user" has messages
| time | from | to | subject | | from | to | subject |
| now | [userAddress] | bridgetest@protonmail.com | | | [userAddress] | bridgetest@protonmail.com | |
And message is sent with API call: And message is sent with API call:
""" """
{ {
@ -48,8 +48,8 @@ Feature: SMTP sending of plain messages
""" """
Then SMTP response is "OK" Then SMTP response is "OK"
And mailbox "Sent" for "user" has messages And mailbox "Sent" for "user" has messages
| time | from | to | subject | | from | to | subject |
| now | [userAddress] | pm.bridge.qa@gmail.com | | | [userAddress] | pm.bridge.qa@gmail.com | |
And message is sent with API call: And message is sent with API call:
""" """
{ {
@ -85,8 +85,8 @@ Feature: SMTP sending of plain messages
""" """
Then SMTP response is "OK" Then SMTP response is "OK"
And mailbox "Sent" for "user" has messages And mailbox "Sent" for "user" has messages
| time | from | to | subject | | from | to | subject |
| now | [userAddress] | bridgetest@protonmail.com | Plain text internal | | [userAddress] | bridgetest@protonmail.com | Plain text internal |
And message is sent with API call: And message is sent with API call:
""" """
{ {
@ -122,8 +122,8 @@ Feature: SMTP sending of plain messages
""" """
Then SMTP response is "OK" Then SMTP response is "OK"
And mailbox "Sent" for "user" has messages And mailbox "Sent" for "user" has messages
| time | from | to | subject | | from | to | subject |
| now | [userAddress] | pm.bridge.qa@gmail.com | Plain text external | | [userAddress] | pm.bridge.qa@gmail.com | Plain text external |
And message is sent with API call: And message is sent with API call:
""" """
{ {
@ -159,8 +159,8 @@ Feature: SMTP sending of plain messages
""" """
Then SMTP response is "OK" Then SMTP response is "OK"
And mailbox "Sent" for "user" has messages And mailbox "Sent" for "user" has messages
| time | from | to | subject | | from | to | subject |
| now | [userAddress] | pm.bridge.qa@gmail.com | Plain text no charset external | | [userAddress] | pm.bridge.qa@gmail.com | Plain text no charset external |
And message is sent with API call: And message is sent with API call:
""" """
{ {
@ -199,8 +199,8 @@ Feature: SMTP sending of plain messages
""" """
Then SMTP response is "OK" Then SMTP response is "OK"
And mailbox "Sent" for "user" has messages And mailbox "Sent" for "user" has messages
| time | from | to | subject | | from | to | subject |
| now | [userAddress] | pm.bridge.qa@gmail.com | Plain text no charset external | | [userAddress] | pm.bridge.qa@gmail.com | Plain text no charset external |
And message is sent with API call: And message is sent with API call:
""" """
{ {
@ -234,8 +234,8 @@ Feature: SMTP sending of plain messages
""" """
Then SMTP response is "OK" Then SMTP response is "OK"
And mailbox "Sent" for "user" has messages And mailbox "Sent" for "user" has messages
| time | from | to | subject | | from | to | subject |
| now | [userAddress] | pm.bridge.qa@gmail.com | Plain, no charset, no content, external | | [userAddress] | pm.bridge.qa@gmail.com | Plain, no charset, no content, external |
And message is sent with API call: 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" Then SMTP response is "OK"
And mailbox "Sent" for "user" has messages And mailbox "Sent" for "user" has messages
| time | from | to | subject | | from | to | subject |
| now | [userAddress] | bridgetest@protonmail.com | Plain with attachment | | [userAddress] | bridgetest@protonmail.com | Plain with attachment |
And message is sent with API call: And message is sent with API call:
""" """
{ {
@ -98,8 +98,8 @@ Feature: SMTP sending of plain messages with attachments
""" """
Then SMTP response is "OK" Then SMTP response is "OK"
And mailbox "Sent" for "user" has messages And mailbox "Sent" for "user" has messages
| time | from | to | subject | | from | to | subject |
| now | [userAddress] | pm.bridge.qa@gmail.com | Plain with attachment external | | [userAddress] | pm.bridge.qa@gmail.com | Plain with attachment external |
And message is sent with API call: And message is sent with API call:
""" """
{ {
@ -158,8 +158,8 @@ Feature: SMTP sending of plain messages with attachments
""" """
Then SMTP response is "OK" Then SMTP response is "OK"
And mailbox "Sent" for "user" has messages And mailbox "Sent" for "user" has messages
| time | from | to | cc | subject | | from | to | cc | subject |
| now | [userAddress] | pm.bridge.qa@gmail.com | bridgeqa@seznam.cz | Plain with attachment external PGP and external CC | | [userAddress] | pm.bridge.qa@gmail.com | bridgeqa@seznam.cz | Plain with attachment external PGP and external CC |
And message is sent with API call: 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" Then SMTP response is "OK"
And mailbox "Sent" for "user" has messages And mailbox "Sent" for "user" has messages
| time | from | to | subject | | from | to | subject |
| now | [userAddress] | bridgetest@protonmail.com | Hello | | [userAddress] | bridgetest@protonmail.com | Hello |
Scenario: Slight change means different message and is sent twice Scenario: Slight change means different message and is sent twice
When SMTP client sends message When SMTP client sends message
@ -40,6 +40,6 @@ Feature: SMTP sending the same message twice
""" """
Then SMTP response is "OK" Then SMTP response is "OK"
And mailbox "Sent" for "user" has messages And mailbox "Sent" for "user" has messages
| time | from | to | subject | | from | to | subject |
| now | [userAddress] | bridgetest@protonmail.com | Hello | | [userAddress] | bridgetest@protonmail.com | Hello |
| now | [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 matches := true
for n, cell := range row.Cells { for n, cell := range row.Cells {
switch head[n].Value { 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": case "from":
address := ctx.EnsureAddress(account.Username(), cell.Value) address := ctx.EnsureAddress(account.Username(), cell.Value)
if !areAddressesSame(message.Sender.Address, address) { if !areAddressesSame(message.Sender.Address, address) {