Documentation ¶
Index ¶
- Variables
- func ConfigureDuo(t *testing.T, allowDeny DuoPolicy)
- func GetLoginBaseURL() string
- func GetWebDriverPort() int
- func NewHTTPClient() *http.Client
- func WithWebdriver(fn func(webdriver selenium.WebDriver) error) error
- type CommandSuite
- type DockerEnvironment
- func (de *DockerEnvironment) Down() error
- func (de *DockerEnvironment) Exec(service string, command []string) (string, error)
- func (de *DockerEnvironment) Logs(service string, flags []string) (string, error)
- func (de *DockerEnvironment) Pull(images ...string) error
- func (de *DockerEnvironment) Restart(service string) error
- func (de *DockerEnvironment) Start(service string) error
- func (de *DockerEnvironment) Stop(service string) error
- func (de *DockerEnvironment) Up() error
- type DuoPolicy
- type Kind
- type Kubectl
- type Registry
- type SeleniumSuite
- type Suite
- type WebDriverSession
- func (wds *WebDriverSession) Stop() error
- func (wds *WebDriverSession) Wait(ctx context.Context, condition selenium.Condition) error
- func (wds *WebDriverSession) WaitElementLocatedByCSSSelector(ctx context.Context, t *testing.T, cssSelector string) selenium.WebElement
- func (wds *WebDriverSession) WaitElementLocatedByClassName(ctx context.Context, t *testing.T, className string) selenium.WebElement
- func (wds *WebDriverSession) WaitElementLocatedByID(ctx context.Context, t *testing.T, id string) selenium.WebElement
- func (wds *WebDriverSession) WaitElementLocatedByLinkText(ctx context.Context, t *testing.T, linkText string) selenium.WebElement
- func (wds *WebDriverSession) WaitElementLocatedByTagName(ctx context.Context, t *testing.T, tagName string) selenium.WebElement
- func (wds *WebDriverSession) WaitElementTextContains(ctx context.Context, t *testing.T, element selenium.WebElement, pattern string)
- func (wds *WebDriverSession) WaitElementsLocatedByCSSSelector(ctx context.Context, t *testing.T, cssSelector string) []selenium.WebElement
Constants ¶
This section is empty.
Variables ¶
var AdminBaseURL = fmt.Sprintf("https://admin.%s", BaseDomain)
AdminBaseURL the base URL of the admin domain.
var AutheliaBaseURL = "https://authelia.example.com:9091"
AutheliaBaseURL the base URL of Authelia service.
var BaseDomain = "example.com:8080"
BaseDomain the base domain.
var DevBaseURL = fmt.Sprintf("https://dev.%s", BaseDomain)
DevBaseURL the base URL of the dev domain.
var DuoBaseURL = "https://duo.example.com"
DuoBaseURL the base URL of the Duo configuration API.
var HomeBaseURL = fmt.Sprintf("https://home.%s", BaseDomain)
HomeBaseURL the base URL of the home domain.
var LoginBaseURL = fmt.Sprintf("https://login.%s", BaseDomain)
LoginBaseURL the base URL of the login portal.
var MX1MailBaseURL = fmt.Sprintf("https://mx1.mail.%s", BaseDomain)
MX1MailBaseURL the base URL of the mx1.mail domain.
var MX2MailBaseURL = fmt.Sprintf("https://mx2.mail.%s", BaseDomain)
MX2MailBaseURL the base URL of the mx2.mail domain.
var MailBaseURL = fmt.Sprintf("https://mail.%s", BaseDomain)
MailBaseURL the base URL of the mail domain.
var OIDCBaseURL = fmt.Sprintf("https://oidc.%s", BaseDomain)
OIDCBaseURL the base URL of the oidc domain.
var PathPrefix = os.Getenv("PathPrefix")
PathPrefix the prefix/url_base of the login portal.
var PublicBaseURL = fmt.Sprintf("https://public.%s", BaseDomain)
PublicBaseURL the base URL of the public domain.
var SecureBaseURL = fmt.Sprintf("https://secure.%s", BaseDomain)
SecureBaseURL the base URL of the secure domain.
var SingleFactorBaseURL = fmt.Sprintf("https://singlefactor.%s", BaseDomain)
SingleFactorBaseURL the base URL of the singlefactor domain.
Functions ¶
func ConfigureDuo ¶
ConfigureDuo configure duo api to allow or block auth requests.
func GetLoginBaseURL ¶
func GetLoginBaseURL() string
GetLoginBaseURL returns the URL of the login portal and the path prefix if specified.
func GetWebDriverPort ¶
func GetWebDriverPort() int
GetWebDriverPort returns the port to initialize the webdriver with.
func NewHTTPClient ¶
NewHTTPClient create a new client skipping TLS verification and not redirecting.
Types ¶
type CommandSuite ¶
type CommandSuite struct { suite.Suite *DockerEnvironment // contains filtered or unexported fields }
CommandSuite is a command line interface suite.
type DockerEnvironment ¶
type DockerEnvironment struct {
// contains filtered or unexported fields
}
DockerEnvironment represent a docker environment.
func NewDockerEnvironment ¶
func NewDockerEnvironment(files []string) *DockerEnvironment
NewDockerEnvironment create a new docker environment.
func (*DockerEnvironment) Down ¶
func (de *DockerEnvironment) Down() error
Down destroy a docker environment.
func (*DockerEnvironment) Exec ¶
func (de *DockerEnvironment) Exec(service string, command []string) (string, error)
Exec execute a command within a given service of the environment.
func (*DockerEnvironment) Logs ¶
func (de *DockerEnvironment) Logs(service string, flags []string) (string, error)
Logs get logs of a given service of the environment.
func (*DockerEnvironment) Pull ¶
func (de *DockerEnvironment) Pull(images ...string) error
Pull pull all images of needed in the environment.
func (*DockerEnvironment) Restart ¶
func (de *DockerEnvironment) Restart(service string) error
Restart restarts a service.
func (*DockerEnvironment) Start ¶
func (de *DockerEnvironment) Start(service string) error
Start a docker service.
func (*DockerEnvironment) Stop ¶
func (de *DockerEnvironment) Stop(service string) error
Stop a docker service.
func (*DockerEnvironment) Up ¶
func (de *DockerEnvironment) Up() error
Up spawn a docker environment.
type Kind ¶
type Kind struct{}
Kind used for running kind commands.
func (Kind) ClusterExists ¶
ClusterExists check whether a cluster exists.
func (Kind) CreateCluster ¶
CreateCluster create a new Kubernetes cluster.
func (Kind) DeleteCluster ¶
DeleteCluster delete a Kubernetes cluster.
type Kubectl ¶
type Kubectl struct{}
Kubectl used for running kubectl commands.
func (Kubectl) DeployAuthelia ¶
DeployAuthelia deploy Authelia application.
func (Kubectl) DeployThirdparties ¶
DeployThirdparties deploy thirdparty services (ldap, db, ingress controllers, etc...).
func (Kubectl) StartDashboard ¶
StartDashboard start Kube dashboard.
func (Kubectl) StopDashboard ¶
StopDashboard stop kube dashboard.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry represent a registry of suite by name.
var GlobalRegistry *Registry
GlobalRegistry a global registry used by Authelia tooling.
func NewSuitesRegistry ¶
func NewSuitesRegistry() *Registry
NewSuitesRegistry create a suites registry.
type SeleniumSuite ¶
type SeleniumSuite struct { suite.Suite *WebDriverSession }
SeleniumSuite is a selenium suite.
func (*SeleniumSuite) WebDriver ¶
func (s *SeleniumSuite) WebDriver() selenium.WebDriver
WebDriver return the webdriver of the suite.
type Suite ¶
type Suite struct { SetUp func(tmpPath string) error SetUpTimeout time.Duration // Callback called when an error occur during setup phase. OnSetupTimeout func() error // Callback called when at least one test fail. OnError func() error TestTimeout time.Duration TearDown func(tmpPath string) error TearDownTimeout time.Duration // A textual description of the suite purpose. Description string }
Suite the definition of a suite.
type WebDriverSession ¶
type WebDriverSession struct { WebDriver selenium.WebDriver // contains filtered or unexported fields }
WebDriverSession binding a selenium service and a webdriver.
func StartWebDriver ¶
func StartWebDriver() (*WebDriverSession, error)
StartWebDriver create a selenium session.
func StartWebDriverWithProxy ¶
func StartWebDriverWithProxy(proxy string, port int) (*WebDriverSession, error)
StartWebDriverWithProxy create a selenium session.
func (*WebDriverSession) Stop ¶
func (wds *WebDriverSession) Stop() error
Stop stop the selenium session.
func (*WebDriverSession) WaitElementLocatedByCSSSelector ¶
func (wds *WebDriverSession) WaitElementLocatedByCSSSelector(ctx context.Context, t *testing.T, cssSelector string) selenium.WebElement
WaitElementLocatedByCSSSelector wait an element is located by class name.
func (*WebDriverSession) WaitElementLocatedByClassName ¶
func (wds *WebDriverSession) WaitElementLocatedByClassName(ctx context.Context, t *testing.T, className string) selenium.WebElement
WaitElementLocatedByClassName wait an element is located by class name.
func (*WebDriverSession) WaitElementLocatedByID ¶
func (wds *WebDriverSession) WaitElementLocatedByID(ctx context.Context, t *testing.T, id string) selenium.WebElement
WaitElementLocatedByID wait an element is located by id.
func (*WebDriverSession) WaitElementLocatedByLinkText ¶
func (wds *WebDriverSession) WaitElementLocatedByLinkText(ctx context.Context, t *testing.T, linkText string) selenium.WebElement
WaitElementLocatedByLinkText wait an element is located by link text.
func (*WebDriverSession) WaitElementLocatedByTagName ¶
func (wds *WebDriverSession) WaitElementLocatedByTagName(ctx context.Context, t *testing.T, tagName string) selenium.WebElement
WaitElementLocatedByTagName wait an element is located by tag name.
func (*WebDriverSession) WaitElementTextContains ¶
func (wds *WebDriverSession) WaitElementTextContains(ctx context.Context, t *testing.T, element selenium.WebElement, pattern string)
WaitElementTextContains wait the text of an element contains a pattern.
func (*WebDriverSession) WaitElementsLocatedByCSSSelector ¶
func (wds *WebDriverSession) WaitElementsLocatedByCSSSelector(ctx context.Context, t *testing.T, cssSelector string) []selenium.WebElement
WaitElementsLocatedByCSSSelector wait an element is located by CSS selector.
Source Files ¶
- action_2fa_methods.go
- action_http.go
- action_login.go
- action_logout.go
- action_mail.go
- action_register.go
- action_reset_password.go
- action_totp.go
- action_visit.go
- const.go
- docker.go
- duo.go
- environment.go
- http.go
- kubernetes.go
- registry.go
- suite_activedirectory.go
- suite_bypass_all.go
- suite_cli.go
- suite_docker.go
- suite_duo_push.go
- suite_haproxy.go
- suite_high_availability.go
- suite_kubernetes.go
- suite_ldap.go
- suite_mariadb.go
- suite_mysql.go
- suite_network_acl.go
- suite_oidc.go
- suite_oidc_traefik.go
- suite_one_factor_only.go
- suite_pathprefix.go
- suite_postgres.go
- suite_short_timeouts.go
- suite_standalone.go
- suite_traefik.go
- suite_traefik2.go
- suites.go
- utils.go
- verify_body_contains.go
- verify_is_authenticated_page.go
- verify_is_consent_page.go
- verify_is_first_factor_page.go
- verify_is_home.go
- verify_is_second_factor_page.go
- verify_mail.go
- verify_notification.go
- verify_secret_authorized.go
- verify_url_is.go
- webdriver.go