-
Notifications
You must be signed in to change notification settings - Fork 1
/
test.js
38 lines (32 loc) · 858 Bytes
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
var tape = require('tape'),
tests = require('abstract-blob-store/tests'),
MantaBlobStore = require('./'),
manta = require('manta'),
fs = require('fs');
var client = manta.createClient({
sign: manta.privateKeySigner({
key: fs.readFileSync(process.env.HOME + '/.ssh/id_rsa', 'utf8'),
keyId: process.env.MANTA_KEY_ID,
user: process.env.MANTA_USER
}),
user: process.env.MANTA_USER,
url: process.env.MANTA_URL
});
var options = {
client: client
}
var common = {
setup: function(t, cb) {
//Create a manta client
var mantaBlobStore = new MantaBlobStore(options);
cb(null, mantaBlobStore);
},
teardown: function(t, store, blob, cb) {
if (blob) {
store.remove(blob, cb);
} else {
cb();
}
}
}
tests(tape, common)