Created
June 18, 2014 16:26
-
-
Save davidguttman/684c69c8c2d98d1a2178 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var test = require('tape') | |
, testCommon = require('abstract-leveldown/testCommon') | |
, DynamoDown = require('../') | |
testCommon.location = function() {return 'test-table'} | |
var dynOpts = { | |
region: 'us-east-1', | |
secretAccessKey: 'abc', | |
accessKeyId: '123', | |
httpOptions: { | |
proxy: 'http://localhost:8000' | |
} | |
} | |
function leveldown (location) { | |
var dd = DynamoDown(location) | |
dd.oldOpen = dd._open | |
dd._open = function(opts, cb) { | |
opts.dynamo = dynOpts | |
return dd.oldOpen(opts, cb) | |
} | |
return dd | |
} | |
/*** compatibility with basic LevelDOWN API ***/ | |
require('abstract-leveldown/abstract/leveldown-test').args(leveldown, test, testCommon) | |
require('abstract-leveldown/abstract/open-test').args(leveldown, test, testCommon) | |
require('abstract-leveldown/abstract/open-test').open(leveldown, test, testCommon) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment