From 9a0e5290d1a86435f29ab0e366fb33bc1bdc1920 Mon Sep 17 00:00:00 2001 From: Clement Michaud Date: Thu, 15 Nov 2018 22:28:29 +0100 Subject: [PATCH] Use mailcatcher for minimal config setup. --- config.minimal.yml | 18 +++++++++--------- test/inactivity/keep_me_logged_in.ts | 4 ++-- test/minimal-config/fail_totp.ts | 2 +- test/minimal-config/register_totp.ts | 2 +- test/minimal-config/validate_totp.ts | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/config.minimal.yml b/config.minimal.yml index 385b05b4..9a25844d 100644 --- a/config.minimal.yml +++ b/config.minimal.yml @@ -86,8 +86,8 @@ regulation: notifier: # For testing purpose, notifications can be sent in a file - filesystem: - filename: /tmp/authelia/notification.txt + # filesystem: + # filename: /tmp/authelia/notification.txt # Use your email account to send the notifications. You can use an app password. # List of valid services can be found here: https://nodemailer.com/smtp/well-known/ @@ -98,11 +98,11 @@ notifier: ## service: gmail # Use a SMTP server for sending notifications - #smtp: - # username: test - # password: password - # secure: false - # host: 'smtp' - # port: 1025 - # sender: admin@example.com + smtp: + username: test + password: password + secure: false + host: 'smtp' + port: 1025 + sender: admin@example.com diff --git a/test/inactivity/keep_me_logged_in.ts b/test/inactivity/keep_me_logged_in.ts index f22b1049..edbd4437 100644 --- a/test/inactivity/keep_me_logged_in.ts +++ b/test/inactivity/keep_me_logged_in.ts @@ -1,5 +1,5 @@ import Bluebird = require("bluebird"); -import loginAndRegisterTotp from "../helpers/login-and-register-totp"; +import LoginAndRegisterTotp from "../helpers/login-and-register-totp"; import VisitPage from "../helpers/visit-page"; import FillLoginPageWithUserAndPasswordAndClick from "../helpers/fill-login-page-and-click"; import WithDriver from "../helpers/with-driver"; @@ -12,7 +12,7 @@ describe("Keep me logged in", function() { before(function() { const that = this; - return loginAndRegisterTotp(this.driver, "john") + return LoginAndRegisterTotp(this.driver, "john", true) .then(function(secret: string) { that.secret = secret; if(!secret) return Bluebird.reject(new Error("No secret!")); diff --git a/test/minimal-config/fail_totp.ts b/test/minimal-config/fail_totp.ts index a98441ce..b6c5478e 100644 --- a/test/minimal-config/fail_totp.ts +++ b/test/minimal-config/fail_totp.ts @@ -25,7 +25,7 @@ describe('Fail TOTP challenge', function() { describe('successfully login as john', function() { before(function() { const that = this; - return LoginAndRegisterTotp(this.driver, "john"); + return LoginAndRegisterTotp(this.driver, "john", true); }); describe('fail second factor', function() { diff --git a/test/minimal-config/register_totp.ts b/test/minimal-config/register_totp.ts index 4881f17a..65d419e7 100644 --- a/test/minimal-config/register_totp.ts +++ b/test/minimal-config/register_totp.ts @@ -14,7 +14,7 @@ describe('Registering TOTP', function() { describe('successfully login as john', function() { before('register successfully', function() { this.timeout(10000); - return LoginAndRegisterTotp(this.driver, "john"); + return LoginAndRegisterTotp(this.driver, "john", true); }) it("should see generated qrcode", function() { diff --git a/test/minimal-config/validate_totp.ts b/test/minimal-config/validate_totp.ts index 7adf4317..f1b0d382 100644 --- a/test/minimal-config/validate_totp.ts +++ b/test/minimal-config/validate_totp.ts @@ -24,7 +24,7 @@ describe('Validate TOTP factor', function() { describe('successfully login as john', function() { before(function() { const that = this; - return LoginAndRegisterTotp(this.driver, "john") + return LoginAndRegisterTotp(this.driver, "john", true) .then(function(secret: string) { that.secret = secret; })