var BATCH_API_ENDPOINT = 'http://127.0.0.1:8080/api/v1/sql/job';

module.exports = {
    db: {
        host: 'localhost',
        port: 5432,
        dbname: 'analysis_api_test_db',
        user: 'postgres',
        pass: ''
    },
    batch: {
        endpoint: BATCH_API_ENDPOINT,
        username: 'localhost',
        apiKey: 1234
    }
};

@@ -1,8 +1,23 @@
+'use strict';%0A%0A
 var BATC
@@ -78,37 +78,240 @@
 ';%0A%0A
-module.exports = %7B%0A    db: %7B%0A
+function create (override) %7B%0A    override = override %7C%7C %7B%0A        db: %7B%7D,%0A        batch: %7B%7D%0A    %7D;%0A    override.db = override.db %7C%7C %7B%7D;%0A    override.batch = override.batch %7C%7C %7B%7D;%0A    return %7B%0A        db: defaults(override.db, %7B%0A    
     
@@ -341,16 +341,20 @@
         
+   
+ 
 port: 54
@@ -357,16 +357,20 @@
 : 5432,%0A
+    
         
@@ -401,16 +401,20 @@
 st_db',%0A
+    
         
@@ -439,16 +439,20 @@
         
+    
 pass: ''
@@ -456,15 +456,24 @@
  ''%0A
+    
     %7D
+)
 ,%0A
+    
     
@@ -479,26 +479,54 @@
  batch: 
-%7B%0A
+defaults(override.batch, %7B%0A   
         
 endpoint
@@ -517,16 +517,17 @@
         
+ 
 endpoint
@@ -552,24 +552,28 @@
 NT,%0A        
+    
 username: 'l
@@ -575,32 +575,36 @@
 e: 'localhost',%0A
+    
         apiKey: 
@@ -616,9 +616,268 @@
     
-%7D%0A%7D
+    %7D)%0A    %7D;%0A%7D%0A%0Afunction defaults (obj, def) %7B%0A    Object.keys(def).forEach(function(key) %7B%0A        if (!obj.hasOwnProperty(key)) %7B%0A            obj%5Bkey%5D = def%5Bkey%5D;%0A        %7D%0A    %7D);%0A%0A    return obj;%0A%7D%0A%0Amodule.exports = create();%0A%0Amodule.exports.create = create
 ;%0A

Allow to create test config with overrided options