Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
17 changes: 11 additions & 6 deletions openshift/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,24 @@ E2E_REGISTRY_NAMESPACE=operator-controller-e2e
export CLUSTER_REGISTRY_HOST := $(E2E_REGISTRY_NAME).$(E2E_REGISTRY_NAMESPACE).svc:5000

export DOWNSTREAM_E2E_FLAGS := -count=1 -v
export DOWNSTREAM_GODOG_FLAGS := ~@mirrored-registry && ~@TLSProfile
export DOWNSTREAM_GODOG_FLAGS := ~@mirrored-registry && ~@TLSProfile && ~@CatalogdHA
#default timeout is 10m, but with an unknown set of feature gates enabled, we need to bump this up
export DOWNSTREAM_E2E_TIMEOUT := 50m
# BoxcutterRuntime (techpreview) applies resources sequentially through phases
# (CRD must be Established before the deploy phase) so installations take longer.
export E2E_STEP_TIMEOUT := 10m
.PHONY: test-e2e
test-e2e: ## Run the e2e tests.
$(DIR)/operator-controller/build-test-registry.sh $(E2E_REGISTRY_NAMESPACE) $(E2E_REGISTRY_NAME)
cd $(DIR)/../; \
go test $(DOWNSTREAM_E2E_FLAGS) ./test/e2e/features_test.go --godog.tags="$(DOWNSTREAM_GODOG_FLAGS)" --k8s.cli=oc
go test $(DOWNSTREAM_E2E_FLAGS) ./test/e2e/features_test.go \
-timeout=$(DOWNSTREAM_E2E_TIMEOUT) \
--godog.tags="$(DOWNSTREAM_GODOG_FLAGS)" \
--k8s.cli=oc
Comment thread
coderabbitai[bot] marked this conversation as resolved.

export DOWNSTREAM_EXPERIMENTAL_E2E_FLAGS := -count=1 -v
.PHONY: test-experimental-e2e
test-experimental-e2e: ## Run the experimental e2e tests.
$(DIR)/operator-controller/build-test-registry.sh $(E2E_REGISTRY_NAMESPACE) $(E2E_REGISTRY_NAME)
cd $(DIR)/../; \
go test $(DOWNSTREAM_EXPERIMENTAL_E2E_FLAGS) ./test/experimental-e2e/...;
/bin/true # keep - because it's triggered, but always succeed
Comment thread
coderabbitai[bot] marked this conversation as resolved.

PHONY: go-build-local
go-build-local:
Expand Down
14 changes: 13 additions & 1 deletion test/e2e/steps/steps.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,22 @@ import (
const (
olmDeploymentName = "operator-controller-controller-manager"
catalogdDeploymentName = "catalogd-controller-manager"
timeout = 5 * time.Minute
defaultTimeout = 5 * time.Minute
tick = 1 * time.Second
)

// timeout is the per-step wait timeout. It defaults to defaultTimeout (5m) but
// can be overridden via E2E_STEP_TIMEOUT to accommodate runtimes (e.g.
// BoxcutterRuntime) that take longer to complete an installation.
var timeout = func() time.Duration {
if s := os.Getenv("E2E_STEP_TIMEOUT"); s != "" {
if d, err := time.ParseDuration(s); err == nil {
return d
}
}
return defaultTimeout
}()

var (
olmNamespace = "olmv1-system"
componentNamespaces = map[string]string{} // keyed by component label (e.g. "catalogd"); falls back to olmNamespace
Expand Down