1
0
mirror of https://git.cloudron.io/cloudron/syncthing-app synced 2025-09-15 09:29:08 +00:00

Fix tests

This commit is contained in:
Girish Ramakrishnan
2020-01-08 10:02:03 -08:00
parent 81b91edd7c
commit 38fb2ecdf7
3 changed files with 223 additions and 100 deletions

View File

@@ -52,7 +52,7 @@ describe('Application life cycle test', function () {
var app;
function installApp() {
execSync('cloudron install --new --wait --port-bindings SYNC_PORT=' + SYNC_PORT + ' --location ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
execSync('cloudron install --port-bindings SYNC_PORT=' + SYNC_PORT + ' --location ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
}
function pageLoaded() {
@@ -170,7 +170,7 @@ describe('Application life cycle test', function () {
it('move to different location', function () {
browser.manage().deleteAllCookies();
execSync('cloudron configure --wait --location ' + LOCATION + '2', { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
execSync('cloudron configure --location ' + LOCATION + '2', { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
var inspect = JSON.parse(execSync('cloudron inspect'));
app = inspect.apps.filter(function (a) { return a.location === LOCATION + '2'; })[0];
expect(app).to.be.an('object');
@@ -186,7 +186,7 @@ describe('Application life cycle test', function () {
// test update
it('can install app', function () {
installApp();
execSync('cloudron install --appstore-id net.syncthing.cloudronapp2 --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];
expect(app).to.be.an('object');
@@ -194,7 +194,7 @@ describe('Application life cycle test', function () {
it('can load page', loadPage);
it('can add folder', addFolder);
it('can update', function () {
execSync('cloudron install --wait --app ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
execSync('cloudron update --app ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
});
it('can check folder', checkFolder);
it('uninstall app', function () {