Skip to content

Commit 1a92a91

Browse files
author
jaxoncreed
committed
Fix TLS Tests
1 parent 7ca978d commit 1a92a91

File tree

2 files changed

+40
-11
lines changed

2 files changed

+40
-11
lines changed

config-backup.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"root": "/Users/m/inrupt/node-solid-server/data",
3+
"port": "8443",
4+
"serverUri": "https://localhost:8443",
5+
"webid": true,
6+
"mount": "/",
7+
"configPath": "./config",
8+
"configFile": "./config.json",
9+
"dbPath": "./.db",
10+
"sslKey": "../privkey.pem",
11+
"sslCert": "../fullchain.pem",
12+
"multiuser": true,
13+
"enforceToc": false,
14+
"disablePasswordChecks": false,
15+
"supportEmail": "",
16+
"server": {
17+
"name": "localhost",
18+
"description": "",
19+
"logo": ""
20+
}
21+
}

test/integration/acl-tls-test.js

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@ var rm = require('../utils').rm
1919
var ldnode = require('../../index')
2020
var ns = require('solid-namespace')($rdf)
2121

22-
var address = 'https://localhost:3456/test/'
23-
let rootPath = path.join(__dirname, '../resources')
24-
let configPath = path.join(rootPath, 'config')
22+
const port = 7777
23+
const serverUri = `https://localhost:7777`
24+
const rootPath = path.join(__dirname, '../resources/accounts-acl')
25+
const dbPath = path.join(rootPath, 'db')
26+
const configPath = path.join(rootPath, 'config')
2527

2628
var aclExtension = '.acl'
2729
var metaExtension = '.meta'
@@ -37,8 +39,9 @@ var globFile = testDir + '/*'
3739
var origin1 = 'http://example.org/'
3840
var origin2 = 'http://example.com/'
3941

40-
var user1 = 'https://user1.databox.me/profile/card#me'
41-
var user2 = 'https://user2.databox.me/profile/card#me'
42+
var user1 = 'https://tim.localhost:7777/profile/card#me'
43+
var user2 = 'https://nicola.localhost:7777/profile/card#me'
44+
var address = 'https://tim.localhost:7777'
4245
var userCredentials = {
4346
user1: {
4447
cert: fs.readFileSync(path.join(__dirname, '../keys/user1-cert.pem')),
@@ -52,20 +55,25 @@ var userCredentials = {
5255

5356
describe('ACL with WebID+TLS', function () {
5457
var ldpHttpsServer
55-
var ldp = ldnode.createServer({
56-
mount: '/test',
58+
var serverConfig = {
5759
root: rootPath,
60+
serverUri,
61+
dbPath,
62+
port,
5863
configPath,
5964
sslKey: path.join(__dirname, '../keys/key.pem'),
6065
sslCert: path.join(__dirname, '../keys/cert.pem'),
6166
webid: true,
62-
strictOrigin: true,
67+
multiuser: true,
6368
auth: 'tls',
64-
rejectUnauthorized: false
65-
})
69+
rejectUnauthorized: false,
70+
strictOrigin: true,
71+
host: { serverUri }
72+
}
73+
var ldp = ldnode.createServer(serverConfig)
6674

6775
before(function (done) {
68-
ldpHttpsServer = ldp.listen(3456, done)
76+
ldpHttpsServer = ldp.listen(port, done)
6977
})
7078

7179
after(function () {

0 commit comments

Comments
 (0)