mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-02-17 07:33:57 +00:00
test: migration from Python to JavaScript
This commit is contained in:
@@ -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
|
||||
})
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user