Skip to content

Commit 6b39dcf

Browse files
Clean up params integration tests
1 parent b753954 commit 6b39dcf

File tree

15 files changed

+17
-76
lines changed

15 files changed

+17
-76
lines changed

test/integration/params.js

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,11 @@ describe('LDNODE params', function () {
8282
})
8383

8484
describe('ui-path', function () {
85+
let rootPath = './test/resources/'
8586
var ldp = ldnode({
86-
root: './test/resources/',
87-
apiApps: path.join(__dirname, '../resources/sampleContainer')
87+
root: rootPath,
88+
apiApps: path.join(__dirname, '../resources/sampleContainer'),
89+
webid: false
8890
})
8991
var server = supertest(ldp)
9092

@@ -97,9 +99,19 @@ describe('LDNODE params', function () {
9799

98100
describe('forcedUser', function () {
99101
var ldpHttpsServer
100-
let rootPath = path.join(__dirname, '../resources/acl-tls/fake-account')
102+
103+
const port = 7777
104+
const serverUri = `https://localhost:7777`
105+
const rootPath = path.join(__dirname, '../resources/accounts-acl')
106+
const dbPath = path.join(rootPath, 'db')
107+
const configPath = path.join(rootPath, 'config')
108+
101109
var ldp = ldnode.createServer({
102110
forceUser: 'https://fakeaccount.com/profile#me',
111+
dbPath,
112+
configPath,
113+
serverUri,
114+
port,
103115
root: rootPath,
104116
sslKey: path.join(__dirname, '../keys/key.pem'),
105117
sslCert: path.join(__dirname, '../keys/cert.pem'),
@@ -108,7 +120,7 @@ describe('LDNODE params', function () {
108120
})
109121

110122
before(function (done) {
111-
ldpHttpsServer = ldp.listen(3459, done)
123+
ldpHttpsServer = ldp.listen(port, done)
112124
})
113125

114126
after(function () {
@@ -117,7 +129,7 @@ describe('LDNODE params', function () {
117129
fs.removeSync(path.join(rootPath, 'index.html.acl'))
118130
})
119131

120-
var server = supertest('https://localhost:3459')
132+
var server = supertest(serverUri)
121133

122134
it('should find resource in correct path', function (done) {
123135
server.get('/hello.html')

test/resources/acl-tls/append-acl/abc.ttl

Lines changed: 0 additions & 1 deletion
This file was deleted.

test/resources/acl-tls/append-acl/abc.ttl.acl

Lines changed: 0 additions & 8 deletions
This file was deleted.

test/resources/acl-tls/append-acl/abc2.ttl

Lines changed: 0 additions & 1 deletion
This file was deleted.

test/resources/acl-tls/append-acl/abc2.ttl.acl

Lines changed: 0 additions & 8 deletions
This file was deleted.

test/resources/acl-tls/append-inherited/.acl

Lines changed: 0 additions & 13 deletions
This file was deleted.

test/resources/acl-tls/empty-acl/.acl

Whitespace-only changes.

test/resources/acl-tls/fake-account/.acl

Lines changed: 0 additions & 5 deletions
This file was deleted.

test/resources/acl-tls/fake-account/hello.html

Lines changed: 0 additions & 9 deletions
This file was deleted.

test/resources/acl-tls/no-acl/test-file.html

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)