mirror of
https://git.cloudron.io/cloudron/syncthing-app
synced 2025-09-21 12:27:35 +00:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
67383ed187 | ||
|
4e734b3323 | ||
|
83578811b0 | ||
|
6da37e33bd |
@@ -409,3 +409,6 @@
|
|||||||
* #141: Use multiple simultaneous TCP connections
|
* #141: Use multiple simultaneous TCP connections
|
||||||
* #5607: Move footer links to header
|
* #5607: Move footer links to header
|
||||||
|
|
||||||
|
[1.24.0]
|
||||||
|
* Update base image to 4.2.0
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
"description": "file://DESCRIPTION.md",
|
"description": "file://DESCRIPTION.md",
|
||||||
"changelog": "file://CHANGELOG",
|
"changelog": "file://CHANGELOG",
|
||||||
"tagline": "Decentralized file synchronization",
|
"tagline": "Decentralized file synchronization",
|
||||||
"version": "1.23.0",
|
"version": "1.24.0",
|
||||||
"upstreamVersion": "1.25.0",
|
"upstreamVersion": "1.25.0",
|
||||||
"healthCheckPath": "/healthcheck",
|
"healthCheckPath": "/healthcheck",
|
||||||
"httpPort": 8000,
|
"httpPort": 8000,
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
FROM cloudron/base:4.0.0@sha256:31b195ed0662bdb06a6e8a5ddbedb6f191ce92e8bee04c03fb02dd4e9d0286df
|
FROM cloudron/base:4.2.0@sha256:46da2fffb36353ef714f97ae8e962bd2c212ca091108d768ba473078319a47f4
|
||||||
|
|
||||||
RUN mkdir -p /app/code
|
RUN mkdir -p /app/code
|
||||||
WORKDIR /app/code
|
WORKDIR /app/code
|
||||||
|
30
test/package-lock.json
generated
30
test/package-lock.json
generated
@@ -12,7 +12,7 @@
|
|||||||
"chromedriver": "^117.0.3",
|
"chromedriver": "^117.0.3",
|
||||||
"expect.js": "^0.3.1",
|
"expect.js": "^0.3.1",
|
||||||
"mocha": "^10.2.0",
|
"mocha": "^10.2.0",
|
||||||
"selenium-webdriver": "^4.13.0",
|
"selenium-webdriver": "^4.14.0",
|
||||||
"superagent": "^8.1.2"
|
"superagent": "^8.1.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -1166,13 +1166,13 @@
|
|||||||
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
|
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
|
||||||
},
|
},
|
||||||
"node_modules/selenium-webdriver": {
|
"node_modules/selenium-webdriver": {
|
||||||
"version": "4.13.0",
|
"version": "4.14.0",
|
||||||
"resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.13.0.tgz",
|
"resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.14.0.tgz",
|
||||||
"integrity": "sha512-8JS0h5E0Sq7gNfbGg8LVaQ+Eqek97tvOONn3Jmy+NiWfb12WYpftz4VTC4D2JT4wakdG6VUzGKpA8cFGg0IjkA==",
|
"integrity": "sha512-637rs8anqMKHbWxcBZpyG3Gcs+rBUtAUiqk0O/knUqH4Paj3MFUZrz88/pVGOLNryEVy2z92fZomT8p1ENl1gA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"jszip": "^3.10.1",
|
"jszip": "^3.10.1",
|
||||||
"tmp": "^0.2.1",
|
"tmp": "^0.2.1",
|
||||||
"ws": ">=8.13.0"
|
"ws": ">=8.14.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 14.20.0"
|
"node": ">= 14.20.0"
|
||||||
@@ -1374,9 +1374,9 @@
|
|||||||
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
|
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
|
||||||
},
|
},
|
||||||
"node_modules/ws": {
|
"node_modules/ws": {
|
||||||
"version": "8.13.0",
|
"version": "8.14.2",
|
||||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz",
|
"resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz",
|
||||||
"integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==",
|
"integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10.0.0"
|
"node": ">=10.0.0"
|
||||||
},
|
},
|
||||||
@@ -2300,13 +2300,13 @@
|
|||||||
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
|
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
|
||||||
},
|
},
|
||||||
"selenium-webdriver": {
|
"selenium-webdriver": {
|
||||||
"version": "4.13.0",
|
"version": "4.14.0",
|
||||||
"resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.13.0.tgz",
|
"resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.14.0.tgz",
|
||||||
"integrity": "sha512-8JS0h5E0Sq7gNfbGg8LVaQ+Eqek97tvOONn3Jmy+NiWfb12WYpftz4VTC4D2JT4wakdG6VUzGKpA8cFGg0IjkA==",
|
"integrity": "sha512-637rs8anqMKHbWxcBZpyG3Gcs+rBUtAUiqk0O/knUqH4Paj3MFUZrz88/pVGOLNryEVy2z92fZomT8p1ENl1gA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"jszip": "^3.10.1",
|
"jszip": "^3.10.1",
|
||||||
"tmp": "^0.2.1",
|
"tmp": "^0.2.1",
|
||||||
"ws": ">=8.13.0"
|
"ws": ">=8.14.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"semver": {
|
"semver": {
|
||||||
@@ -2457,9 +2457,9 @@
|
|||||||
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
|
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
|
||||||
},
|
},
|
||||||
"ws": {
|
"ws": {
|
||||||
"version": "8.13.0",
|
"version": "8.14.2",
|
||||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz",
|
"resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz",
|
||||||
"integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==",
|
"integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==",
|
||||||
"requires": {}
|
"requires": {}
|
||||||
},
|
},
|
||||||
"y18n": {
|
"y18n": {
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
"chromedriver": "^117.0.3",
|
"chromedriver": "^117.0.3",
|
||||||
"expect.js": "^0.3.1",
|
"expect.js": "^0.3.1",
|
||||||
"mocha": "^10.2.0",
|
"mocha": "^10.2.0",
|
||||||
"selenium-webdriver": "^4.13.0",
|
"selenium-webdriver": "^4.14.0",
|
||||||
"superagent": "^8.1.2"
|
"superagent": "^8.1.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
48
test/test.js
48
test/test.js
@@ -14,21 +14,21 @@ const execSync = require('child_process').execSync,
|
|||||||
expect = require('expect.js'),
|
expect = require('expect.js'),
|
||||||
superagent = require('superagent'),
|
superagent = require('superagent'),
|
||||||
path = require('path'),
|
path = require('path'),
|
||||||
|
timers = require('timers/promises'),
|
||||||
{ Builder, By, Key, until } = require('selenium-webdriver'),
|
{ Builder, By, Key, until } = require('selenium-webdriver'),
|
||||||
{ Options } = require('selenium-webdriver/chrome');
|
{ Options } = require('selenium-webdriver/chrome');
|
||||||
|
|
||||||
describe('Application life cycle test', function () {
|
describe('Application life cycle test', function () {
|
||||||
this.timeout(0);
|
this.timeout(0);
|
||||||
|
|
||||||
var LOCATION = 'test';
|
const LOCATION = 'test';
|
||||||
var TEST_TIMEOUT = 30000;
|
const TEST_TIMEOUT = 30000;
|
||||||
var FOLDER = 'xmf'; // keep this small. long folder names fail in automation, not sure why
|
const FOLDER = 'xmf'; // keep this small. long folder names fail in automation, not sure why
|
||||||
var SYNC_PORT = 22001;
|
const SYNC_PORT = 22001;
|
||||||
var EXEC_ARGS = { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' };
|
const EXEC_ARGS = { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' };
|
||||||
|
|
||||||
var browser;
|
let browser, app;
|
||||||
var app;
|
const username = 'admin', password = 'changeme';
|
||||||
var username = 'admin', password = 'changeme';
|
|
||||||
|
|
||||||
before(function () {
|
before(function () {
|
||||||
browser = new Builder().forBrowser('chrome').setChromeOptions(new Options().windowSize({ width: 1280, height: 1024 })).build();
|
browser = new Builder().forBrowser('chrome').setChromeOptions(new Options().windowSize({ width: 1280, height: 1024 })).build();
|
||||||
@@ -39,7 +39,7 @@ describe('Application life cycle test', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
function getAppInfo() {
|
function getAppInfo() {
|
||||||
var inspect = JSON.parse(execSync('cloudron inspect'));
|
const inspect = JSON.parse(execSync('cloudron inspect'));
|
||||||
app = inspect.apps.filter(function (a) { return a.location.indexOf(LOCATION) === 0; })[0];
|
app = inspect.apps.filter(function (a) { return a.location.indexOf(LOCATION) === 0; })[0];
|
||||||
expect(app).to.be.an('object');
|
expect(app).to.be.an('object');
|
||||||
}
|
}
|
||||||
@@ -134,40 +134,38 @@ describe('Application life cycle test', function () {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function wait (done) {
|
|
||||||
setTimeout(done, 10000);
|
|
||||||
}
|
|
||||||
|
|
||||||
xit('build app', function () { execSync('cloudron build', EXEC_ARGS); });
|
xit('build app', function () { execSync('cloudron build', EXEC_ARGS); });
|
||||||
|
|
||||||
it('install app', function () { execSync('cloudron install --port-bindings SYNC_PORT=' + SYNC_PORT + ' --location ' + LOCATION, EXEC_ARGS); });
|
it('install app', async function () {
|
||||||
|
execSync('cloudron install --port-bindings SYNC_PORT=' + SYNC_PORT + ' --location ' + LOCATION, EXEC_ARGS);
|
||||||
|
await timers.setTimeout(30000);
|
||||||
|
});
|
||||||
it('can get app information', getAppInfo);
|
it('can get app information', getAppInfo);
|
||||||
|
|
||||||
it('wait', wait);
|
|
||||||
|
|
||||||
it('fails with invalid password', invalidPassword);
|
it('fails with invalid password', invalidPassword);
|
||||||
it('can load page', loadPage);
|
it('can load page', loadPage);
|
||||||
it('can add folder', addFolder);
|
it('can add folder', addFolder);
|
||||||
|
|
||||||
it('backup app', function () { execSync('cloudron backup create --app ' + app.id, EXEC_ARGS); });
|
it('backup app', async function () {
|
||||||
|
execSync('cloudron backup create --app ' + app.id, EXEC_ARGS);
|
||||||
|
await timers.setTimeout(30000);
|
||||||
|
});
|
||||||
it('restore app', async function () {
|
it('restore app', async function () {
|
||||||
await browser.get('about:blank');
|
await browser.get('about:blank');
|
||||||
execSync('cloudron restore --app ' + app.id, EXEC_ARGS);
|
execSync('cloudron restore --app ' + app.id, EXEC_ARGS);
|
||||||
|
await timers.setTimeout(30000);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('wait', wait);
|
|
||||||
|
|
||||||
it('can load page', loadPage);
|
it('can load page', loadPage);
|
||||||
it('can check folder', checkFolder);
|
it('can check folder', checkFolder);
|
||||||
|
|
||||||
it('move to different location', async function () {
|
it('move to different location', async function () {
|
||||||
await browser.get('about:blank');
|
await browser.get('about:blank');
|
||||||
execSync(`cloudron configure --location ${LOCATION}2 --app ${app.id}`, EXEC_ARGS);
|
execSync(`cloudron configure --location ${LOCATION}2 --app ${app.id}`, EXEC_ARGS);
|
||||||
|
await timers.setTimeout(30000);
|
||||||
});
|
});
|
||||||
it('can get app information', getAppInfo);
|
it('can get app information', getAppInfo);
|
||||||
|
|
||||||
it('wait', wait);
|
|
||||||
|
|
||||||
it('can load page', loadPage);
|
it('can load page', loadPage);
|
||||||
it('can check folder', checkFolder);
|
it('can check folder', checkFolder);
|
||||||
it('can remove folder', removeFolder);
|
it('can remove folder', removeFolder);
|
||||||
@@ -178,16 +176,18 @@ describe('Application life cycle test', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// test update
|
// test update
|
||||||
it('can install app', function () { execSync('cloudron install --port-bindings SYNC_PORT=' + SYNC_PORT + ' --appstore-id net.syncthing.cloudronapp2 --location ' + LOCATION, EXEC_ARGS); });
|
it('can install app', async function () {
|
||||||
|
execSync('cloudron install --port-bindings SYNC_PORT=' + SYNC_PORT + ' --appstore-id net.syncthing.cloudronapp2 --location ' + LOCATION, EXEC_ARGS);
|
||||||
|
await timers.setTimeout(30000);
|
||||||
|
});
|
||||||
it('can get app information', getAppInfo);
|
it('can get app information', getAppInfo);
|
||||||
it('wait', wait);
|
|
||||||
it('can load page', loadPage);
|
it('can load page', loadPage);
|
||||||
it('can add folder', addFolder);
|
it('can add folder', addFolder);
|
||||||
it('can update', async function () {
|
it('can update', async function () {
|
||||||
await browser.get('about:blank');
|
await browser.get('about:blank');
|
||||||
execSync('cloudron update --app ' + LOCATION, EXEC_ARGS);
|
execSync('cloudron update --app ' + LOCATION, EXEC_ARGS);
|
||||||
|
await timers.setTimeout(30000);
|
||||||
});
|
});
|
||||||
it('wait', wait);
|
|
||||||
it('can check folder', checkFolder);
|
it('can check folder', checkFolder);
|
||||||
|
|
||||||
it('uninstall app', async function () {
|
it('uninstall app', async function () {
|
||||||
|
Reference in New Issue
Block a user