Commit cf4a9fa4 authored by Girish Ramakrishnan's avatar Girish Ramakrishnan

Fixup tests

parent d9cd506d
This diff is collapsed.
......@@ -9,16 +9,16 @@
"author": "",
"license": "ISC",
"devDependencies": {
"ejs": "^3.1.2",
"ejs": "^3.1.3",
"expect.js": "^0.3.1",
"mkdirp": "^1.0.4",
"mocha": "^7.1.2",
"mocha": "^8.0.1",
"rimraf": "^3.0.2"
},
"dependencies": {
"chromedriver": "^81.0.0",
"chromedriver": "^84.0.0",
"selenium-server-standalone-jar": "^3.141.59",
"selenium-webdriver": "^3.6.0",
"superagent": "^5.2.2"
"superagent": "^5.3.1"
}
}
......@@ -140,7 +140,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 download flie', checkDownload);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment