Closed
Description
I need some help getting the existing tests running. I was trying to execute the tests based on a clean master branch (no SAP HANA related changes), but It fails.
michael@ubuntu:~/repos/node-db-migrate$ npm -v
2.14.7
michael@ubuntu:~/repos/node-db-migrate$ node -v
v4.2.2
michael@ubuntu:~/repos/node-db-migrate$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.3 LTS
Release: 14.04
Codename: trusty
$ npm test
> db-migrate@0.10.0-beta.6 test /home/michael/repos/node-db-migrate
> node node_modules/.bin/vows
·········· ··· ··✗·
✗ Errored » Asynchronous Error
in index
in test/driver/index_test.js/home/michael/repos/node-db-migrate/test/driver/index_test.js:79
driverSpy.restore();
^
TypeError: Cannot read property 'restore' of undefined
at Object.vows.describe.addBatch.a connection with ssh tunnel.teardown (/home/michael/repos/node-db-migrate/test/driver/index_test.js:79:16)
at runTeardown (/home/michael/repos/node-db-migrate/node_modules/vows/lib/vows/suite.js:382:37)
at Object.__dirname.tryEnd (/home/michael/repos/node-db-migrate/node_modules/vows/lib/vows/suite.js:362:17)
at EventEmitter.<anonymous> (/home/michael/repos/node-db-migrate/node_modules/vows/lib/vows.js:93:18)
at emitMany (events.js:113:20)
at EventEmitter.emit (events.js:182:7)
at EventEmitter.options.Emitter.emit (/home/michael/repos/node-db-migrate/node_modules/vows/lib/vows.js:240:24)
at that.emitter.ctx (/home/michael/repos/node-db-migrate/node_modules/vows/lib/vows/context.js:31:52)
at Object.env.callback (/home/michael/repos/node-db-migrate/node_modules/vows/lib/vows/context.js:46:29)
at /home/michael/repos/node-db-migrate/test/driver/index_test.js:24:12
at /home/michael/repos/node-db-migrate/lib/driver/index.js:109:9
at Handshake._callback (/home/michael/repos/node-db-migrate/node_modules/db-migrate-mysql/index.js:424:14)
at Handshake.Sequence.end (/home/michael/repos/node-db-migrate/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:24)
at Protocol.handleNetworkError (/home/michael/repos/node-db-migrate/node_modules/mysql/lib/protocol/Protocol.js:364:14)
at Connection._handleNetworkError (/home/michael/repos/node-db-migrate/node_modules/mysql/lib/Connection.js:421:18)
at emitOne (events.js:77:13)
Even though I'm not expecting this to be an issue in terms of not being able to connect to a database, I also set up a MySQL server, a PostgreSQL server and a MongoDB server as well, all with default.
My test/db.config.json
:
{
"mysql": {
"database": "db_migrate_test",
"user": "root",
"driver": "mysql"
},
"pg": {
"driver": "pg",
"database": "db_migrate_test",
"username": "postgres"
},
"sqlite3": {
"driver": "sqlite3",
"filename": "test.db"
},
"mongodb": {
"driver": "mongodb",
"host": "localhost",
"database": "db_migrate_test"
}
}
Thanks for any help!