fix restore test
This commit is contained in:
parent
0d1b521cd5
commit
48776dd2eb
1 changed files with 6 additions and 1 deletions
|
@ -85,7 +85,12 @@ 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' });
|
||||
var inspect = JSON.parse(execSync('cloudron inspect'));
|
||||
app = inspect.apps.filter(function (a) { return a.location === LOCATION; })[0];
|
||||
execSync(`cloudron restore --backup ${backups[0].id} --app ${app.id}`, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
||||
});
|
||||
|
||||
it('can search', search);
|
||||
|
|
Loading…
Reference in a new issue