Fix conditional loading of firebird test for travis-ci
This commit is contained in:
parent
d554372912
commit
7ef2385da9
@ -14,17 +14,11 @@ try {
|
||||
var Firebird = require(adapterName);
|
||||
var conn = null;
|
||||
var qb = null;
|
||||
} catch (e) {
|
||||
// Export an empty testBase.testsuite if module not loaded
|
||||
console.log(e);
|
||||
console.log("Database adapter firebird not found");
|
||||
module.exports = {};
|
||||
}
|
||||
|
||||
// Setup testbase from the inside out
|
||||
// Because the connection is async, utilize
|
||||
// the setUp function from nodeunit to get the connection
|
||||
testBase.tests.setUp = function(cb) {
|
||||
// Setup testbase from the inside out
|
||||
// Because the connection is async, utilize
|
||||
// the setUp function from nodeunit to get the connection
|
||||
testBase.tests.setUp = function(cb) {
|
||||
if ( ! conn)
|
||||
{
|
||||
// Connect to the database
|
||||
@ -57,10 +51,10 @@ testBase.tests.setUp = function(cb) {
|
||||
{
|
||||
cb();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
//delete testBase.tests['DB update tests'];
|
||||
testBase.tests['DB update tests']['Test Insert Batch'] = function(test) {
|
||||
//delete testBase.tests['DB update tests'];
|
||||
testBase.tests['DB update tests']['Test Insert Batch'] = function(test) {
|
||||
test.expect(1);
|
||||
|
||||
test.throws(function() {
|
||||
@ -68,9 +62,9 @@ testBase.tests['DB update tests']['Test Insert Batch'] = function(test) {
|
||||
}, Error, "Insert Batch not implemented for firebird");
|
||||
|
||||
test.done();
|
||||
};
|
||||
};
|
||||
|
||||
testBase.tests["firebird adapter with query builder"] = function(test) {
|
||||
testBase.tests["firebird adapter with query builder"] = function(test) {
|
||||
test.expect(1);
|
||||
test.ok(testBase.qb);
|
||||
|
||||
@ -78,6 +72,13 @@ testBase.tests["firebird adapter with query builder"] = function(test) {
|
||||
conn.detach();
|
||||
|
||||
test.done();
|
||||
};
|
||||
};
|
||||
|
||||
module.exports = testBase.tests;
|
||||
module.exports = testBase.tests;
|
||||
|
||||
} catch (e) {
|
||||
// Export an empty testBase.testsuite if module not loaded
|
||||
console.log(e);
|
||||
console.log("Database adapter firebird not found");
|
||||
module.exports = {};
|
||||
}
|
Loading…
Reference in New Issue
Block a user