Skip to content

Commit 1372ff9

Browse files
author
nicola
committed
align tests with new parameters
1 parent a4d4fa4 commit 1372ff9

3 files changed

Lines changed: 9 additions & 5 deletions

File tree

‎index.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ function createServer(argv) {
7373
var app = ldnode(argv);
7474
var opts = app.locals.ldp;
7575

76-
if (opts.ldp && (opts.webid || opts.ssl )) {
76+
if (opts && (opts.webid || opts.ssl )) {
7777
var ssl = opts.webid || opts.ssl;
7878
var credentials = {
7979
key: fs.readFileSync(ssl.key),

‎package.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@
5656
"main": "index.js",
5757
"scripts": {
5858
"start": "node bin/ldnode.js",
59-
"test": "DEBUG='ldnode:*' ./node_modules/mocha/bin/mocha ./test/*.js"
59+
"test": "DEBUG='ldnode:*' ./node_modules/mocha/bin/mocha ./test/*.js",
60+
"test-acl": "./node_modules/mocha/bin/mocha ./test/secure-test.js"
6061
},
6162
"bin": {
6263
"ldnode": "./bin/ldnode.js"

‎test/secure-test.js‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var request = require('request');
66
var S = require('string');
77
var supertest = require('supertest');
88

9-
describe('acl', function() {
9+
describe('ACL', function() {
1010
this.timeout(10000);
1111
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
1212

@@ -17,7 +17,10 @@ describe('acl', function() {
1717
var ldp = ldnode.createServer({
1818
uriBase: address,
1919
fileBase: __dirname,
20-
webid: true
20+
webid: {
21+
key: __dirname + '/key.pem',
22+
cert: __dirname + '/cert.pem'
23+
}
2124
});
2225
ldp.listen(3456);
2326

@@ -918,4 +921,4 @@ describe('acl', function() {
918921
});
919922
});
920923
});
921-
});
924+
});

0 commit comments

Comments
 (0)