Fix DuoPush suite and do some clean up.
parent
32820518cf
commit
135cf718d5
|
@ -27,9 +27,4 @@ func RunCI(cmd *cobra.Command, args []string) {
|
|||
if err := utils.CommandWithStdout("authelia-scripts", "--log-level", "debug", "unittest").Run(); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
log.Info("=====> Build Docker stage <=====")
|
||||
if err := utils.CommandWithStdout("authelia-scripts", "--log-level", "debug", "docker", "build").Run(); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -237,7 +237,7 @@ func runSuiteTests(suiteName string, withEnv bool) error {
|
|||
if suite.TestTimeout > 0 {
|
||||
timeout = fmt.Sprintf("%ds", int64(suite.TestTimeout/time.Second))
|
||||
}
|
||||
testCmdLine := fmt.Sprintf("go test -v ./internal/suites -timeout %s -run '^(Test%sSuite)$'", timeout, suiteName)
|
||||
testCmdLine := fmt.Sprintf("go test -count=1 -v ./internal/suites -timeout %s -run '^(Test%sSuite)$'", timeout, suiteName)
|
||||
|
||||
log.Infof("Running tests of suite %s...", suiteName)
|
||||
log.Debugf("Running tests with command: %s", testCmdLine)
|
||||
|
|
|
@ -157,10 +157,10 @@ access_control:
|
|||
|
||||
# Rules applied to 'admins' group
|
||||
- domain: "mx2.mail.example.com"
|
||||
subject: "groups:admins"
|
||||
subject: "group:admins"
|
||||
policy: deny
|
||||
- domain: "*.example.com"
|
||||
subject: "groups:admins"
|
||||
subject: "group:admins"
|
||||
policy: two_factor
|
||||
|
||||
# Rules applied to 'dev' group
|
||||
|
|
|
@ -7,4 +7,8 @@ go get github.com/cespare/reflex
|
|||
mkdir -p /var/lib/authelia
|
||||
mkdir -p /etc/authelia
|
||||
|
||||
# Sleep 10 seconds to wait the end of npm install updating web directory
|
||||
# and making reflex reload multiple times.
|
||||
sleep 10
|
||||
|
||||
reflex -c /resources/reflex.conf
|
|
@ -92,10 +92,10 @@
|
|||
|
||||
# Rules applied to 'admins' group
|
||||
- domain: 'mx2.mail.example.com'
|
||||
subject: 'groups:admins'
|
||||
subject: 'group:admins'
|
||||
policy: deny
|
||||
- domain: '*.example.com'
|
||||
subject: 'groups:admins'
|
||||
subject: 'group:admins'
|
||||
policy: two_factor
|
||||
|
||||
# Rules applied to 'dev' group
|
||||
|
|
|
@ -50,10 +50,10 @@ access_control:
|
|||
|
||||
# Rules applied to 'admins' group
|
||||
- domain: "mx2.mail.example.com"
|
||||
subject: "groups:admins"
|
||||
subject: "group:admins"
|
||||
policy: deny
|
||||
- domain: "*.example.com"
|
||||
subject: "groups:admins"
|
||||
subject: "group:admins"
|
||||
policy: two_factor
|
||||
|
||||
# Rules applied to 'dev' group
|
||||
|
|
|
@ -8,5 +8,6 @@ import (
|
|||
|
||||
func (wds *WebDriverSession) doChangeMethod(ctx context.Context, t *testing.T, method string) {
|
||||
wds.WaitElementLocatedByID(ctx, t, "methods-button").Click()
|
||||
wds.WaitElementLocatedByID(ctx, t, "methods-dialog")
|
||||
wds.WaitElementLocatedByID(ctx, t, fmt.Sprintf("%s-option", method)).Click()
|
||||
}
|
||||
|
|
|
@ -47,17 +47,13 @@ func (s *UserPreferencesScenario) SetupTest() {
|
|||
}
|
||||
|
||||
func (s *UserPreferencesScenario) TestShouldRememberLastUsed2FAMethod() {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 60*time.Second)
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 40*time.Second)
|
||||
defer cancel()
|
||||
|
||||
// Authenticate
|
||||
s.doLoginOneFactor(ctx, s.T(), "john", "password", false, "")
|
||||
s.verifyIsSecondFactorPage(ctx, s.T())
|
||||
|
||||
// And select OTP method
|
||||
s.doChangeMethod(ctx, s.T(), "one-time-password")
|
||||
s.WaitElementLocatedByID(ctx, s.T(), "one-time-password-method")
|
||||
|
||||
// Then switch to push notification method
|
||||
s.doChangeMethod(ctx, s.T(), "push-notification")
|
||||
s.WaitElementLocatedByID(ctx, s.T(), "push-notification-method")
|
||||
|
|
|
@ -49,7 +49,7 @@ func init() {
|
|||
SetUp: setup,
|
||||
SetUpTimeout: 5 * time.Minute,
|
||||
OnSetupTimeout: onSetupTimeout,
|
||||
TestTimeout: 1 * time.Minute,
|
||||
TestTimeout: 2 * time.Minute,
|
||||
TearDown: teardown,
|
||||
TearDownTimeout: 2 * time.Minute,
|
||||
|
||||
|
|
|
@ -23,12 +23,11 @@ export default function (props: Props) {
|
|||
|
||||
return (
|
||||
<Dialog
|
||||
id="methods-dialog"
|
||||
open={props.open}
|
||||
className={style.root}
|
||||
onClose={props.onClose}>
|
||||
<DialogContent>
|
||||
<Grid container justify="center" spacing={1}>
|
||||
<Grid container justify="center" spacing={1} id="methods-dialog">
|
||||
{props.methods.has(SecondFactorMethod.TOTP)
|
||||
? <MethodItem
|
||||
id="one-time-password-option"
|
||||
|
|
Loading…
Reference in New Issue