소스 검색

Add simple update test

Girish Ramakrishnan 8 년 전
부모
커밋
a156239317
1개의 변경된 파일17개의 추가작업 그리고 0개의 파일을 삭제
  1. 17 0
      test/test.js

+ 17 - 0
test/test.js

@@ -225,4 +225,21 @@ describe('Application life cycle test', function () {
     it('uninstall app', function () {
         execSync('cloudron uninstall --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
     });
+
+    // test update
+    it('can install app', function () {
+        execSync('cloudron install --new --wait --appstore-id org.nodebb.cloudronapp --location ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
+        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 login', login);
+    it('check mail plugin', checkMailPlugin);
+    it('can update', function () {
+        execSync('cloudron install --wait --app ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
+    });
+    it('check mail plugin', checkMailPlugin);
+    it('uninstall app', function () {
+        execSync('cloudron uninstall --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
+    });
 });