authelia/test/minimal-config/00-suite.ts
Clément Michaud 9dab40c2ce
Add support for users database on disk. (#262)
In order to simplify the deployment of Authelia for
testing, LDAP is now optional made optional thanks
to users database stored in a file. One can update
the file manually even while Authelia is running.

With this feature the minimal configuration requires
only two components: Authelia and nginx.

The users database is obviously made for development
environments only as it prevents Authelia to be scaled
to more than one instance.

Note: Configuration has been updated. Key `ldap` has
been nested in `authentication_backend`.
2018-08-26 10:30:43 +02:00

32 lines
812 B
TypeScript

require("chromedriver");
import ChildProcess = require('child_process');
import Bluebird = require("bluebird");
import Environment = require('../environment');
const execAsync = Bluebird.promisify(ChildProcess.exec);
const includes = [
"docker-compose.minimal.yml",
"example/compose/docker-compose.base.yml",
"example/compose/nginx/minimal/docker-compose.yml",
]
before(function() {
this.timeout(20000);
this.environment = new Environment.Environment(includes);
return execAsync("cp users_database.yml users_database.test.yml")
.then(() => this.environment.setup(2000));
});
after(function() {
this.timeout(30000);
return execAsync("rm users_database.test.yml")
.then(() => {
if(process.env.KEEP_ENV != "true") {
return this.environment.cleanup();
}
});
});