Update the restore tesst

This commit is contained in:
Girish Ramakrishnan 2020-07-21 12:58:17 -07:00
parent 9126170c3c
commit 00093d376c
1 changed files with 5 additions and 1 deletions

View File

@ -181,7 +181,11 @@ describe('Application life cycle test', function () {
}); });
it('restore app', 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')); it('can login', login.bind(null, 'minioakey', 'minioskey'));