Fix compilation and unit tests

This commit is contained in:
Clement Michaud 2018-05-17 00:06:07 +02:00
parent 39555179e4
commit acd5a7a26d
2 changed files with 3 additions and 1 deletions

View File

@ -37,6 +37,7 @@ describe("test server configuration", function () {
it("should set cookie scope to domain set in the config", function () {
const config: UserConfiguration = {
port: 8081,
session: {
domain: "example.com",
secret: "secret"

View File

@ -9,6 +9,7 @@ import { IMongoClient } from "../../../server/src/lib/connectors/mongo/IMongoCli
import { TotpHandler } from "../../../server/src/lib/authentication/totp/TotpHandler";
import Speakeasy = require("speakeasy");
import Request = require("request-promise");
import { TOTPSecret } from "../../../server/types/TOTPSecret";
setDefaultTimeout(20 * 1000);
@ -77,7 +78,7 @@ declareNeedsConfiguration("single_factor", createSingleFactorConfiguration);
declareNeedsConfiguration("totp_issuer", createCustomTotpIssuerConfiguration);
function registerUser(context: any, username: string) {
let secret: Speakeasy.Key;
let secret: TOTPSecret;
const mongoConnector = new MongoConnector("mongodb://localhost:27017");
return mongoConnector.connect("authelia")
.then(function (mongoClient: IMongoClient) {