UNPKG

mongoscope-client

Version:
35 lines (32 loc) 1.07 kB
var assert = require('assert'), helpers = require('./helpers'); describe.skip('Tunnel', function(){ var seed = 'scope.mongodb.land:27017', key = '/Users/lucas/Dropbox/10gen-dev/mongoscope.pem', client; it('should fail to connect without the tunnel', function(done){ client = helpers.createClient({seed: seed, timeout: 100}) .on('error', function(err){ console.error(err); done(); }) .on('readable', done.bind(null, new Error('Should not be accessible!'))); }); it('should create one on the demo aws server', function(done){ client = helpers.createClient({ seed: seed, timeout: 5000, auth: { ssh: { key: key } } }) .on('error', done) .on('readable', done.bind(null, null)); }); it('should now connect to the test mongod on the demo server'); it('should know that connecting via the tunnel actually has the deployment id of the remote'); it('should destroy the tunnel'); it('should fail to connect again now that the tunnel is closed'); });