diff --git a/test/test.js b/test/test.js index e7ec5cc..3c7fb7f 100755 --- a/test/test.js +++ b/test/test.js @@ -151,19 +151,13 @@ describe('Application life cycle test', function () { it('can add and push a file', pushFile); - it('can restart app', function () { - cloudronCli.restart(); - }); + it('can restart app', cloudronCli.restart); it('can clone the url', cloneRepo); it('file exists in repo', fileExists); - it('backup app', async function () { - await cloudronCli.createBackup(); - }); - it('restore app', async function () { - await cloudronCli.restoreFromLatestBackup(); - }); + it('backup app', cloudronCli.createBackup); + it('restore app', cloudronCli.restoreFromLatestBackup); it('can login', loginGiteaOIDC); it('can get avatar', checkAvatar); @@ -172,9 +166,7 @@ describe('Application life cycle test', function () { assert.strictEqual(fs.existsSync(`${repodir}/newfile`), true); }); - it('move to different location', async function () { - await cloudronCli.changeLocation(); - }); + it('move to different location', cloudronCli.changeLocation); it('can login', loginGiteaOIDC); it('can get avatar', checkAvatar); @@ -183,9 +175,7 @@ describe('Application life cycle test', function () { assert.strictEqual(fs.existsSync(`${repodir}/newfile`), true); }); - it('uninstall app', async function () { - await cloudronCli.uninstall(); - }); + it('uninstall app', cloudronCli.uninstall); it('install app (no sso)', function () { cloudronCli.install({ noSso: true, tcpPortFlags: INSTALL_TCP_FLAGS }); @@ -194,12 +184,10 @@ describe('Application life cycle test', function () { it('can admin login (no sso)', adminLogin); it('can logout', logout); - it('uninstall app (no sso)', async function () { - await cloudronCli.uninstall(); - }); + it('uninstall app (no sso)', cloudronCli.uninstall); - it('can install app', function () { - cloudronCli.appstoreInstall({ tcpPortFlags: INSTALL_TCP_FLAGS }); + it('can install app', async function () { + await cloudronCli.appstoreInstall({ tcpPortFlags: INSTALL_TCP_FLAGS }); }); it('can login', loginGiteaOIDCOld); @@ -210,9 +198,7 @@ describe('Application life cycle test', function () { it('can clone the url', cloneRepo); it('can add and push a file', pushFile); - it('can update', async function () { - await cloudronCli.update(); - }); + it('can update', cloudronCli.update); it('can admin login', adminLogin); it('can logout', logout); @@ -222,7 +208,5 @@ describe('Application life cycle test', function () { it('can clone the url', cloneRepo); it('file exists in cloned repo', fileExists); - it('uninstall app', async function () { - await cloudronCli.uninstall(); - }); + it('uninstall app', cloudronCli.uninstall); });