mirror of
https://git.cloudron.io/cloudron/gitea-app
synced 2025-09-25 14:37:44 +00:00
Compare commits
24 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
5f5d3a7b53 | ||
|
0902b92a7d | ||
|
d675d60e1d | ||
|
07d3c6bfcf | ||
|
60f9045cbb | ||
|
a633dcab9a | ||
|
435f30cf8c | ||
|
157f500660 | ||
|
2eae86ee53 | ||
|
3993229ac3 | ||
|
9793215e7c | ||
|
6e04300610 | ||
|
587235be2b | ||
|
de3369808e | ||
|
5e99be936a | ||
|
12f58af585 | ||
|
9971919cf9 | ||
|
65bc13c2b7 | ||
|
c231b12f2d | ||
|
1265366151 | ||
|
278116abdb | ||
|
8a942dc8f7 | ||
|
1b15db85e3 | ||
|
d37044f8e0 |
104
CHANGELOG
104
CHANGELOG
@@ -174,3 +174,107 @@
|
|||||||
* Emoji Autocomplete (#3433)
|
* Emoji Autocomplete (#3433)
|
||||||
* Implements generator cli for secrets (#3531)
|
* Implements generator cli for secrets (#3531)
|
||||||
|
|
||||||
|
[1.6.1]
|
||||||
|
* Update Gitea to 1.5.1
|
||||||
|
* Security
|
||||||
|
* Don't disclose emails of all users when sending out emails (#4784)
|
||||||
|
* Improve URL validation for external wiki and external issues (#4710) (#4740)
|
||||||
|
* Make cookies HttpOnly and obey COOKIE_SECURE flag (#4706) (#4707)
|
||||||
|
* Bugfixes
|
||||||
|
* Fix missing release title in webhook (#4783) (#4800)
|
||||||
|
* Make sure to reset commit count in the cache on mirror syncing (#4770)
|
||||||
|
* Fixed bug where team with admin privelege type doesn't get any unit (#4759)
|
||||||
|
* Fix failure on creating pull request with assignees (#4583) (#4727)
|
||||||
|
* Hide org/create menu item in Dashboard if user has no rights (#4678) (#4686)
|
||||||
|
|
||||||
|
[1.7.0]
|
||||||
|
* Update base image
|
||||||
|
|
||||||
|
[1.7.1]
|
||||||
|
* Update Gitea to 1.5.2
|
||||||
|
|
||||||
|
[1.7.2]
|
||||||
|
* Update Gitea to 1.5.3
|
||||||
|
* Security
|
||||||
|
* Fix remote command execution vulnerability in upstream library (#5177) (#5196)
|
||||||
|
|
||||||
|
[1.8.0]
|
||||||
|
* Update Gitea to 1.6.0
|
||||||
|
|
||||||
|
[1.8.1]
|
||||||
|
* Update Gitea to 1.6.1
|
||||||
|
|
||||||
|
[1.8.2]
|
||||||
|
* Update Gitea to 1.6.2
|
||||||
|
* SECURITY
|
||||||
|
* Sanitize uploaded file names (#5571) (#5573)
|
||||||
|
* HTMLEncode user added text (#5570) (#5575)
|
||||||
|
* BUGFIXES
|
||||||
|
* Fix indexer reindex bug when gitea restart (#5563) (#5564)
|
||||||
|
* Fix bug when a read perm user to edit his issue (#5516) (#5534)
|
||||||
|
* Detect force push failure on deletion of protected branches (#5522) (#5531)
|
||||||
|
* Fix forgot deletion of notification when delete repository (#5506) (#5514)
|
||||||
|
* Fix undeleted content when deleting user (#5429) (#5509)
|
||||||
|
* Fix empty wiki (#5504) (#5508)
|
||||||
|
|
||||||
|
[1.8.3]
|
||||||
|
* Update Gitea to 1.6.3
|
||||||
|
* SECURITY: Prevent DeleteFilePost doing arbitrary deletion (#5631)
|
||||||
|
* BUGFIX: Fix wrong text getting saved on editing second comment on an issue (#5608)
|
||||||
|
|
||||||
|
[1.8.4]
|
||||||
|
* Update Gitea to 1.6.4
|
||||||
|
* Fix SSH key now can be reused as public key after deleting as deploy key (#5671) (#5685)
|
||||||
|
* When redirecting clean the path to avoid redirecting to external site (#5669) (#5703)
|
||||||
|
* Fix to use correct value for "MSpan Structures Obtained" (#5706) (#5715)
|
||||||
|
|
||||||
|
[1.9.0]
|
||||||
|
* Update Gitea to 1.7.0
|
||||||
|
|
||||||
|
[1.9.1]
|
||||||
|
* Update Gitea to 1.7.1
|
||||||
|
* [Changelog](https://github.com/go-gitea/gitea/releases/tag/v1.7.1)
|
||||||
|
* Disable redirect for i18n (#5910) (#5916)
|
||||||
|
* Only allow local login if password is non-empty (#5906) (#5908)
|
||||||
|
* Fix go-get URL generation (#5905) (#5907)
|
||||||
|
* Fix TLS errors when using acme/autocert for local connections (#5820) (#5826)
|
||||||
|
* Request for public keys only if LDAP attribute is set (#5816) (#5819)
|
||||||
|
* Fix delete correct temp directory (#5840) (#5839)
|
||||||
|
* Fix an error while adding a dependency via UI (#5862) (#5876)
|
||||||
|
* Fix null pointer in attempt to Sudo if not logged in (#5872) (#5884)
|
||||||
|
* When creating new repository fsck option should be enabled (#5817) (#5885)
|
||||||
|
* Prevent nil dereference in mailIssueCommentToParticipants (#5891) (#5895) (#5894)
|
||||||
|
* Fix bug when read public repo lfs file (#5913) (#5912)
|
||||||
|
* Respect value of REQUIRE_SIGNIN_VIEW (#5901) (#5915)
|
||||||
|
* Fix compare button on upstream repo leading to 404 (#5877) (#5914)
|
||||||
|
|
||||||
|
[1.9.2]
|
||||||
|
* Update Gitea to 1.7.2
|
||||||
|
* Remove all CommitStatus when a repo is deleted (#5940) (#5941)
|
||||||
|
* Fix notifications on pushing with deploy keys by setting hook environment variables (#5935) (#5944)
|
||||||
|
* Silence console logger in gitea serv (#5887) (#5943)
|
||||||
|
* Handle milestone webhook events for issues and PR (#5947) (#5955)
|
||||||
|
* Show user who created the repository instead of the organization in action feed (#5948) (#5956)
|
||||||
|
* Fix ssh deploy and user key constraints (#1357) (#5939) (#5966)
|
||||||
|
* Fix bug when deleting a linked account will removed all (#5989) (#5990)
|
||||||
|
* Fix empty ssh key importing in ldap (#5984) (#6009)
|
||||||
|
* Fix metrics auth token detection (#6006) (#6017)
|
||||||
|
* Create repository on organisation by default on its dashboard (#6026) (#6048)
|
||||||
|
* Make sure labels are actually returned in API (#6053) (#6059)
|
||||||
|
* Switch to more recent build of xgo (#6070) (#6072)
|
||||||
|
* In basic auth check for tokens before call UserSignIn (#5725) (#6083)
|
||||||
|
|
||||||
|
[1.9.3]
|
||||||
|
* Update Gitea to 1.7.3
|
||||||
|
* Fix server 500 when trying to migrate to an already existing repository (#6188) (#6197)
|
||||||
|
* Load Issue attributes for API /repos/{owner}/{repo}/issues/{index} (#6122) (#6185)
|
||||||
|
* Fix bug whereby user could change private repository to public when force private enabled. (#6156) (#6165)
|
||||||
|
* Fix bug when update owner team then visit team's repo return 404 (#6119) (#6166)
|
||||||
|
* Fix heatmap and repository menu display in Internet Explorer 9+ (#6117) (#6137)
|
||||||
|
* Fix prohibit login check on authorization (#6106) (#6115)
|
||||||
|
* Fix LDAP protocol error regression by moving to ldap.v3 (#6105) (#6107)
|
||||||
|
* Fix deadlock in webhook PullRequest (#6102) (#6104)
|
||||||
|
* Fix redirect loop when password change is required and Gitea is installed as a suburl (#5965) (#6101)
|
||||||
|
* Fix compare button regression (#5929) (#6098)
|
||||||
|
* Recover panic in orgmode.Render if bad orgfile (#4982) (#5903) (#6097)
|
||||||
|
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
"author": "Gitea developers",
|
"author": "Gitea developers",
|
||||||
"description": "file://DESCRIPTION.md",
|
"description": "file://DESCRIPTION.md",
|
||||||
"tagline": "A painless self-hosted Git Service",
|
"tagline": "A painless self-hosted Git Service",
|
||||||
"version": "1.6.0",
|
"version": "1.9.3",
|
||||||
"healthCheckPath": "/healthcheck",
|
"healthCheckPath": "/healthcheck",
|
||||||
"httpPort": 3000,
|
"httpPort": 3000,
|
||||||
"addons": {
|
"addons": {
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
This app packages Gitea <upstream>1.5.0</upstream>
|
This app packages Gitea <upstream>1.7.3</upstream>
|
||||||
|
|
||||||
Gitea is a painless self-hosted Git service. It is similar to GitHub, Bitbucket or Gitlab.
|
Gitea is a painless self-hosted Git service. It is similar to GitHub, Bitbucket or Gitlab.
|
||||||
|
|
||||||
|
11
Dockerfile
11
Dockerfile
@@ -1,6 +1,4 @@
|
|||||||
FROM cloudron/base:0.10.0
|
FROM cloudron/base:1.0.0@sha256:147a648a068a2e746644746bbfb42eb7a50d682437cead3c67c933c546357617
|
||||||
|
|
||||||
ENV VERSION 1.5.0
|
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y openssh-server git && \
|
apt-get install -y openssh-server git && \
|
||||||
@@ -15,8 +13,7 @@ RUN adduser --disabled-login --gecos 'Gitea' git
|
|||||||
RUN passwd -d git
|
RUN passwd -d git
|
||||||
|
|
||||||
RUN mkdir -p /home/git/gitea
|
RUN mkdir -p /home/git/gitea
|
||||||
## TODO: use redis as well
|
RUN curl -L https://dl.gitea.io/gitea/1.7.3/gitea-1.7.3-linux-amd64 -o /home/git/gitea/gitea \
|
||||||
RUN curl -L https://dl.gitea.io/gitea/${VERSION}/gitea-${VERSION}-linux-amd64 -o /home/git/gitea/gitea \
|
|
||||||
&& chmod +x /home/git/gitea/gitea
|
&& chmod +x /home/git/gitea/gitea
|
||||||
|
|
||||||
# setup config paths
|
# setup config paths
|
||||||
@@ -31,9 +28,7 @@ RUN ln -s /app/data/gitconfig /home/git/.gitconfig
|
|||||||
|
|
||||||
ADD start.sh /home/git/start.sh
|
ADD start.sh /home/git/start.sh
|
||||||
|
|
||||||
# disable pam authentication for sshd
|
COPY sshd_config /etc/ssh/sshd_config
|
||||||
RUN sed -e 's/UsePAM yes/UsePAM no/' -e 's/UsePrivilegeSeparation yes/UsePrivilegeSeparation no/' -i /etc/ssh/sshd_config
|
|
||||||
RUN echo "UseDNS no" >> /etc/ssh/sshd_config
|
|
||||||
|
|
||||||
CMD [ "/home/git/start.sh" ]
|
CMD [ "/home/git/start.sh" ]
|
||||||
|
|
||||||
|
79
sshd_config
Normal file
79
sshd_config
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
# Package generated configuration file
|
||||||
|
# See the sshd_config(5) manpage for details
|
||||||
|
|
||||||
|
# What ports, IPs and protocols we listen for
|
||||||
|
Port 29418
|
||||||
|
# Use these options to restrict which interfaces/protocols sshd will bind to
|
||||||
|
ListenAddress 0.0.0.0
|
||||||
|
Protocol 2
|
||||||
|
# HostKeys for protocol version 2
|
||||||
|
HostKey /app/data/sshd/ssh_host_rsa_key
|
||||||
|
HostKey /app/data/sshd/ssh_host_dsa_key
|
||||||
|
HostKey /app/data/sshd/ssh_host_ecdsa_key
|
||||||
|
HostKey /app/data/sshd/ssh_host_ed25519_key
|
||||||
|
|
||||||
|
# Logging
|
||||||
|
SyslogFacility AUTH
|
||||||
|
LogLevel INFO
|
||||||
|
|
||||||
|
# Authentication:
|
||||||
|
LoginGraceTime 120
|
||||||
|
PermitRootLogin prohibit-password
|
||||||
|
StrictModes yes
|
||||||
|
|
||||||
|
PubkeyAuthentication yes
|
||||||
|
#AuthorizedKeysFile %h/.ssh/authorized_keys
|
||||||
|
|
||||||
|
# Don't read the user's ~/.rhosts and ~/.shosts files
|
||||||
|
IgnoreRhosts yes
|
||||||
|
# similar for protocol version 2
|
||||||
|
HostbasedAuthentication no
|
||||||
|
# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
|
||||||
|
#IgnoreUserKnownHosts yes
|
||||||
|
|
||||||
|
# To enable empty passwords, change to yes (NOT RECOMMENDED)
|
||||||
|
PermitEmptyPasswords no
|
||||||
|
|
||||||
|
# Change to yes to enable challenge-response passwords (beware issues with
|
||||||
|
# some PAM modules and threads)
|
||||||
|
ChallengeResponseAuthentication no
|
||||||
|
|
||||||
|
# Change to no to disable tunnelled clear text passwords
|
||||||
|
#PasswordAuthentication yes
|
||||||
|
|
||||||
|
# Kerberos options
|
||||||
|
#KerberosAuthentication no
|
||||||
|
#KerberosGetAFSToken no
|
||||||
|
#KerberosOrLocalPasswd yes
|
||||||
|
#KerberosTicketCleanup yes
|
||||||
|
|
||||||
|
# GSSAPI options
|
||||||
|
#GSSAPIAuthentication no
|
||||||
|
#GSSAPICleanupCredentials yes
|
||||||
|
|
||||||
|
X11Forwarding yes
|
||||||
|
X11DisplayOffset 10
|
||||||
|
PrintMotd no
|
||||||
|
PrintLastLog yes
|
||||||
|
TCPKeepAlive yes
|
||||||
|
#UseLogin no
|
||||||
|
|
||||||
|
#MaxStartups 10:30:60
|
||||||
|
#Banner /etc/issue.net
|
||||||
|
|
||||||
|
# Allow client to pass locale environment variables
|
||||||
|
AcceptEnv LANG LC_*
|
||||||
|
|
||||||
|
Subsystem sftp /usr/lib/openssh/sftp-server
|
||||||
|
|
||||||
|
# Set this to 'yes' to enable PAM authentication, account processing,
|
||||||
|
# and session processing. If this is enabled, PAM authentication will
|
||||||
|
# be allowed through the ChallengeResponseAuthentication and
|
||||||
|
# PasswordAuthentication. Depending on your PAM configuration,
|
||||||
|
# PAM authentication via ChallengeResponseAuthentication may bypass
|
||||||
|
# the setting of "PermitRootLogin without-password".
|
||||||
|
# If you just want the PAM account and session checks to run without
|
||||||
|
# PAM authentication, then enable this but set PasswordAuthentication
|
||||||
|
# and ChallengeResponseAuthentication to 'no'.
|
||||||
|
UsePAM no
|
||||||
|
UseDNS no
|
7
start.sh
7
start.sh
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
set -eu -o pipefail
|
set -eu -o pipefail
|
||||||
|
|
||||||
mkdir -p /run/gitea/tmp/uploads
|
mkdir -p /run/gitea/tmp/uploads /run/sshd
|
||||||
|
|
||||||
setup_ldap_source() {
|
setup_ldap_source() {
|
||||||
set -eu
|
set -eu
|
||||||
@@ -50,10 +50,7 @@ fi
|
|||||||
chmod 0600 /app/data/sshd/*_key
|
chmod 0600 /app/data/sshd/*_key
|
||||||
chmod 0644 /app/data/sshd/*.pub
|
chmod 0644 /app/data/sshd/*.pub
|
||||||
|
|
||||||
sed -e "s/^Port .*/Port ${SSH_PORT}/" \
|
sed -e "s/^Port .*/Port ${SSH_PORT}/" /etc/ssh/sshd_config > /run/gitea/sshd_config
|
||||||
-e "s/^#ListenAddress .*/ListenAddress 0.0.0.0/" \
|
|
||||||
-e "s,^HostKey /etc/ssh/,HostKey /app/data/sshd/," \
|
|
||||||
/etc/ssh/sshd_config > /run/gitea/sshd_config
|
|
||||||
|
|
||||||
cp /home/git/app.ini.template "/run/gitea/app.ini"
|
cp /home/git/app.ini.template "/run/gitea/app.ini"
|
||||||
|
|
||||||
|
62
test/test.js
62
test/test.js
@@ -31,6 +31,7 @@ describe('Application life cycle test', function () {
|
|||||||
this.timeout(0);
|
this.timeout(0);
|
||||||
var server, browser = new Builder().forBrowser('chrome').build();
|
var server, browser = new Builder().forBrowser('chrome').build();
|
||||||
var LOCATION = 'test';
|
var LOCATION = 'test';
|
||||||
|
var SSH_PORT = 29420;
|
||||||
var repodir = '/tmp/testrepo';
|
var repodir = '/tmp/testrepo';
|
||||||
var app, reponame = 'testrepo';
|
var app, reponame = 'testrepo';
|
||||||
var username = process.env.USERNAME;
|
var username = process.env.USERNAME;
|
||||||
@@ -210,7 +211,7 @@ return done();
|
|||||||
}).then(function () {
|
}).then(function () {
|
||||||
return browser.findElement(by.id('repo-clone-url')).getAttribute('value');
|
return browser.findElement(by.id('repo-clone-url')).getAttribute('value');
|
||||||
}).then(function (cloneUrl) {
|
}).then(function (cloneUrl) {
|
||||||
expect(cloneUrl).to.be('ssh://git@' + app.fqdn + ':29418/' + username + '/' + reponame + '.git');
|
expect(cloneUrl).to.be(`ssh://git@${app.fqdn}:${SSH_PORT}/${username}/${reponame}.git`);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -219,14 +220,14 @@ return done();
|
|||||||
rimraf.sync(repodir);
|
rimraf.sync(repodir);
|
||||||
var env = Object.create(process.env);
|
var env = Object.create(process.env);
|
||||||
env.GIT_SSH = __dirname + '/git_ssh_wrapper.sh';
|
env.GIT_SSH = __dirname + '/git_ssh_wrapper.sh';
|
||||||
execSync('git clone ssh://git@' + app.fqdn + ':29418/' + username + '/' + reponame + '.git ' + repodir, { env: env });
|
execSync(`git clone ssh://git@${app.fqdn}:${SSH_PORT}/${username}/${reponame}.git ${repodir}`, { env: env });
|
||||||
done();
|
done();
|
||||||
}
|
}
|
||||||
|
|
||||||
function pushFile(done) {
|
function pushFile(done) {
|
||||||
var env = Object.create(process.env);
|
var env = Object.create(process.env);
|
||||||
env.GIT_SSH = __dirname + '/git_ssh_wrapper.sh';
|
env.GIT_SSH = __dirname + '/git_ssh_wrapper.sh';
|
||||||
execSync('touch newfile && git add newfile && git commit -a -mx && git push ssh://git@' + app.fqdn + ':29418/' + username + '/' + reponame + ' master',
|
execSync(`touch newfile && git add newfile && git commit -a -mx && git push ssh://git@${app.fqdn}:${SSH_PORT}/${username}/${reponame} master`,
|
||||||
{ env: env, cwd: repodir });
|
{ env: env, cwd: repodir });
|
||||||
rimraf.sync('/tmp/testrepo');
|
rimraf.sync('/tmp/testrepo');
|
||||||
done();
|
done();
|
||||||
@@ -234,8 +235,8 @@ return done();
|
|||||||
|
|
||||||
function addCustomFile(done) {
|
function addCustomFile(done) {
|
||||||
fs.writeFileSync('/tmp/customfile.txt', 'GOGS TEST', 'utf8');
|
fs.writeFileSync('/tmp/customfile.txt', 'GOGS TEST', 'utf8');
|
||||||
execSync('cloudron exec -- mkdir -p /app/data/custom/public');
|
execSync(`cloudron exec --app ${app.id} -- mkdir -p /app/data/custom/public`);
|
||||||
execSync('cloudron push /tmp/customfile.txt /app/data/custom/public/customfile.txt');
|
execSync(`cloudron push --app ${app.id} /tmp/customfile.txt /app/data/custom/public/customfile.txt`);
|
||||||
fs.unlinkSync('/tmp/customfile.txt');
|
fs.unlinkSync('/tmp/customfile.txt');
|
||||||
done();
|
done();
|
||||||
}
|
}
|
||||||
@@ -254,7 +255,7 @@ return done();
|
|||||||
}
|
}
|
||||||
|
|
||||||
function sendMail(done) {
|
function sendMail(done) {
|
||||||
browser.get('https://' + app.fqdn + '/admin/config').then(function () {
|
browser.get(`https://${app.fqdn}/admin/config`).then(function () {
|
||||||
var button = browser.findElement(by.xpath('//button[@id="test-mail-btn"]'));
|
var button = browser.findElement(by.xpath('//button[@id="test-mail-btn"]'));
|
||||||
return browser.executeScript('arguments[0].scrollIntoView(true)', button);
|
return browser.executeScript('arguments[0].scrollIntoView(true)', button);
|
||||||
}).then(function () {
|
}).then(function () {
|
||||||
@@ -275,7 +276,7 @@ return done();
|
|||||||
it('can login', function (done) {
|
it('can login', function (done) {
|
||||||
var inspect = JSON.parse(execSync('cloudron inspect'));
|
var inspect = JSON.parse(execSync('cloudron inspect'));
|
||||||
|
|
||||||
superagent.post('https://' + inspect.apiEndpoint + '/api/v1/developer/login').send({
|
superagent.post(`https://${inspect.apiEndpoint}/api/v1/developer/login`).send({
|
||||||
username: username,
|
username: username,
|
||||||
password: password
|
password: password
|
||||||
}).end(function (error, result) {
|
}).end(function (error, result) {
|
||||||
@@ -284,7 +285,7 @@ return done();
|
|||||||
|
|
||||||
token = result.body.accessToken;
|
token = result.body.accessToken;
|
||||||
|
|
||||||
superagent.get('https://' + inspect.apiEndpoint + '/api/v1/profile')
|
superagent.get(`https://${inspect.apiEndpoint}/api/v1/profile`)
|
||||||
.query({ access_token: token }).end(function (error, result) {
|
.query({ access_token: token }).end(function (error, result) {
|
||||||
if (error) return done(error);
|
if (error) return done(error);
|
||||||
if (result.statusCode !== 200) return done(new Error('Get profile failed with status ' + result.statusCode));
|
if (result.statusCode !== 200) return done(new Error('Get profile failed with status ' + result.statusCode));
|
||||||
@@ -296,7 +297,7 @@ return done();
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('install app', function () {
|
it('install app', function () {
|
||||||
execSync('cloudron install --new --wait --location ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
execSync(`cloudron install --new --wait --location ${LOCATION} -p SSH_PORT=${SSH_PORT}`, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
||||||
});
|
});
|
||||||
|
|
||||||
it('can get app information', getAppInfo);
|
it('can get app information', getAppInfo);
|
||||||
@@ -351,12 +352,17 @@ return done();
|
|||||||
it('can clone the url', cloneRepo);
|
it('can clone the url', cloneRepo);
|
||||||
it('file exists in repo', function () { expect(fs.existsSync(repodir + '/newfile')).to.be(true); });
|
it('file exists in repo', function () { expect(fs.existsSync(repodir + '/newfile')).to.be(true); });
|
||||||
|
|
||||||
it('move to different location', function () {
|
it('move to different location', function (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"
|
||||||
execSync('cloudron configure --wait --location ' + LOCATION + '2 --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
// ensure we don't hit NXDOMAIN in the mean time
|
||||||
var inspect = JSON.parse(execSync('cloudron inspect'));
|
browser.get('about:blank').then(function () {
|
||||||
app = inspect.apps.filter(function (a) { return a.location === LOCATION + '2'; })[0];
|
execSync('cloudron configure --wait --location ' + LOCATION + '2 --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
||||||
expect(app).to.be.an('object');
|
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');
|
||||||
|
|
||||||
|
done();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('can login', login);
|
it('can login', login);
|
||||||
@@ -365,13 +371,17 @@ return done();
|
|||||||
it('can clone the url', cloneRepo);
|
it('can clone the url', cloneRepo);
|
||||||
it('file exists in repo', function () { expect(fs.existsSync(repodir + '/newfile')).to.be(true); });
|
it('file exists in repo', function () { expect(fs.existsSync(repodir + '/newfile')).to.be(true); });
|
||||||
|
|
||||||
it('uninstall app', function () {
|
it('uninstall app', function (done) {
|
||||||
execSync('cloudron uninstall --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
// ensure we don't hit NXDOMAIN in the mean time
|
||||||
|
browser.get('about:blank').then(function () {
|
||||||
|
execSync('cloudron uninstall --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
||||||
|
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, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
execSync(`cloudron install --new --wait --location ${LOCATION} -p SSH_PORT=${SSH_PORT}`, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
||||||
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];
|
||||||
@@ -379,14 +389,18 @@ return done();
|
|||||||
|
|
||||||
login(function (error) {
|
login(function (error) {
|
||||||
if (error) return done(error);
|
if (error) return done(error);
|
||||||
execSync('cloudron uninstall --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
|
||||||
done();
|
// ensure we don't hit NXDOMAIN in the mean time
|
||||||
|
browser.get('about:blank').then(function () {
|
||||||
|
execSync('cloudron uninstall --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
||||||
|
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, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
execSync(`cloudron install --new --wait --appstore-id ${app.manifest.id} --location ${LOCATION} -p SSH_PORT=${SSH_PORT}`, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
||||||
});
|
});
|
||||||
|
|
||||||
it('can get app information', getAppInfo);
|
it('can get app information', getAppInfo);
|
||||||
@@ -408,7 +422,11 @@ return done();
|
|||||||
it('can clone the url', cloneRepo);
|
it('can clone the url', cloneRepo);
|
||||||
it('file exists in cloned repo', fileExists);
|
it('file exists in cloned repo', fileExists);
|
||||||
|
|
||||||
it('uninstall app', function () {
|
it('uninstall app', function (done) {
|
||||||
execSync('cloudron uninstall --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
// ensure we don't hit NXDOMAIN in the mean time
|
||||||
|
browser.get('about:blank').then(function () {
|
||||||
|
execSync('cloudron uninstall --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
||||||
|
done();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user