Kaynağa Gözat

Add simple update test

Girish Ramakrishnan 8 yıl önce
ebeveyn
işleme
a156239317
1 değiştirilmiş dosya ile 17 ekleme ve 0 silme
  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' });
+    });
 });