@@ -5,6 +5,7 @@ const $rdf = require('rdflib')
55const { rm, read } = require ( '../test-utils' )
66const ldnode = require ( '../../index' )
77const path = require ( 'path' )
8+ const fs = require ( 'fs-extra' )
89
910describe ( 'AccountManager (OIDC account creation tests)' , function ( ) {
1011 this . timeout ( 10000 )
@@ -13,6 +14,8 @@ describe('AccountManager (OIDC account creation tests)', function () {
1314 var serverUri = 'https://localhost:3457'
1415 var host = 'localhost:3457'
1516 var ldpHttpsServer
17+ let dbPath = path . join ( __dirname , '../resources/.db' )
18+
1619 var ldp = ldnode . createServer ( {
1720 root : path . join ( __dirname , '../resources/accounts/' ) ,
1821 sslKey : path . join ( __dirname , '../keys/key.pem' ) ,
@@ -21,7 +24,7 @@ describe('AccountManager (OIDC account creation tests)', function () {
2124 webid : true ,
2225 idp : true ,
2326 strictOrigin : true ,
24- dbPath : path . join ( __dirname , '../resources/db/oidc' ) ,
27+ dbPath,
2528 serverUri
2629 } )
2730
@@ -31,6 +34,7 @@ describe('AccountManager (OIDC account creation tests)', function () {
3134
3235 after ( function ( ) {
3336 if ( ldpHttpsServer ) ldpHttpsServer . close ( )
37+ fs . removeSync ( dbPath )
3438 } )
3539
3640 var server = supertest ( serverUri )
0 commit comments