1
0
mirror of https://git.cloudron.io/cloudron/gitea-app synced 2025-09-01 23:35:06 +00:00

use git instead of cloudron as user

This commit is contained in:
girish@cloudron.io
2016-02-21 18:52:08 -08:00
parent d69fc238bb
commit 8c5e97b351
5 changed files with 28 additions and 23 deletions

View File

@@ -115,7 +115,7 @@ describe('Application life cycle test', function () {
browser.get('https://' + app.fqdn + '/' + username + '/' + reponame);
browser.findElement(by.id('repo-clone-ssh')).click();
browser.findElement(by.id('repo-clone-url')).getAttribute('value').then(function (cloneUrl) {
expect(cloneUrl).to.be('ssh://cloudron@' + app.fqdn + ':29418/' + username + '/' + reponame + '.git');
expect(cloneUrl).to.be('ssh://git@' + app.fqdn + ':29418/' + username + '/' + reponame + '.git');
done();
});
});
@@ -123,14 +123,14 @@ describe('Application life cycle test', function () {
it('can clone the url', function (done) {
var env = Object.create(process.env);
env.GIT_SSH = __dirname + '/git_ssh_wrapper.sh';
execSync('git clone ssh://cloudron@' + app.fqdn + ':29418/' + username + '/' + reponame + '.git ' + repodir, { env: env });
execSync('git clone ssh://git@' + app.fqdn + ':29418/' + username + '/' + reponame + '.git ' + repodir, { env: env });
done();
});
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://cloudron@' + app.fqdn + ':29418/' + username + '/' + reponame + ' master',
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();
@@ -144,7 +144,7 @@ describe('Application life cycle test', function () {
it('can clone the url', function (done) {
var env = Object.create(process.env);
env.GIT_SSH = __dirname + '/git_ssh_wrapper.sh';
execSync('git clone ssh://cloudron@' + app.fqdn + ':29418/' + username + '/' + reponame + '.git ' + repodir, { env: env });
execSync('git clone ssh://git@' + app.fqdn + ':29418/' + username + '/' + reponame + '.git ' + repodir, { env: env });
expect(fs.existsSync(repodir + '/newfile')).to.be(true);
rimraf.sync(repodir);
done();
@@ -161,7 +161,7 @@ describe('Application life cycle test', function () {
it('can clone the url', function (done) {
var env = Object.create(process.env);
env.GIT_SSH = __dirname + '/git_ssh_wrapper.sh';
execSync('git clone ssh://cloudron@' + app.fqdn + ':29418/' + username + '/' + reponame + '.git ' + repodir, { env: env });
execSync('git clone ssh://git@' + app.fqdn + ':29418/' + username + '/' + reponame + '.git ' + repodir, { env: env });
expect(fs.existsSync(repodir + '/newfile')).to.be(true);
rimraf.sync(repodir);
done();
@@ -187,7 +187,7 @@ describe('Application life cycle test', function () {
browser.get('https://' + app.fqdn + '/' + username + '/' + reponame);
browser.findElement(by.id('repo-clone-ssh')).click();
browser.findElement(by.id('repo-clone-url')).getAttribute('value').then(function (cloneUrl) {
expect(cloneUrl).to.be('ssh://cloudron@' + app.fqdn + ':29418/' + username + '/' + reponame + '.git');
expect(cloneUrl).to.be('ssh://git@' + app.fqdn + ':29418/' + username + '/' + reponame + '.git');
done();
});
});
@@ -195,7 +195,7 @@ describe('Application life cycle test', function () {
it('can clone the url', function (done) {
var env = Object.create(process.env);
env.GIT_SSH = __dirname + '/git_ssh_wrapper.sh';
execSync('git clone ssh://cloudron@' + app.fqdn + ':29418/' + username + '/' + reponame + '.git ' + repodir, { env: env });
execSync('git clone ssh://git@' + app.fqdn + ':29418/' + username + '/' + reponame + '.git ' + repodir, { env: env });
expect(fs.existsSync(repodir + '/newfile')).to.be(true);
rimraf.sync(repodir);
done();