mirror of
https://github.com/authelia/authelia.git
synced 2026-10-28 09:34:52 +08:00
This adds the official OpenID Connect 1.0 Conformance Suites used by the OpenID Foundation to assert conformance for certification to our test suites. This allows us to offer the quality guarantee that every single commit of Authelia conforms to the OpenID Connect 1.0 and related specifications. The tests allow the following results to indicate success automatically: `PASSED`, `REVIEW` (result that manual review must occur), `SKIPPED` (result that indicates the conformance test is not needed due to reasonable criteria). In addition only the `FINISHED` status is accepted. If the result is `WARNING` which is just an informative result which does not indicate lack of conformance it can be manually allowed on a per module basis with an explanation. This allows both detecting new `WARNING` results and necessitates documenting them for future improvements. All of the result and status checks align entirely with the standard conformance certification process, ensuring that each commit would be certifiable. The storage for the suites is able to be configured for persistence, and every plan created carries the commit sha or tag; allowing for historical evidence of conformance.
58 lines
1.6 KiB
Go
58 lines
1.6 KiB
Go
// SPDX-FileCopyrightText: 2026 Authelia
|
|
//
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package suites
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
var mysqlSuiteName = "MySQL"
|
|
|
|
func init() {
|
|
dockerEnvironment := NewDockerEnvironment([]string{
|
|
"internal/suites/compose.yml",
|
|
"internal/suites/MySQL/compose.yml",
|
|
"internal/suites/example/compose/authelia/compose.backend.{}.yml",
|
|
"internal/suites/example/compose/authelia/compose.frontend.{}.yml",
|
|
"internal/suites/example/compose/nginx/backend/compose.yml",
|
|
"internal/suites/example/compose/nginx/portal/compose.yml",
|
|
"internal/suites/example/compose/smtp/compose.yml",
|
|
"internal/suites/example/compose/mysql/compose.yml",
|
|
"internal/suites/example/compose/ldap/compose.yml",
|
|
})
|
|
|
|
setup := func(suitePath string) (err error) {
|
|
if err = dockerEnvironment.Up(); err != nil {
|
|
return err
|
|
}
|
|
|
|
if err = waitUntilAutheliaIsReady(dockerEnvironment, mysqlSuiteName); err != nil {
|
|
return err
|
|
}
|
|
|
|
return updateDevEnvFileForDomain(BaseDomain, dockerEnvironment)
|
|
}
|
|
|
|
displayAutheliaLogs := func() error {
|
|
return dockerEnvironment.PrintLogs("authelia-backend", "authelia-frontend")
|
|
}
|
|
|
|
teardown := func(suitePath string) error {
|
|
err := dockerEnvironment.Down()
|
|
return err
|
|
}
|
|
|
|
GlobalRegistry.Register(mysqlSuiteName, Suite{
|
|
SetUp: setup,
|
|
SetUpTimeout: 2 * time.Minute,
|
|
OnSetupTimeout: displayAutheliaLogs,
|
|
OnError: displayAutheliaLogs,
|
|
TestTimeout: 2 * time.Minute,
|
|
TearDown: teardown,
|
|
TearDownTimeout: 1 * time.Minute,
|
|
Description: "This suite has been created to test Authelia with MySQL as the storage backend and LDAP as the user backend.",
|
|
})
|
|
}
|