浏览代码

test restart

Girish Ramakrishnan 9 年之前
父节点
当前提交
8d7d65cce4
共有 1 个文件被更改,包括 14 次插入0 次删除
  1. 14 0
      test/test.js

+ 14 - 0
test/test.js

@@ -135,6 +135,20 @@ describe('Application life cycle test', function () {
         done();
         done();
     });
     });
 
 
+    it('can restart app', function (done) {
+        execSync('cloudron restart');
+        done();
+    });
+
+    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 });
+        expect(fs.existsSync(repodir + '/newfile')).to.be(true);
+        rimraf.sync(repodir);
+        done();
+    });
+
     it('backup app', function () {
     it('backup app', function () {
         execSync('cloudron backup --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
         execSync('cloudron backup --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
     });
     });