Compare commits

..

49 Commits

Author SHA1 Message Date
Girish Ramakrishnan
5703b98d6f Version 1.30.1 2021-08-30 23:05:59 -07:00
Girish Ramakrishnan
ee10da9df5 Fix postinstall message 2021-08-30 22:42:00 -07:00
Johannes Zellner
7123688a92 Ensure we log to stdout/stderr 2021-08-30 15:50:49 +02:00
Girish Ramakrishnan
38cd11c0b7 Version 1.30.0 2021-08-24 09:53:13 -07:00
Girish Ramakrishnan
d06f83a567 Update synapse to 1.41.0 2021-08-24 09:45:09 -07:00
Girish Ramakrishnan
fb83f5a54e Version 1.29.0 2021-08-10 11:23:44 -07:00
Girish Ramakrishnan
ad4d18e706 Update synapse to 1.40.0 2021-08-10 11:10:43 -07:00
Girish Ramakrishnan
80425602a3 Update test packages 2021-08-02 23:08:28 -07:00
Girish Ramakrishnan
de44651747 delete password_providers on update 2021-08-02 23:08:16 -07:00
Johannes Zellner
79c17c17f1 Update test deps 2021-07-29 21:43:40 +02:00
Johannes Zellner
605a809a32 Bump version for 1.39.0 2021-07-29 21:43:02 +02:00
Girish Ramakrishnan
b5963b4276 Version 1.27.1 2021-07-24 00:08:49 -07:00
Girish Ramakrishnan
a6c93ac360 Update synapse to 1.38.1 2021-07-24 00:03:54 -07:00
Girish Ramakrishnan
b5662ec4dc Version 1.27.0 2021-07-24 00:02:44 -07:00
Girish Ramakrishnan
6775418daf delete password_providers section without sso 2021-07-23 23:56:08 -07:00
Johannes Zellner
66231bcae5 Update test deps 2021-07-13 16:43:14 +02:00
Johannes Zellner
acd9e9cbf6 Bump version for 1.38.0 2021-07-13 16:42:50 +02:00
Johannes Zellner
f7a3528db0 Bump version for 1.37.1 2021-07-01 12:12:58 +02:00
Johannes Zellner
affa9850a3 Rework test to follow new patterns 2021-06-29 14:56:14 +02:00
Johannes Zellner
ad9429c622 Update test deps 2021-06-29 14:13:55 +02:00
Johannes Zellner
208b5b689d Bump version for 1.37.0 2021-06-29 14:13:26 +02:00
Girish Ramakrishnan
54428229bb Version 1.26.0 2021-06-15 09:42:40 -07:00
Girish Ramakrishnan
805349b360 Update Synapse to 1.36.0 2021-06-15 09:41:54 -07:00
Johannes Zellner
47dcff5e35 Update test deps 2021-06-04 10:21:08 +02:00
Johannes Zellner
260198817d Bump version for 1.35.1 2021-06-04 10:11:04 +02:00
Girish Ramakrishnan
f9f5353f42 Version 1.25.0 2021-06-02 18:31:44 -07:00
Girish Ramakrishnan
4d0ef3f614 Update Synapse to 1.35.0 2021-06-02 18:21:41 -07:00
Girish Ramakrishnan
b7b20f0b56 Version 1.24.0 2021-05-18 09:34:30 -07:00
Girish Ramakrishnan
7cd91ecd61 Update synapse to 1.34.0 2021-05-18 09:17:38 -07:00
Johannes Zellner
fbf55b9162 Bump version for 1.33.2 2021-05-14 10:40:12 +02:00
Johannes Zellner
d27523bc00 Update test deps 2021-05-08 18:23:49 +02:00
Johannes Zellner
fad354943f Bump version for 1.23.1 2021-05-08 18:23:02 +02:00
Johannes Zellner
a4b8455363 Bump version for 1.33.0 2021-05-06 10:21:14 +02:00
Johannes Zellner
dc25932bfd Bump version for 1.32.2 2021-04-22 12:36:21 +02:00
Johannes Zellner
908481d2c6 Bump version for 1.32.1 2021-04-22 10:37:22 +02:00
Johannes Zellner
bcbb54c9be Fixup changelog 2021-04-20 18:07:50 +02:00
Johannes Zellner
d749c8f974 Update test deps 2021-04-20 17:39:39 +02:00
Johannes Zellner
169510a50d Bump version for 1.32.0 2021-04-20 17:38:49 +02:00
Johannes Zellner
bd6d954ddd Do not redirect stdio to logfile 2021-04-08 14:52:34 +02:00
Girish Ramakrishnan
c39c97bf64 Version 1.22.0 2021-04-06 15:40:25 -07:00
Girish Ramakrishnan
007f0607fd Update synapse to 1.31.0 2021-04-06 15:39:53 -07:00
Johannes Zellner
a53664b9b1 Update test deps 2021-03-26 14:55:57 +01:00
Johannes Zellner
53f7612ba9 Bump version for 1.30.1 2021-03-26 14:54:03 +01:00
Girish Ramakrishnan
d51a1d3b40 Version 1.21.0 2021-03-22 11:02:48 -07:00
Girish Ramakrishnan
e0abc92551 Update synapse to 1.30.0 2021-03-22 10:40:03 -07:00
Girish Ramakrishnan
98fc17e9d3 Version 1.20.0 2021-03-08 09:39:15 -08:00
Girish Ramakrishnan
aa32c3c771 Update synapse to 1.29.0 2021-03-08 09:27:43 -08:00
Girish Ramakrishnan
d7e26b3687 Version 1.19.0 2021-02-26 13:10:14 -08:00
Girish Ramakrishnan
2882a804c8 Update synapse to 1.28.0 2021-02-26 12:17:37 -08:00
9 changed files with 522 additions and 515 deletions

157
CHANGELOG
View File

@@ -313,3 +313,160 @@
* Add an admin API for getting and deleting forward extremities for a room. (#9062)
* Add an admin API for retrieving the current room state of a room. (#9168)
* Add an admin API endpoint for shadow-banning users. (#9209)
[1.19.0]
* Update Synapse to 1.28.0
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.28.0)
* New admin API to get the context of an event: /_synapse/admin/rooms/{roomId}/context/{eventId}. (#9150)
* Further improvements to the user experience of registration via single sign-on. (#9300, #9301)
* Add hook to spam checker modules that allow checking file uploads and remote downloads. (#9311)
* Add support for receiving OpenID Connect authentication responses via form POSTs rather than GETs. (#9376)
* Add the shadow-banning status to the admin API for user info. (#9400)
[1.20.0]
* Update Synapse to 1.29.0
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.29.0)
* Add rate limiters to cross-user key sharing requests. (#8957)
* Add order_by to the admin API GET /_synapse/admin/v1/users/<user_id>/media. Contributed by @dklimpel. (#8978)
* Add some configuration settings to make users' profile data more private. (#9203)
* The no_proxy and NO_PROXY environment variables are now respected in proxied HTTP clients with the lowercase form taking precedence if both are present. Additionally, the lowercase https_proxy environment variable is now respected in proxied HTTP clients on top of existing support for the uppercase HTTPS_PROXY form and takes precedence if both are present. Contributed by Timothy Leung. (#9372)
* Add a configuration option, user_directory.prefer_local_users, which when enabled will make it more likely for users on the same server as you to appear above other users. (#9383, #9385)
* Add support for regenerating thumbnails if they have been deleted but the original image is still stored. (#9438)
[1.21.0]
* Update Synapse to 1.30.0
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.30.0)
* Add prometheus metrics for number of users successfully registering and logging in. (#9510, #9511, #9573)
* Add synapse_federation_last_sent_pdu_time and synapse_federation_last_received_pdu_time prometheus metrics, which monitor federation delays by reporting the timestamps of messages sent and received to a set of remote servers. (#9540)
* Add support for generating JSON Web Tokens dynamically for use as OIDC client secrets. (#9549)
* Optimise handling of incomplete room history for incoming federation. (#9601)
* Finalise support for allowing clients to pick an SSO Identity Provider (MSC2858). (#9617)
* Tell spam checker modules about the SSO IdP a user registered through if one was used. (#9626)
[1.21.1]
* Update Synapse to 1.30.1
[1.22.0]
* Update Synapse to 1.31.0
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.31.0)
* Add support to OpenID Connect login for requiring attributes on the userinfo response. Contributed by Hubbe King. (#9609)
* Add initial experimental support for a "space summary" API. (#9643, #9652, #9653)
* Add support for the busy presence state as described in MSC3026. (#9644)
* Add support for credentials for proxy authentication in the HTTPS_PROXY environment variable. (#9657)
[1.22.1]
* Update Synapse to 1.32.0
* Add a Synapse module for routing presence updates between users. (#9491)
* Add an admin API to manage ratelimit for a specific user. (#9648)
* Include request information in structured logging output. (#9654)
* Add order_by to the admin API GET /_synapse/admin/v2/users. Contributed by @dklimpel. (#9691)
* Replace the room_invite_state_types configuration setting with room_prejoin_state. (#9700)
* Add experimental support for MSC3083: restricting room access via group membership. (#9717, #9735)
* Update experimental support for Spaces: include m.room.create in the room state sent with room-invites. (#9710)
* Synapse now requires Python 3.6 or later. It also requires Postgres 9.6 or later or SQLite 3.22 or later. (#9766)
* Prevent synapse_forward_extremities and synapse_excess_extremity_events Prometheus metrics from initially reporting zero-values after startup. (#8926)
* Fix recently added ratelimits to correctly honour the application service rate_limited flag. (#9711)
* Fix longstanding bug which caused duplicate key value violates unique constraint "remote_media_cache_thumbnails_media_origin_media_id_thumbna_key" errors. (#9725)
* Fix bug where sharded federation senders could get stuck repeatedly querying the DB in a loop, using lots of CPU. (#9770)
* Fix duplicate logging of exceptions thrown during federation transaction processing. (#9780)
[1.22.2]
* Update Synapse to 1.32.0
* Add a Synapse module for routing presence updates between users. (#9491)
* Add an admin API to manage ratelimit for a specific user. (#9648)
* Include request information in structured logging output. (#9654)
* Add order_by to the admin API GET /_synapse/admin/v2/users. Contributed by @dklimpel. (#9691)
* Replace the room_invite_state_types configuration setting with room_prejoin_state. (#9700)
* Add experimental support for MSC3083: restricting room access via group membership. (#9717, #9735)
* Update experimental support for Spaces: include m.room.create in the room state sent with room-invites. (#9710)
* Synapse now requires Python 3.6 or later. It also requires Postgres 9.6 or later or SQLite 3.22 or later. (#9766)
* Prevent synapse_forward_extremities and synapse_excess_extremity_events Prometheus metrics from initially reporting zero-values after startup. (#8926)
* Fix recently added ratelimits to correctly honour the application service rate_limited flag. (#9711)
* Fix longstanding bug which caused duplicate key value violates unique constraint "remote_media_cache_thumbnails_media_origin_media_id_thumbna_key" errors. (#9725)
* Fix bug where sharded federation senders could get stuck repeatedly querying the DB in a loop, using lots of CPU. (#9770)
* Fix duplicate logging of exceptions thrown during federation transaction processing. (#9780)
[1.22.3]
* Update Synapse to 1.32.1
* Fix a regression in Synapse 1.32.0 which caused Synapse to report large numbers of Prometheus time series, potentially overwhelming Prometheus instances. (#9854)
[1.22.4]
* Update Synapse to 1.32.2
* Fix a regression in Synapse 1.32.0 and 1.32.1 which caused LoggingContext errors in plugins. (#9857)
[1.23.0]
* Update Synapse to 1.33.0
* Update experimental support for MSC3083: restricting room access via group membership. (#9800, #9814)
* Add experimental support for handling presence on a worker. (#9819, #9820, #9828, #9850)
* Return a new template when an user attempts to renew their account multiple times with the same token, stating that their account is set to expire. This replaces the invalid token template that would previously be shown in this case. This change concerns the optional account validity feature. (#9832)
* Fixes the OIDC SSO flow when using a public_baseurl value including a non-root URL path. (#9726)
* Fix thumbnail generation for some sites with non-standard content types. Contributed by @rkfg. (#9788)
* Add some sanity checks to identity server passed to 3PID bind/unbind endpoints. (#9802)
* Limit the size of HTTP responses read over federation. (#9833)
* Fix a bug which could cause Synapse to get stuck in a loop of resyncing device lists. (#9867)
* Fix a long-standing bug where errors from federation did not propagate to the client. (#9868)
[1.23.1]
* Update Synapse to 1.33.1
* Fix bug where /sync would break if using the latest version of attrs dependency, by pinning to a previous version. (#9937)
[1.23.2]
* Update Synapse to 1.33.2
* This release fixes a denial of service attack (CVE-2021-29471) against Synapse's push rules implementation.
[1.24.0]
* Update Synapse to 1.34.0
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.34.0)
* Add support for DELETE /_synapse/admin/v1/rooms/<room_id>. (#9889)
* Improve performance after joining a large room when presence is enabled. (#9910, #9916)
* Support stable identifiers for MSC1772 Spaces. m.space.child events will now be taken into account when populating the experimental spaces summary response. Please see the upgrade notes if you have customised room_invite_state_types in your configuration. (#9915, #9966)
* Improve performance of backfilling in large rooms. (#9935)
[1.25.0]
* Update Synapse to 1.35.0
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.35.0)
* Add experimental support to allow a user who could join a restricted room to view it in the spaces summary. (#9922, #10007, #10038)
* Reduce memory usage when joining very large rooms over federation. (#9958)
* Add a configuration option which allows enabling opentracing by user id. (#9978)
* Enable experimental support for MSC2946 (spaces summary API) and MSC3083 (restricted join rules) by default. (#10011)
[1.25.1]
* Update Synapse to 1.35.1
* Fix a bug introduced in v1.35.0 where invite-only rooms would be shown to all users in a space, regardless of if the user had access to it. (#10109)
[1.26.0]
* Update Synapse to 1.36.0
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.36.0)
[1.27.0]
* Update Synapse to 1.38.0
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.38.0)
* Implement refresh tokens as specified by MSC2918. (#9450)
* Add support for evicting cache entries based on last access time. (#10205)
* Omit empty fields from the /sync response. Contributed by @deepbluev7. (#10214)
* Improve validation on federation send_{join,leave,knock} endpoints. (#10225, #10243)
* Mark events received over federation which fail a spam check as "soft-failed". (#10263)
* Add metrics for new inbound federation staging area. (#10284)
* Add script to print information about recently registered users. (#10290)
[1.27.1]
* Update Synapse to 1.38.1
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.38.1)
[1.28.0]
* Update Synapse to 1.39.0
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.39.0)
[1.29.0]
* Update Synapse to 1.40.0
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.40.0)
[1.30.0]
* Update Synapse to 1.41.0
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.41.0)
[1.30.1]
* Send logs to the console
* Fix postinstall message about federation

View File

@@ -5,7 +5,7 @@
"description": "file://DESCRIPTION.md",
"changelog": "file://CHANGELOG",
"tagline": "Secure & decentralized communication",
"version": "1.18.0",
"version": "1.30.1",
"healthCheckPath": "/",
"httpPort": 8008,
"memoryLimit": 536870912,

View File

@@ -1,4 +1,4 @@
This app packages Synapse <upstream>1.27.0</upstream>.
This app packages Synapse <upstream>1.41.0</upstream>.
**This package only provides the Matrix backend. A variety of clients are available
[here](https://matrix.org/clients/). Riot is a popular web frontend for Matrix and

View File

@@ -4,13 +4,13 @@ RUN mkdir -p /app/pkg
WORKDIR /app/code
ARG VERSION=v1.27.0
# https://pythonspeed.com/articles/activate-virtualenv-dockerfile/
RUN virtualenv -p python3 /app/code/env
ENV VIRTUAL_ENV=/app/code/env
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
ARG VERSION=v1.41.0
# Synapse (https://github.com/matrix-org/synapse/blob/master/INSTALL.md)
# lxml - required for previews
RUN pip install --upgrade pip && \

View File

@@ -1,8 +1,7 @@
Account ids are created with the username and the second level domain under which the
app is installed e.g. `@$CLOUDRON-USERNAME@$CLOUDRON-APP-DOMAIN`.
For federation to work, the second level domain has to be configured to serve up the
`.well-known/domain.com/matrix` URI. See the
[federation docs](https://cloudron.io/documentation/apps/synapse/) on
For federation to work, the second level domain (`$CLOUDRON-APP-DOMAIN`) has to be configured to serve up the
`.well-known/matrix/server` URI. See the [federation docs](https://cloudron.io/documentation/apps/synapse/) on
how to do this.

View File

@@ -22,7 +22,10 @@ if [[ ! -f /app/data/configs/homeserver.yaml ]]; then
cp /app/pkg/homeserver.yaml.template /app/data/configs/homeserver.yaml
mv /app/data/configs/${server_name}.log.config /app/data/configs/log.config
yq eval -i ".log_config=\"/app/data/configs/log.config\"" /app/data/configs/homeserver.yaml
yq eval -i ".handlers.file.filename=\"/run/synapse/homeserver.log\"" /app/data/configs/log.config
# delete default file and buffer handlers
yq eval -i "del(.handlers.file)" /app/data/configs/log.config
yq eval -i "del(.handlers.buffer)" /app/data/configs/log.config
mv /app/data/configs/${server_name}.signing.key /app/data/configs/signing.key
@@ -35,9 +38,15 @@ if [[ ! -f /app/data/configs/homeserver.yaml ]]; then
if [[ -z "${CLOUDRON_LDAP_SERVER:-}" ]]; then
yq eval -i ".enable_registration=true" /app/data/configs/homeserver.yaml
yq eval -i ".password_config.pepper=\"$(pwgen -1s 12)\"" /app/data/configs/homeserver.yaml
# just setting enabled to false is not enough. see https://github.com/matrix-org/matrix-synapse-ldap3/issues/123
yq eval -i "del(.password_providers)" /app/data/configs/homeserver.yaml
fi
fi
echo "==> Ensure we log to console"
yq eval -i ".root.handlers=[\"console\"]" /app/data/configs/log.config
yq eval -i ".loggers.twisted.handlers=[\"console\"]" /app/data/configs/log.config
[[ ! -f /app/data/index.html ]] && cp /app/pkg/index.html /app/data/index.html
echo "==> Configuring synapse"
@@ -67,6 +76,8 @@ if [[ -n "${CLOUDRON_LDAP_SERVER:-}" ]]; then
else
yq eval -i ".password_config.localdb_enabled=true" /app/data/configs/homeserver.yaml
# just setting enabled to false is not enough. see https://github.com/matrix-org/matrix-synapse-ldap3/issues/123
yq eval -i "del(.password_providers)" /app/data/configs/homeserver.yaml
fi
# turn (https://github.com/matrix-org/synapse/blob/master/docs/turn-howto.md#synapse-setup)
@@ -80,4 +91,4 @@ echo "==> Fixing permissions"
chown -R cloudron.cloudron /app/data /run/synapse
echo "==> Starting synapse"
gosu cloudron:cloudron python3 -m synapse.app.homeserver --config-path /app/data/configs/homeserver.yaml
gosu cloudron:cloudron python3 -m synapse.app.homeserver --config-path /app/data/configs/homeserver.yaml -n

699
test/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -9,12 +9,9 @@
"author": "",
"license": "ISC",
"dependencies": {
"chromedriver": "^88.0.0",
"ejs": "^3.1.5",
"chromedriver": "^92.0.1",
"expect.js": "^0.3.1",
"mkdirp": "^1.0.4",
"mocha": "^8.2.1",
"rimraf": "^3.0.2",
"mocha": "^9.0.3",
"selenium-server-standalone-jar": "^3.141.59",
"selenium-webdriver": "^3.6.0",
"superagent": "^6.1.0"

View File

@@ -1,11 +1,11 @@
#!/usr/bin/env node
/* jslint node:true */
/* global it:false */
/* global xit:false */
/* global describe:false */
/* global before:false */
/* global after:false */
/* jshint esversion: 8 */
/* global describe */
/* global before */
/* global after */
/* global it */
/* global xit */
'use strict';
@@ -15,47 +15,42 @@ var execSync = require('child_process').execSync,
expect = require('expect.js'),
path = require('path'),
superagent = require('superagent'),
webdriver = require('selenium-webdriver');
var by = require('selenium-webdriver').By,
until = require('selenium-webdriver').until,
Key = require('selenium-webdriver').Key;
{ Builder, By, Key, until } = require('selenium-webdriver'),
{ Options } = require('selenium-webdriver/chrome');
describe('Application life cycle test', function () {
this.timeout(0);
var server, browser = new webdriver.Builder().forBrowser('chrome').build();
var LOCATION = 'test';
var app;
var username = process.env.USERNAME;
var password = process.env.PASSWORD;
var TIMEOUT = process.env.TIMEOUT | 30000;
const LOCATION = 'test';
const TEST_TIMEOUT = 10000;
const EXEC_ARGS = { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' };
const username = process.env.USERNAME;
const password = process.env.PASSWORD;
var app, browser;
var token, roomId;
before(function (done) {
if (!process.env.USERNAME) return done(new Error('USERNAME env var not set'));
if (!process.env.PASSWORD) return done(new Error('PASSWORD env var not set'));
before(function () {
if (!process.env.USERNAME) throw new Error('USERNAME env var not set');
if (!process.env.PASSWORD) throw new Error('PASSWORD env var not set');
var seleniumJar= require('selenium-server-standalone-jar');
var SeleniumServer = require('selenium-webdriver/remote').SeleniumServer;
server = new SeleniumServer(seleniumJar.path, { port: 4444 });
server.start();
done();
browser = new Builder().forBrowser('chrome').setChromeOptions(new Options().windowSize({ width: 1280, height: 1024 })).build();
});
after(function (done) {
after(function () {
browser.quit();
server.stop();
done();
});
function checkLandingPage(done) {
browser.get('https://' + app.fqdn).then(function () {
return browser.wait(until.elementLocated(by.xpath('//h1[contains(text(),"Synapse is running")]')), TIMEOUT);
}).then(function () {
done();
});
function getAppInfo() {
var inspect = JSON.parse(execSync('cloudron inspect'));
app = inspect.apps.filter(function (a) { return a.location.indexOf(LOCATION) === 0; })[0];
expect(app).to.be.an('object');
}
async function checkLandingPage() {
await browser.get(`https://${app.fqdn}`);
await browser.wait(until.elementLocated(By.xpath('//h1[contains(text(),"Synapse is running")]')), TEST_TIMEOUT);
}
// https://matrix.org/docs/spec/client_server/latest#user-interactive-api-in-the-rest-api
@@ -82,7 +77,7 @@ describe('Application life cycle test', function () {
if (error) return done(error);
if (result.statusCode !== 200) return done(new Error('Login failed with status ' + result.statusCode));
console.log('registered user with id', result.user_id);
console.log('registered user with id', result.body.user_id);
done();
});
@@ -141,22 +136,12 @@ describe('Application life cycle test', function () {
});
}
xit('build app', function () {
execSync('cloudron build', { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
});
xit('build app', function () { execSync('cloudron build', EXEC_ARGS); });
// No SSO
it('install app (no sso)', function () {
execSync('cloudron install --no-sso --location ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
});
it('install app (no sso)', function () { execSync('cloudron install --no-sso --location ' + LOCATION, EXEC_ARGS); });
it('can get app information', function () {
var inspect = JSON.parse(execSync('cloudron inspect'));
app = inspect.apps.filter(function (a) { return a.location === LOCATION; })[0];
expect(app).to.be.an('object');
});
it('can get app information', getAppInfo);
it('check landing page', checkLandingPage);
it('can register new user', registerUser);
@@ -165,22 +150,12 @@ describe('Application life cycle test', function () {
it('create room', createRoom);
it('check room', checkRoom);
it('uninstall app', function () {
execSync('cloudron uninstall --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
});
it('uninstall app', function () { execSync('cloudron uninstall --app ' + app.id, EXEC_ARGS); });
// SSO
it('install app', function () {
execSync('cloudron install --location ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
});
it('install app', function () { execSync('cloudron install --location ' + LOCATION, EXEC_ARGS); });
it('can get app information', function () {
var inspect = JSON.parse(execSync('cloudron inspect'));
app = inspect.apps.filter(function (a) { return a.location === LOCATION; })[0];
expect(app).to.be.an('object');
});
it('can get app information', getAppInfo);
it('check landing page', checkLandingPage);
it('can login', checkLogin);
@@ -188,28 +163,22 @@ describe('Application life cycle test', function () {
it('create room', createRoom);
it('check room', checkRoom);
it('can restart app', function (done) {
execSync('cloudron restart');
done();
});
it('can restart app', function () { execSync('cloudron restart'); });
it('check landing page', checkLandingPage);
it('check room', checkRoom);
it('backup app', function () {
execSync('cloudron backup create --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
});
it('backup app', function () { execSync('cloudron backup create --app ' + app.id, EXEC_ARGS); });
it('check landing page', checkLandingPage);
it('check room', checkRoom);
it('restore app', function () {
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' });
execSync('cloudron uninstall --app ' + app.id, EXEC_ARGS);
execSync('cloudron install --location ' + LOCATION, EXEC_ARGS);
getAppInfo();
execSync(`cloudron restore --backup ${backups[0].id} --app ${app.id}`, EXEC_ARGS);
});
it('check landing page', checkLandingPage);
@@ -217,40 +186,29 @@ describe('Application life cycle test', function () {
it('move to different location', function () {
browser.manage().deleteAllCookies();
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');
execSync('cloudron configure --location ' + LOCATION + '2', EXEC_ARGS);
getAppInfo();
});
it('check landing page', checkLandingPage);
it('check room', checkRoom);
it('uninstall app', function () {
execSync('cloudron uninstall --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
});
it('uninstall app', function () { execSync('cloudron uninstall --app ' + app.id, EXEC_ARGS); });
// test update
it('can install app', function () {
execSync('cloudron install --appstore-id org.matrix.synapse --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');
});
it('can install app', function () { execSync('cloudron install --appstore-id org.matrix.synapse --location ' + LOCATION, EXEC_ARGS); });
it('can get app information', getAppInfo);
it('check landing page', checkLandingPage);
it('can login', checkLogin);
it('create room', createRoom);
it('check room', checkRoom);
it('can update', function () {
execSync('cloudron update --app ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
});
it('can update', function () { execSync('cloudron update --app ' + LOCATION, EXEC_ARGS); });
it('check landing page', checkLandingPage);
it('check room', checkRoom);
it('uninstall app', function () {
execSync('cloudron uninstall --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
});
});
it('uninstall app', function () { execSync('cloudron uninstall --app ' + app.id, EXEC_ARGS); });
});