Skip to content

Commit 99bc484

Browse files
committed
adding scenario folders
1 parent e0d88ee commit 99bc484

File tree

5 files changed

+34
-9
lines changed

5 files changed

+34
-9
lines changed

test/accounts.js

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@ const parallel = require('run-parallel')
33
const waterfall = require('run-waterfall')
44
const path = require('path')
55
const supertest = require('supertest')
6-
76
// In this test we always assume that we are Alice
87

98
function getBobFoo (alice, bob, done) {
10-
bob.get('/')
9+
bob.get('/foo')
1110
.expect(401)
1211
.end(done)
1312
}
@@ -26,22 +25,32 @@ describe('OIDC flow', () => {
2625
let alice
2726
let bob
2827

29-
const solid = Solid.createServer({
30-
root: path.join(__dirname, '/resources'),
28+
const alicePod = Solid.createServer({
29+
root: path.join(__dirname, '/resources/accounts-scenario/alice'),
30+
sslKey: path.join(__dirname, '/keys/key.pem'),
31+
sslCert: path.join(__dirname, '/keys/cert.pem'),
32+
auth: 'oidc',
33+
dataBrowser: false,
34+
fileBrowser: false
35+
})
36+
const bobPod = Solid.createServer({
37+
root: path.join(__dirname, '/resources/accounts-scenario/bob'),
3138
sslKey: path.join(__dirname, '/keys/key.pem'),
3239
sslCert: path.join(__dirname, '/keys/cert.pem'),
33-
webid: true
40+
auth: 'oidc',
41+
dataBrowser: false,
42+
fileBrowser: false
3443
})
3544

3645
before(function (done) {
3746
parallel([
3847
(cb) => {
39-
aliceServer = solid.listen(3456, cb)
40-
alice = supertest('https://localhost:3456')
48+
aliceServer = alicePod.listen(5000, cb)
49+
alice = supertest('https://localhost:5000')
4150
},
4251
(cb) => {
43-
bobServer = solid.listen(3457, cb)
44-
bob = supertest('https://localhost:3457')
52+
bobServer = bobPod.listen(5001, cb)
53+
bob = supertest('https://localhost:5001')
4554
}
4655
], done)
4756
})
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<#Owner>
2+
a <http://www.w3.org/ns/auth/acl#Authorization> ;
3+
<http://www.w3.org/ns/auth/acl#accessTo> <./>;
4+
<http://www.w3.org/ns/auth/acl#agent> <https://127.0.0.1:5000/profile/card#me>;
5+
<http://www.w3.org/ns/auth/acl#mode> <http://www.w3.org/ns/auth/acl#Read>, <http://www.w3.org/ns/auth/acl#Write>, <http://www.w3.org/ns/auth/acl#Control> .
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<#Owner>
2+
a <http://www.w3.org/ns/auth/acl#Authorization> ;
3+
<http://www.w3.org/ns/auth/acl#accessTo> <./>;
4+
<http://www.w3.org/ns/auth/acl#agent> <https://127.0.0.1:5001/profile/card#me>;
5+
<http://www.w3.org/ns/auth/acl#mode> <http://www.w3.org/ns/auth/acl#Read>, <http://www.w3.org/ns/auth/acl#Write>, <http://www.w3.org/ns/auth/acl#Control> .
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
foo
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<#Alice>
2+
a <http://www.w3.org/ns/auth/acl#Authorization> ;
3+
<http://www.w3.org/ns/auth/acl#accessTo> <./foo>;
4+
<http://www.w3.org/ns/auth/acl#agent> <https://127.0.0.1:5000/profile/card#me>;
5+
<http://www.w3.org/ns/auth/acl#mode> <http://www.w3.org/ns/auth/acl#Read>, <http://www.w3.org/ns/auth/acl#Write>, <http://www.w3.org/ns/auth/acl#Control> .

0 commit comments

Comments
 (0)