GODT-2252: Recover from deleted cached messages

Update to latest Gluon version and implement the new
`Connector.GetMessageLiteral` function.
This commit is contained in:
Leander Beernaert
2023-01-17 13:38:06 +01:00
parent fe009ca235
commit 0e9428aaae
6 changed files with 45 additions and 4 deletions

View File

@ -137,6 +137,7 @@ func TestFeatures(testingT *testing.T) {
ctx.Step(`^the user sets the address mode of user "([^"]*)" to "([^"]*)"$`, s.theUserSetsTheAddressModeOfUserTo)
ctx.Step(`^the user changes the gluon path$`, s.theUserChangesTheGluonPath)
ctx.Step(`^the user deletes the gluon files$`, s.theUserDeletesTheGluonFiles)
ctx.Step(`^the user deletes the gluon cache$`, s.theUserDeletesTheGluonCache)
ctx.Step(`^the user reports a bug$`, s.theUserReportsABug)
ctx.Step(`^the user hides All Mail$`, s.theUserHidesAllMail)
ctx.Step(`^the user shows All Mail$`, s.theUserShowsAllMail)

View File

@ -103,6 +103,16 @@ func (s *scenario) theUserDeletesTheGluonFiles() error {
return nil
}
func (s *scenario) theUserDeletesTheGluonCache() error {
if path, err := s.t.locator.ProvideGluonCachePath(); err != nil {
return fmt.Errorf("failed to get gluon cache path: %w", err)
} else if err := os.RemoveAll(path); err != nil {
return fmt.Errorf("failed to remove gluon cache path: %w", err)
}
return nil
}
func (s *scenario) theUserHasDisabledAutomaticUpdates() error {
var started bool

View File

@ -16,4 +16,11 @@ Feature: IMAP Fetch
Given IMAP client "1" sees the following messages in "INBOX":
| from | to | subject | date |
| john.doe@mail.com | [user:user]@[domain] | foo | 13 Aug 82 00:00 +0000 |
Then IMAP client "1" sees header "X-Original-Date: Sun, 13 Jul 1969 00:00:00 +0000" in message with subject "foo" in "INBOX"
Then IMAP client "1" sees header "X-Original-Date: Sun, 13 Jul 1969 00:00:00 +0000" in message with subject "foo" in "INBOX"
Scenario: Fetch from deleted cache
When the user deletes the gluon cache
Then IMAP client "1" sees the following messages in "INBOX":
| from | to | subject | date |
| john.doe@mail.com | [user:user]@[domain] | foo | 13 Aug 82 00:00 +0000 |