diff --git a/test/test.js b/test/test.js index 84270c1..ee23d29 100644 --- a/test/test.js +++ b/test/test.js @@ -181,7 +181,11 @@ describe('Application life cycle test', function () { }); it('restore app', function () { - execSync('cloudron restore --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' }); + const backups = JSON.parse(execSync('cloudron backup list --raw')); + execSync('cloudron uninstall --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' }); + execSync('cloudron install --location ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' }); + getAppInfo(); + execSync(`cloudron restore --backup ${backups[0].id} --app ${app.id}`, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' }); }); it('can login', login.bind(null, 'minioakey', 'minioskey'));