From 00093d376c544393b5ae0cd774408f831329c4e4 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Tue, 21 Jul 2020 12:58:17 -0700 Subject: [PATCH] Update the restore tesst --- test/test.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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'));