Эх сурвалжийг харах

Make sure we don't hit nxdomain during tests

Johannes Zellner 6 жил өмнө
parent
commit
d5c12e7997
1 өөрчлөгдсөн 18 нэмэгдсэн , 6 устгасан
  1. 18 6
      test/test.js

+ 18 - 6
test/test.js

@@ -196,8 +196,12 @@ describe('Application life cycle test SSO', function () {
 
     it('user story is still present', userStoryExists);
 
-    it('move to different location', function () {
-        execSync('cloudron configure --wait --location ' + LOCATION + '2 --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
+    it('move to different location', function (done) {
+        // ensure we don't hit NXDOMAIN in the mean time
+        browser.get('about:blank').then(function () {
+            execSync('cloudron configure --wait --location ' + LOCATION + '2 --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
+            done();
+        });
     });
 
     it('can get app information', getAppInfo);
@@ -209,8 +213,12 @@ describe('Application life cycle test SSO', function () {
 
     it('can delete project', deleteProject);
 
-    it('uninstall app', function () {
-        execSync('cloudron uninstall --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
+    it('uninstall app', function (done) {
+        // ensure we don't hit NXDOMAIN in the mean time
+        browser.get('about:blank').then(function () {
+            execSync('cloudron uninstall --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
+            done();
+        });
     });
 
     // test update
@@ -230,7 +238,11 @@ describe('Application life cycle test SSO', function () {
     });
     it('can admin login', adminLogin);
     it('user story exists', userStoryExists);
-    it('uninstall app', function () {
-        execSync('cloudron uninstall --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
+    it('uninstall app', function (done) {
+        // ensure we don't hit NXDOMAIN in the mean time
+        browser.get('about:blank').then(function () {
+            execSync('cloudron uninstall --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
+            done();
+        });
     });
 });