mirror of
https://git.cloudron.io/cloudron/syncthing-app
synced 2025-09-13 08:19:09 +00:00
Compare commits
48 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
0d98ee2f5c | ||
|
b2f48f24af | ||
|
481765c3db | ||
|
6ea6e0cd30 | ||
|
0cd6523548 | ||
|
ae1f3401ae | ||
|
7dd3979bdc | ||
|
a5a91b09c8 | ||
|
91335ebc70 | ||
|
c0ba039523 | ||
|
9f78b41ca2 | ||
|
5c2828f669 | ||
|
391419d9f4 | ||
|
d99a39a0e5 | ||
|
ab3a81a67b | ||
|
8e5306db31 | ||
|
e73991042d | ||
|
d566e12bc9 | ||
|
6d051c2ad1 | ||
|
72d3757c51 | ||
|
5ca914f8d3 | ||
|
53bc9300d7 | ||
|
b67f87106f | ||
|
84533d94cc | ||
|
7d0ae7f24a | ||
|
1901d8450d | ||
|
319d23ead8 | ||
|
c1da43713e | ||
|
310b9443b0 | ||
|
ee5dc6e5b8 | ||
|
c8eca300d8 | ||
|
22f8c8625e | ||
|
7a9f077e99 | ||
|
9e7649fe36 | ||
|
5b2993e1e0 | ||
|
2fd1f42e44 | ||
|
aa6baa6ab9 | ||
|
9cd9df2876 | ||
|
09b27ff425 | ||
|
94520d61bf | ||
|
cdca87ef50 | ||
|
3078a34c8d | ||
|
a3f10a7f2d | ||
|
748697ba51 | ||
|
d281fb8aef | ||
|
d72a041d67 | ||
|
88a47bcf1a | ||
|
6be20dbf5e |
53
CHANGELOG
53
CHANGELOG
@@ -40,3 +40,56 @@
|
||||
[0.3.2]
|
||||
* Updated to version 0.14.36
|
||||
|
||||
[0.3.3]
|
||||
* Updated to version 0.14.37
|
||||
|
||||
[0.3.4]
|
||||
* Updated to version 0.14.38
|
||||
|
||||
[0.4.0]
|
||||
* Updated to version 0.14.39
|
||||
* #4357: Removing paused folders no longer triggers a crash.
|
||||
* #4360: Add further security related HTTP headers
|
||||
* #4375: Improve info level logging in some cases
|
||||
* #4377: Improve GUI tooltips in chromium based browsers
|
||||
* #4382: Hide temporary files on Windows
|
||||
* #4387: Add -device-id command line switch
|
||||
|
||||
[0.5.0]
|
||||
* Updated to version 0.14.40
|
||||
|
||||
[1.0.0]
|
||||
* Updated to version 0.14.44
|
||||
* #4634: Panic when connecting to device with auto accept and paused folders
|
||||
* #4636: List of files needed on remote is not wrapped at word boundaries
|
||||
* #4644: Impossible to run non-release builds without deadlock detectors
|
||||
* #4649: UTF-8 normalization does not work correctly on ZFS.
|
||||
* #4654: Upgrade system shows an error on RCs in some cases
|
||||
* #4657: Sparse files with zero blocks are not closed when pulling
|
||||
* #4668: Remote device out of sync items shows "0 items, ~0 B"
|
||||
|
||||
[1.0.1]
|
||||
* Updated to version 0.14.45
|
||||
* #4659: panic: bug: removed more than added
|
||||
* #4680: Ignore pattern beginning with "#" does not match subpaths
|
||||
* #4689: Ignore patterns in web UI aren't reloaded if only comments change
|
||||
* #4701: Global is different from local state when ignoring files
|
||||
|
||||
[1.0.2]
|
||||
* Update Syncthing to version 0.14.46
|
||||
|
||||
[1.0.3]
|
||||
* Update Syncthing to version 0.14.47
|
||||
|
||||
[1.0.4]
|
||||
* Update Syncthing to version 0.14.48
|
||||
|
||||
[1.0.5]
|
||||
* Update Syncthing to 0.14.49
|
||||
|
||||
[1.0.6]
|
||||
* Update Syncthign to 0.14.50
|
||||
|
||||
[1.0.7]
|
||||
* Update Syncthing to 0.14.51
|
||||
|
||||
|
@@ -1,20 +1,19 @@
|
||||
{
|
||||
"id": "net.syncthing.cloudronapp",
|
||||
"id": "net.syncthing.cloudronapp2",
|
||||
"title": "Syncthing",
|
||||
"author": "Syncthing Developers",
|
||||
"description": "file://DESCRIPTION.md",
|
||||
"changelog": "file://CHANGELOG",
|
||||
"tagline": "Decentralized file synchronization",
|
||||
"version": "0.3.2",
|
||||
"healthCheckPath": "/check",
|
||||
"version": "1.0.7",
|
||||
"healthCheckPath": "/healthcheck",
|
||||
"httpPort": 8000,
|
||||
"addons": {
|
||||
"localstorage": {},
|
||||
"ldap": {}
|
||||
"localstorage": {}
|
||||
},
|
||||
"tcpPorts": {
|
||||
"PORT": {
|
||||
"title": "Port",
|
||||
"SYNC_PORT": {
|
||||
"title": "Sync Port",
|
||||
"description": "Port over which syncthing will exchange data (do not disable)",
|
||||
"defaultValue": 22000,
|
||||
"containerPort": 22000
|
||||
@@ -28,8 +27,12 @@
|
||||
"storage",
|
||||
"sync"
|
||||
],
|
||||
"minBoxVersion": "1.8.1",
|
||||
"documentationUrl": "https://cloudron.io/documentation/apps/syncthing/",
|
||||
"mediaLinks": [
|
||||
"https://git.cloudron.io/dswd/syncthing-app/raw/master/screenshots/1.jpg"
|
||||
"https://s3.amazonaws.com/cloudron-app-screenshots/net.syncthing.cloudronapp2/53bc9300d71bb5bf32362f8213194a0c3a415429/1.png",
|
||||
"https://s3.amazonaws.com/cloudron-app-screenshots/net.syncthing.cloudronapp2/53bc9300d71bb5bf32362f8213194a0c3a415429/2.png",
|
||||
"https://s3.amazonaws.com/cloudron-app-screenshots/net.syncthing.cloudronapp2/53bc9300d71bb5bf32362f8213194a0c3a415429/3.png"
|
||||
],
|
||||
"postInstallMessage": "file://POSTINSTALL.md"
|
||||
}
|
||||
|
@@ -1,15 +1,17 @@
|
||||
This app packages Syncthing <upstream>v0.14.36</upstream>.
|
||||
This app packages Syncthing <upstream>v0.14.51</upstream>.
|
||||
|
||||
Syncthing replaces proprietary sync and cloud services with something open, trustworthy and decentralized. Your data is your data alone and you deserve to choose where it is stored, if it is shared with some third party and how it's transmitted over the Internet.
|
||||
|
||||
### Features
|
||||
|
||||
#### Secure & Private
|
||||
|
||||
- **Private.** None of your data is ever stored anywhere else other than on your computers. There is no central server that might be compromised, legally or illegally.
|
||||
- **Encrypted.** All communication is secured using TLS. The encryption used includes perfect forward secrecy to prevent any eavesdropper from ever gaining access to your data.
|
||||
- **Authenticated.** Every node is identified by a strong cryptographic certificate. Only nodes you have explicitly allowed can connect to your cluster.
|
||||
|
||||
#### Easy to Use
|
||||
|
||||
Syncthing is still in development, although a large number of features have already been implemented:
|
||||
|
||||
- **Web GUI.** Configure and monitor Syncthing via a responsive and powerful interface accessible via your browser.
|
||||
@@ -18,6 +20,7 @@ Syncthing is still in development, although a large number of features have alre
|
||||
- **Powerful.** Synchronize as many folders as you need with different people.
|
||||
|
||||
#### Native GUIs & Integrations
|
||||
|
||||
- **Windows** tray utility, filesystem watcher & launcher: [SyncTrayzor](https://github.com/canton7/SyncTrayzor/releases/latest)
|
||||
- **Cross-platform** GUI wrapper: [Syncthing-GTK](https://github.com/syncthing/syncthing-gtk/releases/latest)
|
||||
- **Android** app: [Syncthing App](https://f-droid.org/repository/browse/?fdid=com.nutomic.syncthingandroid)
|
||||
|
34
Dockerfile
34
Dockerfile
@@ -1,34 +1,7 @@
|
||||
FROM cloudron/base:0.10.0
|
||||
MAINTAINER Syncthing Developers <support@cloudron.io>
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
RUN apt-get update && apt-get -y install busybox
|
||||
|
||||
ENV NGINX_VERSION=1.12.0
|
||||
ENV NGINX_LDAP_VERSION=b80942160417e95adbadb16adc41aaa19a6a00d9
|
||||
|
||||
# Build a custom nginx with ldap support
|
||||
RUN apt-get remove -y nginx-full && apt-get autoremove -y && apt-get -y install libldap2-dev libpcre3-dev
|
||||
RUN mkdir -p /tmp/nginx-ldap
|
||||
WORKDIR /tmp/nginx-ldap
|
||||
RUN wget "https://github.com/kvspb/nginx-auth-ldap/archive/${NGINX_LDAP_VERSION}.tar.gz" -O - \
|
||||
| tar -xz -C /tmp/nginx-ldap --strip-components=1
|
||||
|
||||
RUN mkdir -p /tmp/nginx
|
||||
WORKDIR /tmp/nginx
|
||||
RUN wget "https://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz" -O - \
|
||||
| tar -xz -C /tmp/nginx --strip-components=1
|
||||
RUN ./configure \
|
||||
--add-dynamic-module=/tmp/nginx-ldap \
|
||||
--modules-path=/usr/local/nginx/modules \
|
||||
--conf-path=/app/code/nginx.conf \
|
||||
--pid-path=/run/nginx.pid \
|
||||
--error-log-path=/run/nginx.error.log \
|
||||
--build=cloudron-river
|
||||
RUN make install
|
||||
|
||||
ENV VERSION 0.14.36
|
||||
ENV VERSION 0.14.51
|
||||
|
||||
RUN mkdir -p /app/code \
|
||||
&& wget https://github.com/syncthing/syncthing/releases/download/v${VERSION}/syncthing-linux-amd64-v${VERSION}.tar.gz -O - \
|
||||
@@ -36,8 +9,11 @@ RUN mkdir -p /app/code \
|
||||
|
||||
WORKDIR /app/code
|
||||
|
||||
# add supervisor configs
|
||||
ADD supervisor/* /etc/supervisor/conf.d/
|
||||
RUN ln -sf /run/syncthing/supervisord.log /var/log/supervisor/supervisord.log
|
||||
|
||||
ADD nginx.conf /app/code/nginx.conf
|
||||
ADD inittab /etc/inittab
|
||||
ADD start.sh /app/code/start.sh
|
||||
|
||||
CMD [ "/app/code/start.sh" ]
|
||||
|
@@ -1,9 +1,8 @@
|
||||
This application integrates with Cloudron authentication.
|
||||
However, all Cloudron users share the same Syncthing session.
|
||||
Please note that only the username is accepted as login and not the email address.
|
||||
Use the following credentials for initial setup:
|
||||
|
||||
Syncthing contains an internal user `admin` that is needed by Cloudron but not exposed.
|
||||
Please do not change the password of that account.
|
||||
`username`: admin
|
||||
|
||||
Please create all sync folders as subfolders of `/app/data` as this is the only writable folder.
|
||||
`password`: changeme
|
||||
|
||||
**Please change the admin password on first login**
|
||||
|
||||
|
2
inittab
2
inittab
@@ -1,2 +0,0 @@
|
||||
::respawn:sudo -nu cloudron /app/code/syncthing -gui-address=0.0.0.0:3000 -home=/app/data/config -no-browser >/dev/stdout 2>/dev/stderr
|
||||
::respawn:/usr/local/nginx/sbin/nginx -c /app/code/nginx.conf
|
14
nginx.conf
14
nginx.conf
@@ -1,5 +1,4 @@
|
||||
user cloudron;
|
||||
load_module "/usr/local/nginx/modules/ngx_http_auth_ldap_module.so";
|
||||
|
||||
worker_processes 1;
|
||||
pid /run/nginx.pid;
|
||||
@@ -8,14 +7,11 @@ daemon off;
|
||||
# Send logs to stderr
|
||||
error_log /dev/stderr warn;
|
||||
|
||||
|
||||
events {
|
||||
worker_connections 768;
|
||||
}
|
||||
|
||||
http {
|
||||
include /run/ldap.conf;
|
||||
|
||||
error_log /dev/stderr warn;
|
||||
log_format simple '$remote_addr [$time_local] "$request" $status $body_bytes_sent "$http_referer"';
|
||||
access_log /dev/stdout simple;
|
||||
@@ -28,22 +24,18 @@ http {
|
||||
proxy_buffering off;
|
||||
proxy_cache_path /tmp/proxy_cache levels=1:2 keys_zone=my_cache:10m max_size=100m inactive=60m use_temp_path=off;
|
||||
proxy_cache my_cache;
|
||||
auth_ldap_cache_enabled on;
|
||||
auth_ldap_cache_expiration_time 300000;
|
||||
auth_ldap_cache_size 100;
|
||||
|
||||
server {
|
||||
error_log /dev/stderr warn;
|
||||
listen 8000 default_server;
|
||||
server_name _;
|
||||
proxy_read_timeout 120s;
|
||||
location /check {
|
||||
proxy_pass http://localhost:3000/syncthing/app.js;
|
||||
location /healthcheck {
|
||||
return 200;
|
||||
}
|
||||
location / {
|
||||
auth_ldap "Forbidden";
|
||||
auth_ldap_servers cloudron;
|
||||
proxy_pass http://localhost:3000;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 46 KiB |
BIN
screenshots/1.png
Normal file
BIN
screenshots/1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 109 KiB |
BIN
screenshots/2.png
Normal file
BIN
screenshots/2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 149 KiB |
BIN
screenshots/3.png
Normal file
BIN
screenshots/3.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 123 KiB |
36
start.sh
36
start.sh
@@ -2,32 +2,28 @@
|
||||
|
||||
set -eu
|
||||
|
||||
mkdir -p /app/data/config
|
||||
|
||||
export STNODEFAULTFOLDER=1 STNOUPGRADE=1
|
||||
mkdir -p /app/data/config /app/data/folders /run/syncthing
|
||||
|
||||
# if this if the first run, generate a useful config
|
||||
if [ ! -f /app/data/config/config.xml ]; then
|
||||
echo "=> Generating config"
|
||||
/app/code/syncthing --generate="/app/data/config"
|
||||
echo "=> Generating config"
|
||||
STNODEFAULTFOLDER=1 /app/code/syncthing --generate="/app/data/config"
|
||||
|
||||
# The password value was determined by reading config.xml and setting value in the GUI
|
||||
# urAccepted is 0 for not decided, -1 for no reporting
|
||||
xmlstarlet ed --inplace \
|
||||
--subnode "//configuration/gui" -t elem -n user -v "admin" \
|
||||
--subnode "//configuration/gui" -t elem -n password -v '$2a$10$93OsgwAMD4NcPFTpGDnuTORMMbj5dc1ZlYUPrQCcy1N/Bsy9scUvK' \
|
||||
--update "//configuration/options/defaultFolderPath" -v '/app/data/folders' \
|
||||
--update "//configuration/options/urAccepted" -v '-1' \
|
||||
/app/data/config/config.xml
|
||||
fi
|
||||
|
||||
cat >/run/ldap.conf <<EOF
|
||||
ldap_server cloudron {
|
||||
url ${LDAP_URL}/${LDAP_USERS_BASE_DN}?username;
|
||||
binddn ${LDAP_BIND_DN};
|
||||
binddn_passwd ${LDAP_BIND_PASSWORD};
|
||||
group_attribute ${LDAP_GROUPS_BASE_DN};
|
||||
group_attribute_is_dn on;
|
||||
require valid_user;
|
||||
}
|
||||
EOF
|
||||
|
||||
# Set the listenAddress and the gui enabled to make sure user doesnt lock themselves out by accident.
|
||||
sed -e 's,<listenAddress>.*</listenAddress>,<listenAddress>tcp://:22000</listenAddress>,' -i /app/data/config/config.xml
|
||||
sed -e "s,<listenAddress>.*</listenAddress>,<listenAddress>tcp://:${SYNC_PORT}</listenAddress>," -i /app/data/config/config.xml
|
||||
sed -e 's,<gui .*>,<gui enabled="true" tls="false" debugging="false">,' -i /app/data/config/config.xml
|
||||
|
||||
chown -R cloudron:cloudron /app/data/config /app/data
|
||||
|
||||
exec busybox init
|
||||
chown -R cloudron:cloudron /app/data /run/syncthing
|
||||
|
||||
echo "Starting supervisor"
|
||||
exec /usr/bin/supervisord --configuration /etc/supervisor/supervisord.conf --nodaemon -i GitLab
|
||||
|
12
supervisor/nginx.conf
Normal file
12
supervisor/nginx.conf
Normal file
@@ -0,0 +1,12 @@
|
||||
[program:nginx]
|
||||
priority=100
|
||||
directory=/tmp
|
||||
command=/usr/sbin/nginx -c /app/code/nginx.conf
|
||||
user=root
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes=0
|
||||
|
14
supervisor/syncthing.conf
Normal file
14
supervisor/syncthing.conf
Normal file
@@ -0,0 +1,14 @@
|
||||
[program:syncthing]
|
||||
priority=20
|
||||
environment=HOME=/app/data/folders,STNOUPGRADE=1
|
||||
; -no-browser opens up the browser (for desktop app preumably)
|
||||
; auditfile "-" means log to stdout
|
||||
command=/app/code/syncthing -gui-address=127.0.0.1:3000 -home=/app/data/config -no-browser -auditfile=-
|
||||
user=cloudron
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes=0
|
||||
|
@@ -9,14 +9,14 @@
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"chromedriver": "^2.36.0",
|
||||
"ejs": "^2.4.2",
|
||||
"expect.js": "^0.3.1",
|
||||
"mkdirp": "^0.5.1",
|
||||
"mocha": "^2.5.3",
|
||||
"rimraf": "^2.5.3",
|
||||
"selenium-server-standalone-jar": "^2.53.1",
|
||||
"selenium-webdriver": "^2.53.1",
|
||||
"superagent": "^1.4.0",
|
||||
"chromedriver": "^2.31.0"
|
||||
"selenium-webdriver": "^2.53.3",
|
||||
"superagent": "^1.4.0"
|
||||
}
|
||||
}
|
||||
|
87
test/test.js
87
test/test.js
@@ -2,8 +2,11 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
require('chromedriver');
|
||||
|
||||
var execSync = require('child_process').execSync,
|
||||
expect = require('expect.js'),
|
||||
superagent = require('superagent'),
|
||||
path = require('path'),
|
||||
webdriver = require('selenium-webdriver');
|
||||
|
||||
@@ -19,17 +22,12 @@ var bucket_prefix = 'bucket',
|
||||
|
||||
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
|
||||
|
||||
if (!process.env.USERNAME || !process.env.PASSWORD) {
|
||||
console.log('USERNAME and PASSWORD env vars need to be set');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
describe('Application life cycle test', function () {
|
||||
this.timeout(0);
|
||||
|
||||
var chrome = require('selenium-webdriver/chrome');
|
||||
var server, browser = new chrome.Driver();
|
||||
var username = process.env.USERNAME, password = process.env.PASSWORD;
|
||||
var username = 'admin', password = 'changeme';
|
||||
|
||||
before(function (done) {
|
||||
var seleniumJar= require('selenium-server-standalone-jar');
|
||||
@@ -48,9 +46,14 @@ describe('Application life cycle test', function () {
|
||||
|
||||
var LOCATION = 'test';
|
||||
var TEST_TIMEOUT = 30000;
|
||||
var FOLDER = 'xmf'; // keep this small. long folder names fail in automation, not sure why
|
||||
var SYNC_PORT = 22001;
|
||||
var app;
|
||||
|
||||
function installApp() {
|
||||
execSync('cloudron install --new --wait --port-bindings SYNC_PORT=' + SYNC_PORT + ' --location ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
||||
}
|
||||
|
||||
function pageLoaded() {
|
||||
return browser.wait(until.titleMatches(/[0-9a-f]{12} \| Syncthing/), TEST_TIMEOUT);
|
||||
}
|
||||
@@ -61,6 +64,14 @@ describe('Application life cycle test', function () {
|
||||
});
|
||||
}
|
||||
|
||||
function invalidPassword(callback) {
|
||||
superagent.get('https://' + app.fqdn).auth(username, password + 'x').end(function (error, result) {
|
||||
expect(result.status).to.eql(401);
|
||||
|
||||
callback();
|
||||
});
|
||||
}
|
||||
|
||||
function loadPage(callback) {
|
||||
browser.manage().deleteAllCookies().then(function () {
|
||||
return browser.get('https://' + username + ':' + encodeURIComponent(password) + '@' + app.fqdn).then(function () {
|
||||
@@ -74,45 +85,54 @@ describe('Application life cycle test', function () {
|
||||
}
|
||||
|
||||
function addFolder(callback) {
|
||||
pageLoaded().then(function() {
|
||||
browser.get('https://' + app.fqdn).then(function () {
|
||||
return browser.findElement(by.css('[ng-click*=addFolder]')).click();
|
||||
}).then(function () {
|
||||
return visible(by.id('folderPath'));
|
||||
}).then(function() {
|
||||
return browser.findElement(by.id('folderLabel')).sendKeys('test');
|
||||
}).then(function () {
|
||||
return browser.findElement(by.id('folderPath')).sendKeys('/app/data/test');
|
||||
return browser.sleep(4000); // wait more, not sure why this is needed
|
||||
}).then(function() {
|
||||
//Clear and re-enter the folder to avoid race with auto-completion
|
||||
return browser.findElement(by.id('folderPath')).clear();
|
||||
}).then(function() {
|
||||
return browser.findElement(by.id('folderPath')).sendKeys('/app/data/test');
|
||||
return browser.findElement(by.id('folderLabel')).sendKeys(FOLDER);
|
||||
}).then(function () {
|
||||
return browser.sleep(4000); // without this sometimes only part of the folder name gets through
|
||||
}).then(function() {
|
||||
return browser.findElement(by.css('[ng-click*=saveFolder]')).click();
|
||||
}).then(function() {
|
||||
return browser.wait(until.elementLocated(by.css('#folders .panel-status span[ng-switch-when=unshared]')), TEST_TIMEOUT);
|
||||
}).then(function () {
|
||||
return browser.sleep(4000);
|
||||
}).then(function() {
|
||||
callback();
|
||||
});
|
||||
}
|
||||
|
||||
function removeFolder(callback) {
|
||||
browser.get('https://' + username + ':' + encodeURIComponent(password) + '@' + app.fqdn).then(function () {
|
||||
return browser.get('https://' + app.fqdn);
|
||||
function checkFolder(callback) {
|
||||
browser.get('https://' + app.fqdn).then(function () {
|
||||
return browser.wait(until.elementLocated(by.xpath(`//span[text()="${FOLDER}"]`)), TEST_TIMEOUT);
|
||||
}).then(function () {
|
||||
callback();
|
||||
});
|
||||
}
|
||||
|
||||
function removeFolder(callback) {
|
||||
browser.get('https://' + app.fqdn).then(function () {
|
||||
return pageLoaded();
|
||||
}).then(function() {
|
||||
return browser.findElement(by.css('#folders button')).click();
|
||||
}).then(function () {
|
||||
return browser.sleep(1000); //No way to check for visibility of angular-js components
|
||||
return browser.sleep(3000); //No way to check for visibility of angular-js components
|
||||
}).then(function () {
|
||||
return browser.findElement(by.css('#folder-0 button[ng-click*=editFolder]')).click();
|
||||
}).then(function () {
|
||||
return browser.sleep(1000); //No way to check for visibility of angular-js components
|
||||
return browser.sleep(3000); //No way to check for visibility of angular-js components
|
||||
}).then(function () {
|
||||
return browser.findElement(by.xpath('//button[@data-target="#remove-folder-confirmation"]')).click();
|
||||
}).then(function () {
|
||||
return browser.sleep(3000); //No way to check for visibility of angular-js components
|
||||
}).then(function () {
|
||||
return browser.findElement(by.css('[ng-click*=deleteFolder]')).click();
|
||||
}).then(function () {
|
||||
return browser.sleep(1000); //This needs to run for some time
|
||||
return browser.sleep(3000); //This needs to run for some time
|
||||
}).then(function () {
|
||||
callback();
|
||||
});
|
||||
@@ -122,9 +142,7 @@ describe('Application life cycle test', function () {
|
||||
execSync('cloudron build', { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
||||
});
|
||||
|
||||
it('install app', function () {
|
||||
execSync('cloudron install --new --wait --port-bindings PORT=' + SYNC_PORT + ' --location ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
||||
});
|
||||
it('install app', installApp);
|
||||
|
||||
it('can get app information', function () {
|
||||
var inspect = JSON.parse(execSync('cloudron inspect'));
|
||||
@@ -134,9 +152,9 @@ describe('Application life cycle test', function () {
|
||||
expect(app).to.be.an('object');
|
||||
});
|
||||
|
||||
it('fails with invalid password', invalidPassword);
|
||||
it('can load page', loadPage);
|
||||
it('can add folder', addFolder);
|
||||
it('can remove folder', removeFolder);
|
||||
|
||||
it('backup app', function () {
|
||||
execSync('cloudron backup create --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
||||
@@ -147,8 +165,7 @@ describe('Application life cycle test', function () {
|
||||
});
|
||||
|
||||
it('can load page', loadPage);
|
||||
it('can add folder', addFolder);
|
||||
it('can remove folder', removeFolder);
|
||||
it('can check folder', checkFolder);
|
||||
|
||||
it('move to different location', function () {
|
||||
browser.manage().deleteAllCookies();
|
||||
@@ -159,11 +176,27 @@ describe('Application life cycle test', function () {
|
||||
});
|
||||
|
||||
it('can load page', loadPage);
|
||||
it('can add folder', addFolder);
|
||||
it('can check folder', checkFolder);
|
||||
it('can remove folder', removeFolder);
|
||||
|
||||
it('uninstall app', function () {
|
||||
execSync('cloudron uninstall --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
||||
});
|
||||
|
||||
// test update
|
||||
it('can install app', function () {
|
||||
installApp();
|
||||
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 load page', loadPage);
|
||||
it('can add folder', addFolder);
|
||||
it('can update', function () {
|
||||
execSync('cloudron install --wait --app ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
||||
});
|
||||
it('can check folder', checkFolder);
|
||||
it('uninstall app', function () {
|
||||
execSync('cloudron uninstall --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user