From ae637c49d58449cd99fa1f461d954da3ba9d76da Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Wed, 10 Nov 2021 02:27:09 -0500 Subject: [PATCH] test: migration from Python to JavaScript --- Tests/spec/SogoToolSpec.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Tests/spec/SogoToolSpec.js b/Tests/spec/SogoToolSpec.js index 945d85aed..076dc1077 100644 --- a/Tests/spec/SogoToolSpec.js +++ b/Tests/spec/SogoToolSpec.js @@ -26,8 +26,10 @@ describe('sogo-tool tests', function() { it('backup', async function() { const sudo = isRoot ? `sudo -u sogo ` : `` - execSync(`${sudo}sogo-tool backup ${tmpdir} ${config.username}`, (error, stdout, stderr) => { - expect(error).not.toBeDefined() - }) + try { + execSync(`${sudo}sogo-tool backup ${tmpdir} ${config.username} 2>&1`) + } catch (err) { + fail(err) + } }) }) \ No newline at end of file