2019-01-30 15:47:03 +00:00
|
|
|
import ChildProcess from 'child_process';
|
|
|
|
import Bluebird from "bluebird";
|
|
|
|
|
2019-01-30 15:50:49 +00:00
|
|
|
import AutheliaSuite from "../../helpers/context/AutheliaSuite";
|
2019-01-30 15:47:03 +00:00
|
|
|
import BadPassword from "./scenarii/BadPassword";
|
|
|
|
import RegisterTotp from './scenarii/RegisterTotp';
|
|
|
|
import ResetPassword from './scenarii/ResetPassword';
|
|
|
|
import TOTPValidation from './scenarii/TOTPValidation';
|
2019-01-30 22:33:14 +00:00
|
|
|
import Inactivity from './scenarii/Inactivity';
|
2019-02-09 22:20:37 +00:00
|
|
|
import BackendProtection from './scenarii/BackendProtection';
|
|
|
|
import VerifyEndpoint from './scenarii/VerifyEndpoint';
|
2019-02-13 23:27:43 +00:00
|
|
|
import RequiredTwoFactor from './scenarii/RequiredTwoFactor';
|
|
|
|
import LogoutRedirectToAlreadyLoggedIn from './scenarii/LogoutRedirectToAlreadyLoggedIn';
|
|
|
|
import SimpleAuthentication from './scenarii/SimpleAuthentication';
|
2019-01-30 15:47:03 +00:00
|
|
|
|
|
|
|
const execAsync = Bluebird.promisify(ChildProcess.exec);
|
|
|
|
|
2019-01-30 22:33:14 +00:00
|
|
|
AutheliaSuite('Minimal configuration', __dirname + '/config.yml', function() {
|
2019-01-30 15:47:03 +00:00
|
|
|
this.timeout(10000);
|
|
|
|
beforeEach(function() {
|
|
|
|
return execAsync("cp users_database.example.yml users_database.yml");
|
|
|
|
});
|
|
|
|
|
2019-02-13 23:27:43 +00:00
|
|
|
describe('Simple authentication', SimpleAuthentication);
|
2019-02-09 22:20:37 +00:00
|
|
|
describe('Backend protection', BackendProtection);
|
|
|
|
describe('Verify API endpoint', VerifyEndpoint);
|
2019-01-30 15:47:03 +00:00
|
|
|
describe('Bad password', BadPassword);
|
|
|
|
describe('Reset password', ResetPassword);
|
|
|
|
describe('TOTP Registration', RegisterTotp);
|
|
|
|
describe('TOTP Validation', TOTPValidation);
|
2019-01-30 22:33:14 +00:00
|
|
|
describe('Inactivity period', Inactivity);
|
2019-02-13 23:27:43 +00:00
|
|
|
describe('Required two factor', RequiredTwoFactor);
|
|
|
|
describe('Logout endpoint redirect to already logged in page', LogoutRedirectToAlreadyLoggedIn);
|
2019-01-30 15:47:03 +00:00
|
|
|
});
|