Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

More about logging, Session.save basic test now pass !!!!

  • Loading branch information...
commit 1bcbbe09d4947a6f3c49829a47ad23e490e039c0 1 parent 43c0127
nka11 nka11 authored
6 conf/log4js.json
... ... @@ -1,6 +1,10 @@
1 1 { "appenders": [
2 2 {
3   - "type": "console"
  3 + "type": "logLevelFilter",
  4 + "level": "DEBUG",
  5 + "appender": {
  6 + "type": "console"
  7 + }
4 8 }
5 9 ],
6 10 "levels": {
2  node_modules/NoCR
... ... @@ -1 +1 @@
1   -Subproject commit df315d8e167d84ac82f47cd40ff2ef3bbbe24f52
  1 +Subproject commit bf297b81fc5b21bda40bb97a046c6583abc99fcc
26 src/Node.js
@@ -23,25 +23,26 @@ nodeproto = {
23 23 getProperty: function(name, callback) {
24 24 var self = this, errmsg;
25 25 if (name in self['properties']) {
26   - _.debug('[getProperty]: found in instances'); // memory cache L1
  26 + self.logger.debug('[getProperty]: found in instances'); // memory cache L1
27 27 if (typeof callback !== "undefined") {
28   - //_.debug(_.inspect(self['properties'][name]));
  28 + self.logger.trace(_.inspect(self['properties'][name]));
29 29 callback(null, self['properties'][name]);
30 30 } else {
31 31 return self['properties'][name];
32 32 }
33 33 } else if (name in self['node:properties']) {
34   - _.debug('[getProperty]: found in data');
  34 + self.logger.debug('[getProperty]: found in data');
35 35 self.session.getRepository().getDataById(self['node:properties'][name],function(err, propData) {
36 36 self['properties'][name] = new Property(propData, self.session);
37 37 if (typeof callback !== "undefined") {
  38 + self.logger.trace(_.inspect(self['properties'][name]));
38 39 callback(null, self['properties'][name]);
39 40 } else {
40 41 return self['properties'][name];
41 42 }
42 43 });
43 44 } else {
44   - _.debug('[getProperty]: not found');
  45 + self.logger.debug('[getProperty]: not found');
45 46 errmsg = "Property not found in node";
46 47 if (typeof callback !== "undefined") {
47 48 callback(errmsg);
@@ -54,8 +55,8 @@ nodeproto = {
54 55 * Can accept callback func or not, as operations are performed in-memory, there is no async
55 56 */
56 57 setProperty: function(name, value, type, callback) {
57   - //_.debug("[setProperty]: " + _.inspect(arguments));
58 58 var self = this, type,error, prop;
  59 + self.logger.trace("[setProperty]: " + _.inspect(arguments));
59 60 if (arguments.length === 0) {
60 61 throw new Error("at least name should be specified");
61 62 }
@@ -84,7 +85,7 @@ nodeproto = {
84 85 }
85 86 if (self.type.canSetProperty(name, value)) {
86 87 self.ismodified = true;
87   - //_.debug(_.inspect(self));
  88 + self.logger.trace(_.inspect(self));
88 89 if (name in self['node:properties'] || name in self['properties']) { //such property already exist ethier persisted or in session scope
89 90 self.getProperty(name, function(err, prop) {//gets the property instance and sets the value
90 91 if (err === null) {
@@ -114,16 +115,16 @@ nodeproto = {
114 115 }
115 116 }
116 117 } else { //deleting the property if null or no value specified
117   - _.debug("value is not specified or null, removing " + name + " property from registries");
  118 + self.logger.info("value is not specified or null, removing " + name + " property from registries");
118 119 //_.debug(_.inspect(self['node:properties']));
119 120 if (name in self['node:properties']) {
120   - _.debug("Property found in data, deleting");
  121 + self.logger.debug("Property found in data, deleting");
121 122 self['node:properties'][name] = undefined;
122 123 delete self['node:properties'][name];
123 124 self.ismodified = true;
124 125 }
125 126 if (name in self['properties']) {
126   - _.debug("Property found in instances, deleting");
  127 + self.logger.debug("Property found in instances, deleting");
127 128 self['properties'][name] = undefined;
128 129 delete self['properties'][name];
129 130 self.ismodified = true;
@@ -176,7 +177,7 @@ nodeproto = {
176 177 'path': parent.getPath() + childName + '/', // Implementation data, Index
177 178 'node:type': 'nt:unstructured' // implementation reference
178 179 }, self.session);
179   - //_.debug(_.inspect(node));
  180 + self.logger.trace(_.inspect(node));
180 181
181 182 // parent node by name index
182 183 parent['childrens'][childName] = node;
@@ -188,7 +189,7 @@ nodeproto = {
188 189 'property:type': 'NAME'
189 190 })
190 191 );
191   - //_.debug(_.inspect(node));
  192 + self.logger.trace(_.inspect(node));
192 193 } else {
193 194 throw new Error("Integrity problem, Operation addNode can't be performed");
194 195 }
@@ -240,7 +241,6 @@ nodeproto = {
240 241 function Node(data, session) {
241 242 var self = this,
242 243 workspace = session.getWorkspace();
243   - //_.debug("Initializing Node :" + _.inspect(data));
244 244 self['properties'] = {}; // data structure for properties instance (lazy load)
245 245 self['childrens'] = {}; //data structure for nodes instances (lazy load)
246 246 if (!'node:properties' in data || data['node:properties'] === undefined) {
@@ -252,6 +252,8 @@ function Node(data, session) {
252 252 self['node:properties'] = data['node:properties'];
253 253 self['node:childrens'] = data['node:childrens'];
254 254 Item.call(self, data, session);
  255 + self.logger.info("Initializing Node");
  256 + self.logger.trace(_.inspect(data));
255 257 if (data['node:properties:' + workspace.getName()] !== undefined) {
256 258 for (k in data['node:properties:' + workspace.getName()]) {
257 259 self['node:properties'][k] = data['node:properties:' + workspace.getName()][k];
1  src/Property.js
... ... @@ -1,5 +1,6 @@
1 1 var nocr = require("NoCR"),
2 2 _ = require('util'),
  3 + log4js = require('log4js')(),
3 4 wrapper = require('./wrapper.js'),
4 5 Item = require('./Item.js'),
5 6 Value = require('./Value.js'),
2  src/Repository.js
@@ -51,7 +51,7 @@ function Repository(config, callback) {
51 51 });
52 52 }
53 53 }
54   -
  54 + this.getItemsCollection = getItemsCollection;
55 55 this.login = function(credentials, workspaceName, callback) {
56 56 var
57 57 session = new Session(self,credentials, function(err,sess) {
9 src/Session.js
@@ -61,7 +61,8 @@ Session = function(repository, credentials, callback) {
61 61 if(err) {
62 62 callback(err, null);
63 63 } else if(user) {
64   - self.logger.debug("user found :" + _.inspect(users));
  64 + self.logger.debug("user found");
  65 + self.logger.trace(_.inspect(users));
65 66 if (user.password === credentials.password) {
66 67 self.user = {username:user.username, id: user.userid, workspace:user.workspace};
67 68 setUserContext();
@@ -86,9 +87,11 @@ Session = function(repository, credentials, callback) {
86 87 setAnonymous();
87 88 callback(null, self);
88 89 } else {
89   - self.logger.debug("credentials != null :" + _.inspect(credentials));
  90 + self.logger.debug("credentials != null :");
  91 + self.logger.trace(_.inspect(credentials));
90 92 if (credentials.username !== undefined || credentials.username !== null) {
91   - self.logger.debug("credentials provided :" + _.inspect(credentials));
  93 + self.logger.debug("credentials provided :");
  94 + self.logger.trace(_.inspect(credentials));
92 95 usersCollection.find({username: credentials.username}).limit(1).
93 96 toArray(checkUserAuth);
94 97 } else {
4 src/Value.js
... ... @@ -1,5 +1,7 @@
1 1 var nocr = require("NoCR"),
2 2 _ = require('util'),
  3 + log4js = require('log4js')(),
  4 + logger = log4js.getLogger("nocr-mongo.Value"),
3 5 wrapper = require('./wrapper.js'),
4 6 Value, valueproto;
5 7
@@ -54,7 +56,7 @@ function Value(data) {
54 56 function checkIntegrity(data) {
55 57 var guess = guessType(data['property:value']),
56 58 compatibility = require('./utils/itemslookup.js').valueCompatibility;
57   - _.debug("Checking types integrity : " + data['property:type'] + " vs " + guess);
  59 + logger.debug("Checking types integrity : " + data['property:type'] + " vs " + guess);
58 60 if (compatibility[guess].indexOf(data['property:type']) === -1 ) {
59 61 throw new Error("Incompatible type/value found");
60 62 }
268 src/Workspace.js
@@ -29,7 +29,8 @@ function Workspace(session, data, callback) {
29 29 data = {name: 'default'};
30 30 }
31 31 self.name = data.name;
32   - self.logger = log4js.getLogger("nocr-mongo.Workspace." + self.name);
  32 + self.id = data['_id'];
  33 + self.logger = log4js.getLogger("nocr-mongo.Workspace");
33 34 self.session = session;
34 35 callback(null, self);
35 36 for (k in wsproto) {
@@ -41,7 +42,7 @@ function Workspace(session, data, callback) {
41 42 function instanciateNode(err, nodeData) {
42 43 var node;
43 44 if (err !== null) {
44   - console.log(err);
  45 + self.logger.error(err);
45 46 callback(err);
46 47 }
47 48 nodeData.path = abspath;
@@ -57,7 +58,7 @@ function Workspace(session, data, callback) {
57 58 function instanciateProperty(err, propertyData) {
58 59 var property;
59 60 if (err !== null) {
60   - console.log(err);
  61 + self.logger.error(err);
61 62 callback(err);
62 63 }
63 64 propertyData.path = abspath;
@@ -73,7 +74,7 @@ function Workspace(session, data, callback) {
73 74 if (self.itemsIndex !== undefined) {
74 75 callback(null, self.itemsIndex);
75 76 } else {
76   - client.collection('workspace.' + self.name + '.itemsIndex', function(err, itemsIndex) {
  77 + client.collection('workspace.' + self.id + '.itemsIndex', function(err, itemsIndex) {
77 78 self.itemsIndex = itemsIndex;
78 79 self.itemsIndex.count(function(err, count) {
79 80 if (count === 0 ) {
@@ -90,13 +91,13 @@ function Workspace(session, data, callback) {
90 91 function indexRootNode(err, rootNodeData) {
91 92 var rootNode = new Node(rootNodeData, session);
92 93 self.logger.debug("Indexing rootNode");
93   - //_.log(_.inspect(rootNode));
  94 + self.logger.trace(_.inspect(rootNode));
94 95 itemsIndex.insert({
95 96 'item:id': rootNode.data._id.toString(),
96 97 'item:type': 'Node',
97 98 'item:path': "/"
98 99 }, {safe: true}, function(err, result) {
99   - console.log(result);
  100 + self.logger.trace(result);
100 101 if (err !== null) {
101 102 callback(err);
102 103 } else {
@@ -124,7 +125,7 @@ function Workspace(session, data, callback) {
124 125 },
125 126 getItem: function(abspath,callback) {
126 127 self.logger.debug("getting " + abspath);
127   - //self.logger.trace(_.inspect(this.data));
  128 + self.logger.trace(_.inspect(this.data));
128 129 if (abspath in this.data && this.data[abspath] !== undefined) {
129 130 callback(null, this.data[abspath]);
130 131 } else {
@@ -243,10 +244,15 @@ function Workspace(session, data, callback) {
243 244 });
244 245 });
245 246 };
  247 +
  248 + /**
  249 + * API method
  250 + */
246 251 session.getNodeByIdentifier = function(nodeId, callback) {
  252 + // TODO: use cache object
247 253 getItemsIndex(function(err, itemsIndex){
248 254 itemsIndex.find({'item:id': nodeId, 'item:type': 'Node'}).toArray(function(err, items){
249   - self.logger.debug("found item :" + _.inspect(items));
  255 + self.logger.trace("found item :" + _.inspect(items));
250 256 if (items.length === 1) {
251 257 repository.getDataById(nodeId, getInstanciateNode(items[0]['path'], callback));
252 258 } else if (items.length === 0) {
@@ -257,6 +263,252 @@ function Workspace(session, data, callback) {
257 263 });
258 264 });
259 265 };
  266 +
  267 + /**
  268 + * api method for saving content which remains to the session
  269 + */
  270 + session.save = function(callback) {
  271 + var
  272 + modifiedNodes = [],
  273 + newNodes = [];
  274 + if (callback === undefined) { // Default callback throws an exception
  275 + callback = function(err,res) {
  276 + if (err !== null) {
  277 + throw new Error(err);
  278 + }
  279 + };
  280 + }
  281 + for (path in session.items.data) {
  282 + if (session.items.data[path] instanceof nocr.Node && session.items.data[path].isnew) {
  283 + newNodes.push(session.items.data[path]);
  284 + } else if (session.items.data[path] instanceof nocr.Node && session.items.data[path].ismodified) {
  285 + modifiedNodes.push(session.items.data[path]);
  286 + }
  287 + }
  288 +
  289 +
  290 + function updateIndex(callback) {
  291 +
  292 + }
  293 + repository.getItemsCollection(function(err, itemsCollection) {
  294 + /**
  295 + * Insert in database new properties of node
  296 + */
  297 + function insertNodeProperties(node, callback) {
  298 + var propscount,
  299 + propsmap = {},
  300 + insertedprops = 0,
  301 + propdata = {}, k,
  302 + propkey;
  303 + self.logger.debug("start inserting node properties");
  304 + self.logger.trace(_.inspect(node));
  305 + Object.keys(node['properties']).forEach(function(index) { //iterate over each node property
  306 + var property = node['properties'][index];
  307 + if (property.isnew) {
  308 + propsmap[index] = node['properties'][index];
  309 + } //build a map of properties to insert
  310 + });
  311 + propscount = Object.keys(propsmap).length;
  312 + self.logger.debug(propscount + " Properties to insert");
  313 + if (propscount === 0) {
  314 + callback(null, node);
  315 + } else {
  316 + self.logger.trace(_.inspect(propsmap));
  317 + for (propkey in propsmap) { // iterate over each property
  318 + propdata = {};
  319 + for (k in propsmap[propkey].data) {
  320 + if (k !== 'path') {
  321 + propdata[k] = propsmap[propkey].data[k];
  322 + }
  323 + }
  324 + propdata['item:type'] = 'Property';
  325 + itemsCollection.insert(propdata,{safe:true},function(err, pdata){
  326 + if (err === null) {
  327 + callback(err);
  328 + } else {
  329 + propsmap[propkey].data['_id'] = pdata._id;
  330 + propsmap[propkey].isnew = false;
  331 + propsmap[propkey].isModified = false;
  332 + node['node:properties'][propkey] = pdata._id;
  333 + self.logger.debug('Inserting property - ' + (insertedprops++) + "/" + propscount);
  334 + if (insertedprops === propscount) {
  335 + callback(err, node);
  336 + }
  337 + }
  338 + });
  339 + }
  340 + }
  341 + }
  342 + function updateNodeProperties(node, callback) {
  343 + var propscount,
  344 + propsmap = {},
  345 + insertedprops = 0,
  346 + propdata = {}, k, propkey;
  347 + self.logger.debug("start updating node properties");
  348 + Object.keys(node['properties']).forEach(function(index) {
  349 + var property = node['properties'][index];
  350 + if (property.ismodified && !property.isnew) {
  351 + propsmap[index] = node['properties'][index];
  352 + }
  353 + });
  354 + propscount = Object.keys(propsmap).length;
  355 + self.logger.debug(propscount + " Properties to update");
  356 + if (propscount === 0) {
  357 + callback(null, node);
  358 + } else {
  359 + for (propkey in propsmap) {
  360 + for (k in propsmap[propkey].data) {
  361 + if (k !== 'path') {
  362 + propdata[k] = propsmap[propkey].data[k];
  363 + }
  364 + }
  365 + propdata['item:type'] = 'Property';
  366 + itemsCollection.update({"_id":propdata['_id']}, propdata,{safe:true},function(err, pdata){
  367 + propsmap[propkey].data['_id'] = pdata._id;
  368 + propsmap[propkey].isnew = false;
  369 + propsmap[propkey].isModified = false;
  370 + node['node:properties'][propkey] = pdata._id;
  371 + if (++insertedprops === propscount) {
  372 + callback(err, node);
  373 + }
  374 + });
  375 + }
  376 + }
  377 + }
  378 + /**
  379 + *
  380 + */
  381 + function insertNodes(callback) {
  382 + var insertedNodesCount = 0, node, propertyName, properties = [];
  383 + function insertNode(node, callback) { // insert a Node and its properties
  384 + insertNodeProperties(node, function(err, node) {
  385 + if (err === null) {
  386 + callback(err);
  387 + } else {
  388 + var nodeData = {}, k;
  389 + for (k in node.data) {
  390 + if (k !== 'path') {
  391 + nodeData[k] = node.data[k];
  392 + }
  393 + }
  394 + nodeData['node:properties:' + self.getName()] = node['node:properties'];
  395 + nodeData['item:type'] = 'Node';
  396 + itemsCollection.insert(nodeData,{safe:true},function(err, ndata){
  397 + self.logger.debug("Inserting node : " + node.path);
  398 + node['data']['_id'] = ndata._id;
  399 + node.isnew = false;
  400 + node.isModified = false;
  401 + callback(err,node);
  402 + });
  403 + }
  404 + });
  405 + }
  406 + if (newNodes.length === 0) {
  407 + self.logger.debug("No nodes to insert");
  408 + callback(null, {'message': "No nodes to insert",
  409 + "createdNodes": 0});
  410 + } else {
  411 + newNodes.forEach(function(node, nk) {
  412 + self.logger.debug("start inserting node " + nk);
  413 + insertNode(node, function(err, node) {
  414 + self.logger.trace(_.inspect(err));
  415 + self.logger.debug("insertedNodesCount " + (++insertedNodesCount) + "/" + newNodes.length);
  416 + if (insertedNodesCount === newNodes.length) {
  417 + callback(err, {'message': "Nodes inserted",
  418 + "createdNodes": newNodes.length});
  419 + }
  420 + });
  421 + });
  422 + }
  423 +
  424 + } // ------------------------------ /function InsertNodes
  425 + function updateNodes(callback) {
  426 + var updatedNodescount = 0, node, propertyName, properties = [];
  427 + function updateNode(node, callback) { // insert a Node and its properties
  428 + insertNodeProperties(node, function(err, node) {
  429 + if (err !== null) {
  430 + self.logger.error("Error inserting properties");
  431 + self.logger.error(_.inspect(err));
  432 + callback(err);
  433 + } else {
  434 + updateNodeProperties(node, function(err, node) {
  435 + if (err !== null) {
  436 + callback(err);
  437 + } else {
  438 + var nodeData = {}, k;
  439 + for (k in node.data) {
  440 + if (k !== 'path') {
  441 + nodeData[k] = node.data[k];
  442 + }
  443 + }
  444 + nodeData['node:properties:' + self.getName()] = node['node:properties'];
  445 + nodeData['item:type'] = 'Node';
  446 + self.logger.debug("Data prepared for Node update");
  447 + self.logger.trace(_.inspect(nodeData));
  448 + self.logger.trace(_.inspect(node));
  449 + itemsCollection.update({"_id": nodeData['_id']},nodeData,{safe:true},function(err, ndata){
  450 + self.logger.debug("Node data updated");
  451 + self.logger.trace(_.inspect(ndata));
  452 + if (err !== null) {
  453 + callback(err);
  454 + } else {
  455 + node['data']['_id'] = ndata._id;
  456 + node.isnew = false;
  457 + node.isModified = false;
  458 + callback(err, node);
  459 + }
  460 + });
  461 + }
  462 + });
  463 + }
  464 + });
  465 + } // ------------------------------ /function updateNode
  466 + self.logger.debug(modifiedNodes.length + " Nodes to update");
  467 + if (modifiedNodes.length === 0) {
  468 + callback(null,{'message': "No nodes to update",
  469 + "updatedNodes": 0});
  470 + } else {
  471 + modifiedNodes.forEach(function(node) {
  472 + self.logger.debug("Updating " + node.getPath());
  473 + updateNode(node, function(err, node) {
  474 + if (err !== null) {
  475 + callback(err);
  476 + } else {
  477 + self.logger.debug('Updated node - ' + (++updatedNodescount) + "/" + modifiedNodes.length);
  478 + if (updatedNodescount === modifiedNodes.length) {
  479 + callback(err, {'message': "Nodes updated",
  480 + "updatedNodes": updatedNodescount});
  481 + }
  482 + }
  483 + });
  484 + });
  485 + }
  486 + } //------------------------------ /function updateNodes
  487 +
  488 + // process Node
  489 + insertNodes(function(err, insertRes) {
  490 + if (err === null) {
  491 + updateNodes(function(err, updateRes) {
  492 + if (err === null) {
  493 + var result = {
  494 + 'message': "Session.save() - operation successed",
  495 + 'createdNodes': insertRes['createdNodes'],
  496 + "updatedNodes": updateRes['updatedNodes']
  497 + };
  498 + self.logger.debug(_.inspect(result));
  499 + callback(null, result);
  500 + } else {
  501 + callback(err);
  502 + }
  503 + });
  504 + } else {
  505 + callback(err);
  506 + }
  507 + });
  508 + });
  509 +
  510 + };
  511 +
260 512 initWorkspace();
261 513 }
262 514
4 src/types/NodeType.js
... ... @@ -1,6 +1,7 @@
1 1
2 2 var NodeType, ntproto,
3 3 nocr = require("NoCR"),
  4 + log4js = require('log4js')(),
4 5 nodeTypeManager = require('./nodeTypeManager.js'),
5 6 NodeTypeDefinition = require('./NodeTypeDefinition.js'),
6 7 assert = require('assert'),
@@ -9,6 +10,7 @@ var NodeType, ntproto,
9 10 ntproto = {
10 11 constructor: function(data) {
11 12 this.assertMandatory(data);
  13 + this.logger = log4js.getLogger("nocr-mongo.NodeType." + data['jcr:nodeTypeName']);
12 14 if (!('jcr:childNodeDefinition' in data)) {
13 15 data['jcr:childNodeDefinition'] = [];
14 16 }
@@ -77,7 +79,7 @@ ntproto = {
77 79 }
78 80 }
79 81 }
80   - //_.log(_.inspect(typedata));
  82 + this.logger.trace(_.inspect(typedata));
81 83 type = new NodeType(typedata);
82 84 type['data']['jcr:supertypes'].push(this['data']['jcr:nodeTypeName']);
83 85 type._super_ = this;
6 src/types/nodeTypeManager.js
... ... @@ -1,6 +1,8 @@
1 1 //persist this (3.7.14)
2 2 var typesMap = {},
3 3 _ = require('util'),
  4 + log4js = require('log4js')(),
  5 + logger = log4js.getLogger("nocr-mongo.nodeTypeManager"),
4 6 //nodeTypeManager = function(){
5 7 // console.log("Creating node type manager");
6 8 //};
@@ -48,7 +50,7 @@ nodeTypeManager = {
48 50 typesMap[type.data['jcr:nodeTypeName']]['typedef'] = type;
49 51 typesMap[type.data['jcr:nodeTypeName']]['allowupdate'] = allowupdate;
50 52 } else {
51   - _.error(_.inspect(type));
  53 + logger.error(_.inspect(type));
52 54 throw new Error('Update is not allowed');
53 55 }
54 56 } else {
@@ -57,7 +59,7 @@ nodeTypeManager = {
57 59 'typedef': type
58 60 };
59 61 }
60   - _.log("Registered node type [" + type.data['jcr:nodeTypeName'] + "]" );
  62 + logger.info("Registered node type [" + type.data['jcr:nodeTypeName'] + "]" );
61 63 },
62 64 registerNodeTypes: function registerNodeTypes(types, allowupdate, callback) {
63 65
10 test/testSuite.js
... ... @@ -1,13 +1,13 @@
1   -var Repository = require('../src/Repository.js'),
  1 +var
  2 + log4js = require('log4js')().configure('./conf/log4js.json'),
  3 + Repository = require('../src/Repository.js'),
2 4 nocr = require("NoCR"),
3 5 vows = require('vows'),
4   - log4js = require('log4js')(),
5 6 assert = require('assert'),
6 7 testSuite, testrepository,
7 8 _ = require('util')
8 9 // This is the coffee test compiled in js
9 10 ,nocrTests = nocr.test.ImplTest;
10   -log4js.configure('./conf/log4js.json');
11 11 testSuite = vows.describe('KaraCos Nu-Q test Suite');
12 12 testSuite.addBatch({
13 13 "Clearing Database": {
@@ -61,9 +61,7 @@ testSuite.addBatch({
61 61 topic: function(){
62 62 nocrTests.getRepository().login({username: 'admin', password:'notdemo'}, "testWorkSpace",this.callback);
63 63 },
64   - 'Test result error' : function(err,session){
65   - _.debug(_.inspect(err));
66   - _.debug(typeof err);
  64 + 'Test result error' : function(err,session) {
67 65 assert.ok(typeof err === 'string','Error must be a String');
68 66 assert.ok((session === null || session === undefined),'Session is not null');
69 67 }}}});

0 comments on commit 1bcbbe0

Please sign in to comment.
Something went wrong with that request. Please try again.