Merge branch 'update_to_1.1.3' into 'master'

Update to 1.1.3

See merge request !3
This commit is contained in:
dswd 2017-08-09 04:57:48 +00:00
commit b8b3abfbfc
5 changed files with 64 additions and 28 deletions

View file

@ -9,3 +9,7 @@
[0.1.3] [0.1.3]
* Updated to version 1.1.2 * Updated to version 1.1.2
[1.0.0]
* Update to version 1.1.3

View file

@ -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": "0.1.3", "version": "1.0.0",
"healthCheckPath": "/healthcheck", "healthCheckPath": "/healthcheck",
"httpPort": 3000, "httpPort": 3000,
"addons": { "addons": {

View file

@ -1,6 +1,6 @@
Gitea is a painless self-hosted Git service. It is similar to GitHub, Bitbucket or Gitlab. The initial development have been done on Gogs but we have forked it and named it Gitea. If you want to read more about the reasons why we have done that please read [this](https://blog.gitea.io/2016/12/welcome-to-gitea/) blog post. Gitea is a painless self-hosted Git service. It is similar to GitHub, Bitbucket or Gitlab. The initial development have been done on Gogs but we have forked it and named it Gitea. If you want to read more about the reasons why we have done that please read [this](https://blog.gitea.io/2016/12/welcome-to-gitea/) blog post.
This app packages Gitea <upstream>1.1.2</upstream> This app packages Gitea <upstream>1.1.3</upstream>
### Purpose ### Purpose

View file

@ -1,6 +1,6 @@
FROM cloudron/base:0.10.0 FROM cloudron/base:0.10.0
ENV VERSION 1.1.2 ENV VERSION 1.1.3
RUN apt-get update && \ RUN apt-get update && \
apt-get install -y openssh-server && \ apt-get install -y openssh-server && \

View file

@ -63,6 +63,14 @@ describe('Application life cycle test', function () {
}, TIMEOUT).then(function () { done(); }); }, TIMEOUT).then(function () { done(); });
} }
function getAppInfo() {
var inspect = JSON.parse(execSync('cloudron inspect'));
app = inspect.apps.filter(function (a) { return a.location === LOCATION; })[0];
expect(app).to.be.an('object');
}
function setAvatar(done) { function setAvatar(done) {
browser.get('https://' + app.fqdn + '/user/settings/avatar').then(function () { browser.get('https://' + app.fqdn + '/user/settings/avatar').then(function () {
return browser.findElement(by.xpath('//input[@type="file" and @name="avatar"]')).sendKeys(path.resolve(__dirname, '../logo.png')); return browser.findElement(by.xpath('//input[@type="file" and @name="avatar"]')).sendKeys(path.resolve(__dirname, '../logo.png'));
@ -160,7 +168,7 @@ describe('Application life cycle test', function () {
}); });
} }
function checkGitClone(done) { function cloneRepo(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';
@ -168,6 +176,19 @@ describe('Application life cycle test', function () {
done(); done();
} }
function pushFile(done) {
var env = Object.create(process.env);
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',
{ env: env, cwd: repodir });
rimraf.sync('/tmp/testrepo');
done();
}
function fileExists() {
expect(fs.existsSync(repodir + '/newfile')).to.be(true);
}
xit('build app', function () { xit('build app', function () {
execSync('cloudron build', { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' }); execSync('cloudron build', { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
}); });
@ -199,14 +220,7 @@ describe('Application life cycle test', function () {
execSync('cloudron install --new --wait --location ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' }); execSync('cloudron install --new --wait --location ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
}); });
it('can get app information', function () { it('can get app information', getAppInfo);
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 the main page', function (done) { it('can get the main page', function (done) {
superagent.get('https://' + app.fqdn).end(function (error, result) { superagent.get('https://' + app.fqdn).end(function (error, result) {
expect(error).to.be(null); expect(error).to.be(null);
@ -226,27 +240,19 @@ describe('Application life cycle test', function () {
it('displays correct clone url', checkCloneUrl); it('displays correct clone url', checkCloneUrl);
it('can clone the url', checkGitClone); it('can clone the url', cloneRepo);
it('can add and push a file', function (done) {
var env = Object.create(process.env);
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',
{ env: env, cwd: repodir });
rimraf.sync('/tmp/testrepo');
done();
});
it('can add and push a file', pushFile);
it('can edit file', editFile); it('can edit file', editFile);
it('can restart app', function (done) { it('can restart app', function (done) {
execSync('cloudron restart'); execSync('cloudron restart --wait');
done(); done();
}); });
it('can clone the url', checkCloneUrl); it('can clone the url', checkCloneUrl);
it('can clone the url', checkGitClone); 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', fileExists);
it('backup app', function () { it('backup app', function () {
execSync('cloudron backup create --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' }); execSync('cloudron backup create --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
@ -257,12 +263,12 @@ describe('Application life cycle test', function () {
}); });
it('can get avatar', checkAvatar); it('can get avatar', checkAvatar);
it('can clone the url', checkGitClone); 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 () {
browser.manage().deleteAllCookies(); browser.manage().deleteAllCookies();
execSync('cloudron configure --location ' + LOCATION + '2', { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' }); execSync('cloudron configure --wait --location ' + LOCATION + '2', { 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 + '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');
@ -271,7 +277,7 @@ describe('Application life cycle test', function () {
it('can login', login); it('can login', login);
it('can get avatar', checkAvatar); it('can get avatar', checkAvatar);
it('displays correct clone url', checkCloneUrl); it('displays correct clone url', checkCloneUrl);
it('can clone the url', checkGitClone); 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 () {
@ -292,4 +298,30 @@ describe('Application life cycle test', function () {
done(); done();
}); });
}); });
// test update
it('can install app', function () {
execSync('cloudron install --new --wait --appstore-id ' + app.manifest.id + ' --location ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
});
it('can get app information', getAppInfo);
it('can login', login);
it('can set avatar', setAvatar);
it('can get avatar', checkAvatar);
it('can add public key', addPublicKey);
it('can create repo', createRepo);
it('can clone the url', cloneRepo);
it('can add and push a file', pushFile);
it('can update', function () {
execSync('cloudron install --wait --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
});
it('can get avatar', checkAvatar);
it('can clone the url', cloneRepo);
it('file exists in cloned repo', fileExists);
it('uninstall app', function () {
execSync('cloudron uninstall --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
});
}); });