Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 24 additions & 10 deletions cmd/cluster-authentication-operator-tests-ext/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
_ "github.com/openshift/cluster-authentication-operator/test/e2e-encryption-kms"
_ "github.com/openshift/cluster-authentication-operator/test/e2e-encryption-perf"
_ "github.com/openshift/cluster-authentication-operator/test/e2e-encryption-rotation"
_ "github.com/openshift/cluster-authentication-operator/test/e2e-oidc"

"k8s.io/klog/v2"
)
Expand Down Expand Up @@ -63,25 +64,27 @@ func prepareOperatorTestsRegistry() (*oteextension.Registry, error) {
registry := oteextension.NewRegistry()
extension := oteextension.NewExtension("openshift", "payload", "cluster-authentication-operator")

// The following suite runs tests that verify the operator's behaviour.
// This suite is executed only on pull requests targeting this repository.
// Tests that are not tagged with [Serial] and have any of [Operator], [Templates], [Tokens] are included in this suite.
// The following suite runs tests that verify the operator's behaviour in parallel.
// Includes: [Operator][Certs], [Operator][Routes], [Templates], [Tokens] tests
// These tests can run concurrently without conflicts.
extension.AddSuite(oteextension.Suite{
Name: "openshift/cluster-authentication-operator/operator/parallel",
Parallelism: 4,
Qualifiers: []string{
`!name.contains("[Serial]") && (name.contains("[Operator]") || name.contains("[Templates]") || name.contains("[Tokens]"))`,
Comment thread
ropatil010 marked this conversation as resolved.
`name.contains("[Operator]") || name.contains("[Templates]") || name.contains("[Tokens]")`,
},
})

// The following suite runs tests that must execute serially (one at a time)
// because they modify cluster-wide resources like OAuth configuration.
// Tests tagged with [Serial] and any of [Operator], [OIDC], [Templates], [Tokens] are included in this suite.
// The following suite runs IntegratedOAuth IDP tests (Keycloak/GitLab) serially.
// These tests modify cluster-wide OAuth configuration and must run one at a time.
// Excludes [Encryption], [OIDC], and [Disruptive] tests which have dedicated suites.
// ClusterStability set to Disruptive: IDP tests temporarily put operator in Degraded state during cleanup.
extension.AddSuite(oteextension.Suite{
Name: "openshift/cluster-authentication-operator/operator/serial",
Parallelism: 1,
Name: "openshift/cluster-authentication-operator/operator/serial",
Parallelism: 1,
ClusterStability: oteextension.ClusterStabilityDisruptive,
Qualifiers: []string{
`name.contains("[Serial]") && (name.contains("[Operator]") || name.contains("[OIDC]") || name.contains("[Templates]") || name.contains("[Tokens]"))`,
`!name.contains("[Disruptive]") && !name.contains("[Encryption]") && !name.contains("[OIDC]") && name.contains("[Serial]")`,
Comment thread
ropatil010 marked this conversation as resolved.
Outdated
},
})

Expand All @@ -105,6 +108,17 @@ func prepareOperatorTestsRegistry() (*oteextension.Registry, error) {
},
})

// The following suite runs external OIDC tests that authenticate directly via external OIDC
// (bypassing OpenShift's IntegratedOAuth). These are long-running tests in their own suite.
extension.AddSuite(oteextension.Suite{
Name: "openshift/cluster-authentication-operator/operator-oidc/serial",
Comment thread
ropatil010 marked this conversation as resolved.
Outdated
Parallelism: 1,
ClusterStability: oteextension.ClusterStabilityDisruptive,
Qualifiers: []string{
`name.contains("[OIDC]")`,
Comment thread
ropatil010 marked this conversation as resolved.
Outdated
},
})

// ClusterStability set to Disruptive: encryption perf tests trigger API server rollouts.
extension.AddSuite(oteextension.Suite{
Name: "openshift/cluster-authentication-operator/operator-encryption-perf/serial",
Expand Down
Loading