Skip to content

Commit

Permalink
fixed wrong mode in relation test
Browse files Browse the repository at this point in the history
  • Loading branch information
dominicrico committed Mar 17, 2016
1 parent c00720e commit 741154e
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lib/relation/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ module.exports = function(callback) {
});
},
function(err) {
dbConv.log.info('Relation process successfully completed.');
if (!err) {
dbConv.log.info('Relation process successfully completed.');
} else {
dbConv.log.error(err);
}
return callback(err);
});
};
2 changes: 2 additions & 0 deletions test/helpers/config-local.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@

"mapping": "/test/helpers/mapping.js",

"relation": "/test/helpers/relation.js",

"toHost": "mongodb://localhost:27017/test"
}
2 changes: 2 additions & 0 deletions test/helpers/config-mongo.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,7 @@

"mapping": "/test/helpers/mapping.js",

"relation": "/test/helpers/relation.js",

"toHost": "mongodb://dbConvert:dbConvert123@176.9.114.232:27017/test"
}
2 changes: 2 additions & 0 deletions test/helpers/config-mysql.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,7 @@

"mapping": "/test/helpers/mapping.js",

"relation": "/test/helpers/relation.js",

"toHost": "mysql://dbConvert:dbConvert123@176.9.114.232:3306/test"
}
4 changes: 4 additions & 0 deletions test/helpers/relation.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = [{
table: 'mongoTable2:mongoTable1',
fields: ['parent:id']
}];
2 changes: 1 addition & 1 deletion test/relate.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ describe('DBConvert', function() {
this.timeout(500);
dbConv = new dbConvert.DBconvert();
setTimeout(function() {
config._ = ['rel'];
configMysql._ = ['rel'];
done();
}, 400);
});
Expand Down

0 comments on commit 741154e

Please sign in to comment.