diff --git a/Tests/spec/MailDAVSpec.js b/Tests/spec/MailDAVSpec.js index 009df4172..1b940512c 100644 --- a/Tests/spec/MailDAVSpec.js +++ b/Tests/spec/MailDAVSpec.js @@ -624,5 +624,5 @@ describe('MailDAV', function() { await _testProperty(msg1Loc, DAVMailHeader, 'references', '<4AC3BF1B.3010806@inverse.ca>') await _testProperty(msg1Loc, DAVMailHeader, 'subject', 'message1subject') await _testProperty(msg1Loc, DAVMailHeader, 'to', ['message1to@cyril.dev']) - }) + }, 30000) // increase timeout for this long test }) \ No newline at end of file diff --git a/Tests/spec/SieveSpec.js b/Tests/spec/SieveSpec.js index 8f40b2064..316839f5c 100644 --- a/Tests/spec/SieveSpec.js +++ b/Tests/spec/SieveSpec.js @@ -62,7 +62,7 @@ describe('Sieve', function() { it('enable simple vacation script', async function() { const vacationMsg = 'vacation test' const daysInterval = 5 - const mailaddr = user.email + const mailaddr = user.email.replace(/mailto:/, '') const sieveSimpleVacation = `require ["vacation"];\r\nvacation :days ${daysInterval} :addresses ["${mailaddr}"] text:\r\n${vacationMsg}\r\n.\r\n;\r\n` let vacation @@ -70,7 +70,7 @@ describe('Sieve', function() { vacation.enabled = 1 await prefs.setNoSave('autoReplyText', vacationMsg) await prefs.setNoSave('daysBetweenResponse', daysInterval) - await prefs.setNoSave('autoReplyEmailAddresses', [user.email]) + await prefs.setNoSave('autoReplyEmailAddresses', [mailaddr]) await prefs.save() const createdScript = await _getSogoSieveScript() diff --git a/Tests/spec/SogoToolSpec.js b/Tests/spec/SogoToolSpec.js index 086fe8180..071e6b650 100644 --- a/Tests/spec/SogoToolSpec.js +++ b/Tests/spec/SogoToolSpec.js @@ -17,7 +17,9 @@ describe('sogo-tool tests', function() { }) it('backup', async function() { - execSync(`sogo-tool backup ${tmpdir} ${config.username}`, (error, stdout, stderr) => { + const { uid } = os.userInfo() + const sudo = uid == 0 ? `sudo -u sogo ` : `` + execSync(`${sudo}sogo-tool backup ${tmpdir} ${config.username}`, (error, stdout, stderr) => { expect(error).not.toBeDefined() }) })