Browse Source

Caching ldap auth and fixed tests

Dennis Schwerdel 8 years ago
parent
commit
b5aadcde74
4 changed files with 21 additions and 29 deletions
  1. 1 23
      CHANGELOG
  2. 1 1
      CloudronManifest.json
  3. 3 0
      nginx.conf
  4. 16 5
      test/test.js

+ 1 - 23
CHANGELOG

@@ -2,26 +2,4 @@
 * Initial version
 
 [0.1.1]
-* Added screenshots
-
-[0.2.0]
-* Updated to 2017-01-25T03-14-52Z
-
-[0.2.1]
-* Updated to 2017-02-16T01-47-30Z
-* This version fixes the settings bug
-
-[0.2.2]
-* New base image 0.10.0
-
-[0.2.3]
-* Updated to 2017-03-16T21-50-32Z
-
-[0.2.4]
-* Updated to 2017-04-25T01-27-49Z
-
-[0.2.5]
-* Updated to 2017-04-29T00-40-27Z
-
-[0.2.6]
-* Updated to 2017-05-05T01-14-51Z
+* Huge speedup by caching ldap

+ 1 - 1
CloudronManifest.json

@@ -5,7 +5,7 @@
   "description": "file://DESCRIPTION.md",
   "changelog": "file://CHANGELOG",
   "tagline": "Decentralized file synchronization",
-  "version": "0.1.0",
+  "version": "0.1.1",
   "healthCheckPath": "/check",
   "httpPort": 8000,
   "addons": {

+ 3 - 0
nginx.conf

@@ -28,6 +28,9 @@ http {
     proxy_buffering off;
     proxy_cache_path /tmp/proxy_cache levels=1:2 keys_zone=my_cache:10m max_size=100m inactive=60m use_temp_path=off;
     proxy_cache my_cache;
+    auth_ldap_cache_enabled on;
+    auth_ldap_cache_expiration_time 300000;
+    auth_ldap_cache_size 100;
 
     server {
         error_log /dev/stderr warn;

+ 16 - 5
test/test.js

@@ -63,10 +63,20 @@ describe('Application life cycle test', function () {
         });
     }
 
+    function loadPageWait(callback) {
+        browser.manage().deleteAllCookies();
+        setTimeout(function() {
+            browser.get('https://' + username + ':' + password + '@' + app.fqdn);
+            pageLoaded(function() {
+                callback();
+            });
+        }, 60000); //Timeout since, reconfigure lacks health-check
+    }
+
     function loadPage(callback) {
         browser.manage().deleteAllCookies();
         browser.get('https://' + username + ':' + password + '@' + app.fqdn);
-	pageLoaded(function() {
+        pageLoaded(function() {
             callback();
         });
     }
@@ -94,16 +104,17 @@ describe('Application life cycle test', function () {
     }
 
     function removeFolder(callback) {
+        browser.get('https://' + username + ':' + password + '@' + app.fqdn);
         pageLoaded(function() {
             browser.findElement(by.css('#folders button')).click();
             setTimeout(function() {
                 browser.findElement(by.css('#folder-0 button[ng-click*=editFolder]')).click();
                 setTimeout(function() {
                     browser.findElement(by.css('[ng-click*=deleteFolder]')).click().then(function() {
-                        setTimeout(callback, 500); //This needs to run for some time
+                        setTimeout(callback, 1000); //This needs to run for some time
                     });
-                }, 500); //No way to check for visibility of angular-js components
-            }, 500); //No way to check for visibility of angular-js components
+                }, 1000); //No way to check for visibility of angular-js components
+            }, 1000); //No way to check for visibility of angular-js components
         });
     }
 
@@ -147,7 +158,7 @@ describe('Application life cycle test', function () {
         expect(app).to.be.an('object');
     });
 
-    it('can load page', loadPage);
+    it('can load page', loadPageWait);
     it('can add folder', addFolder);
     it('can remove folder', removeFolder);