From a56e5adc42f490f3a3ed0800b1479c8c4600e997 Mon Sep 17 00:00:00 2001 From: Clement Michaud Date: Fri, 1 Mar 2019 21:40:44 +0100 Subject: [PATCH] Create /tmp/authelia/db directory when starting minimal suite. --- test/suites/minimal/config.yml | 2 +- test/suites/minimal/index.ts | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/test/suites/minimal/config.yml b/test/suites/minimal/config.yml index 69c74375..7920a409 100644 --- a/test/suites/minimal/config.yml +++ b/test/suites/minimal/config.yml @@ -21,7 +21,7 @@ session: # Configuration of the storage backend used to store data and secrets. i.e. totp data storage: local: - path: /var/lib/authelia/db + path: /tmp/authelia/db # TOTP Issuer Name # diff --git a/test/suites/minimal/index.ts b/test/suites/minimal/index.ts index 174a0732..92654ce0 100644 --- a/test/suites/minimal/index.ts +++ b/test/suites/minimal/index.ts @@ -15,10 +15,17 @@ import SimpleAuthentication from './scenarii/SimpleAuthentication'; const execAsync = Bluebird.promisify(ChildProcess.exec); +before(async function() { + await execAsync('mkdir -p /tmp/authelia/db'); +}); + +after(async function() { + await execAsync('rm -r /tmp/authelia/db'); +}); + AutheliaSuite('Minimal configuration', __dirname + '/config.yml', function() { this.timeout(10000); beforeEach(async function() { - await execAsync('mkdir -p /var/lib/authelia/db') await execAsync('cp users_database.example.yml users_database.yml'); });