Merge branch 'master' into bootstrap_loading_spinner
commit
a8dbf27faf
|
@ -15,7 +15,7 @@ export class TotpHandler implements ITotpHandler {
|
|||
generate(label: string, issuer: string): TOTPSecret {
|
||||
const secret = this.speakeasy.generateSecret({
|
||||
otpauth_url: false
|
||||
});
|
||||
}) as TOTPSecret;
|
||||
|
||||
secret.otpauth_url = this.speakeasy.otpauthURL({
|
||||
secret: secret.ascii,
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
import express = require("express");
|
||||
import objectPath = require("object-path");
|
||||
import winston = require("winston");
|
||||
import Endpoints = require("../../../../../shared/api");
|
||||
import BluebirdPromise = require("bluebird");
|
||||
import { AuthenticationSessionHandler } from "../../AuthenticationSessionHandler";
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
import express = require("express");
|
||||
import objectPath = require("object-path");
|
||||
import winston = require("winston");
|
||||
import Endpoints = require("../../../../../shared/api");
|
||||
import { ServerVariables } from "../../ServerVariables";
|
||||
import BluebirdPromise = require("bluebird");
|
||||
|
|
|
@ -6,7 +6,7 @@ import { MongoClientStub } from "../../mocks/connectors/mongo/MongoClientStub";
|
|||
import { MongoCollection } from "../../../src/lib/storage/mongo/MongoCollection";
|
||||
|
||||
describe("MongoCollection", function () {
|
||||
let mongoCollectionStub: MongoDB.Collection<any>;
|
||||
let mongoCollectionStub: any;
|
||||
let findStub: Sinon.SinonStub;
|
||||
let findOneStub: Sinon.SinonStub;
|
||||
let insertStub: Sinon.SinonStub;
|
||||
|
@ -15,8 +15,7 @@ describe("MongoCollection", function () {
|
|||
let countStub: Sinon.SinonStub;
|
||||
|
||||
before(function () {
|
||||
const Collection = require("mongodb").Collection;
|
||||
mongoCollectionStub = Sinon.createStubInstance(Collection);
|
||||
mongoCollectionStub = Sinon.createStubInstance(require("mongodb").Collection as any);
|
||||
findStub = mongoCollectionStub.find as Sinon.SinonStub;
|
||||
findOneStub = mongoCollectionStub.findOne as Sinon.SinonStub;
|
||||
insertStub = mongoCollectionStub.insert as Sinon.SinonStub;
|
||||
|
|
|
@ -64,7 +64,7 @@ When("I visit {string} and get redirected {string}",
|
|||
const that = this;
|
||||
return this.driver.get(url)
|
||||
.then(function () {
|
||||
return that.driver.wait(seleniumWebdriver.until.urlIs(redirectUrl), 2000);
|
||||
return that.driver.wait(seleniumWebdriver.until.urlIs(redirectUrl), 6000);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -60,14 +60,14 @@ function declareNeedsConfiguration(tag: string, cb: () => BluebirdPromise<void>)
|
|||
.then(function () {
|
||||
return exec("./scripts/example-commit/dc-example.sh -f " +
|
||||
"./example/compose/authelia/docker-compose.test.yml up -d authelia &&" +
|
||||
" sleep 1");
|
||||
" sleep 3");
|
||||
})
|
||||
});
|
||||
|
||||
After({ tags: "@needs-" + tag + "-config", timeout: 20 * 1000 }, function () {
|
||||
return exec("rm config.test.yml")
|
||||
.then(function () {
|
||||
return exec("./scripts/example-commit/dc-example.sh up -d authelia && sleep 1");
|
||||
return exec("./scripts/example-commit/dc-example.sh up -d authelia && sleep 3");
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -6,5 +6,5 @@ import BluebirdPromise = require("bluebird");
|
|||
|
||||
When(/^the application restarts$/, {timeout: 15 * 1000}, function () {
|
||||
const exec = BluebirdPromise.promisify(ChildProcess.exec);
|
||||
return exec("./scripts/example-commit/dc-example.sh restart authelia && sleep 1");
|
||||
return exec("./scripts/example-commit/dc-example.sh restart authelia && sleep 3");
|
||||
});
|
Loading…
Reference in New Issue