Fix tests for cli changes

This commit is contained in:
Johannes Zellner 2019-12-06 13:07:42 +01:00
parent b1f8b8cb9a
commit 664677527a

View file

@ -304,8 +304,8 @@ return done();
}); });
}); });
xit('install app', function () { it('install app', function () {
execSync(`cloudron install --new --wait --location ${LOCATION} -p SSH_PORT=${SSH_PORT}`, EXEC_ARGS); execSync(`cloudron install --location ${LOCATION} -p SSH_PORT=${SSH_PORT}`, EXEC_ARGS);
}); });
it('can get app information', getAppInfo); it('can get app information', getAppInfo);
@ -340,10 +340,7 @@ return done();
it('can add custom file', addCustomFile); it('can add custom file', addCustomFile);
it('can check custom file', checkCustomFile); it('can check custom file', checkCustomFile);
it('can restart app', function (done) { it('can restart app', function () { execSync('cloudron restart --app ' + app.id); });
execSync('cloudron restart --wait --app ' + app.id);
done();
});
xit('can login', login.bind(null, username, password)); // no need to relogin since session persists xit('can login', login.bind(null, username, password)); // no need to relogin since session persists
it('displays correct clone url', checkCloneUrl); it('displays correct clone url', checkCloneUrl);
@ -367,7 +364,7 @@ return done();
//browser.manage().deleteAllCookies(); // commented because of error "'Network.deleteCookie' wasn't found" //browser.manage().deleteAllCookies(); // commented because of error "'Network.deleteCookie' wasn't found"
// ensure we don't hit NXDOMAIN in the mean time // ensure we don't hit NXDOMAIN in the mean time
browser.get('about:blank').then(function () { browser.get('about:blank').then(function () {
execSync('cloudron configure --wait --location ' + LOCATION + '2 --app ' + app.id, EXEC_ARGS); execSync('cloudron configure --location ' + LOCATION + '2 --app ' + app.id, EXEC_ARGS);
var inspect = JSON.parse(execSync('cloudron inspect')); var inspect = JSON.parse(execSync('cloudron inspect'));
app = inspect.apps.filter(function (a) { return a.location === LOCATION + '2'; })[0]; app = inspect.apps.filter(function (a) { return a.location === LOCATION + '2'; })[0];
expect(app).to.be.an('object'); expect(app).to.be.an('object');
@ -392,7 +389,7 @@ return done();
// check if the _first_ login via email succeeds // check if the _first_ login via email succeeds
it('can login via email', function (done) { it('can login via email', function (done) {
execSync(`cloudron install --new --wait --location ${LOCATION} -p SSH_PORT=${SSH_PORT}`, EXEC_ARGS); execSync(`cloudron install --location ${LOCATION} -p SSH_PORT=${SSH_PORT}`, EXEC_ARGS);
var inspect = JSON.parse(execSync('cloudron inspect')); var inspect = JSON.parse(execSync('cloudron inspect'));
app = inspect.apps.filter(function (a) { return a.location === LOCATION; })[0]; app = inspect.apps.filter(function (a) { return a.location === LOCATION; })[0];
@ -411,7 +408,7 @@ return done();
// No SSO // No SSO
it('install app (no sso)', function () { it('install app (no sso)', function () {
execSync(`cloudron install --new --wait --no-sso --location ${LOCATION} -p SSH_PORT=${SSH_PORT}`, EXEC_ARGS); execSync(`cloudron install --no-sso --location ${LOCATION} -p SSH_PORT=${SSH_PORT}`, EXEC_ARGS);
}); });
it('can get app information', function () { it('can get app information', function () {
@ -431,7 +428,7 @@ return done();
// test update // test update
it('can install app', function () { it('can install app', function () {
execSync(`cloudron install --new --wait --appstore-id ${app.manifest.id} --location ${LOCATION} -p SSH_PORT=${SSH_PORT}`, EXEC_ARGS); execSync(`cloudron install --appstore-id ${app.manifest.id} --location ${LOCATION} -p SSH_PORT=${SSH_PORT}`, EXEC_ARGS);
}); });
it('can get app information', getAppInfo); it('can get app information', getAppInfo);
@ -444,7 +441,7 @@ return done();
it('can add and push a file', pushFile); it('can add and push a file', pushFile);
it('can update', function () { it('can update', function () {
execSync('cloudron install --wait --app ' + app.id, EXEC_ARGS); execSync('cloudron update --app ' + app.id, EXEC_ARGS);
}); });
xit('can admin login', adminLogin); xit('can admin login', adminLogin);