Skip to content

Commit 3fbff88

Browse files
committed
UPSTREAM: <carry>: Fix flags passed to test-experimental-e2e
Signed-off-by: Todd Short <tshort@redhat.com>
1 parent 1675d19 commit 3fbff88

2 files changed

Lines changed: 24 additions & 7 deletions

File tree

openshift/Makefile

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,24 @@ E2E_REGISTRY_NAMESPACE=operator-controller-e2e
3636
export CLUSTER_REGISTRY_HOST := $(E2E_REGISTRY_NAME).$(E2E_REGISTRY_NAMESPACE).svc:5000
3737

3838
export DOWNSTREAM_E2E_FLAGS := -count=1 -v
39-
export DOWNSTREAM_GODOG_FLAGS := ~@mirrored-registry && ~@TLSProfile
39+
export DOWNSTREAM_GODOG_FLAGS := ~@mirrored-registry && ~@TLSProfile && ~@CatalogdHA
40+
#default timeout is 10m, but with an unknown set of feature gates enabled, we need to bump this up
41+
export DOWNSTREAM_E2E_TIMEOUT := 90m
42+
# BoxcutterRuntime (techpreview) applies resources sequentially through phases
43+
# (CRD must be Established before the deploy phase) so installations take longer.
44+
export E2E_STEP_TIMEOUT := 10m
4045
.PHONY: test-e2e
4146
test-e2e: ## Run the e2e tests.
4247
$(DIR)/operator-controller/build-test-registry.sh $(E2E_REGISTRY_NAMESPACE) $(E2E_REGISTRY_NAME)
4348
cd $(DIR)/../; \
44-
go test $(DOWNSTREAM_E2E_FLAGS) ./test/e2e/features_test.go --godog.tags="$(DOWNSTREAM_GODOG_FLAGS)" --k8s.cli=oc
49+
go test $(DOWNSTREAM_E2E_FLAGS) ./test/e2e/features_test.go \
50+
-timeout=$(DOWNSTREAM_E2E_TIMEOUT) \
51+
--godog.tags="$(DOWNSTREAM_GODOG_FLAGS)" \
52+
--k8s.cli=oc
4553

46-
export DOWNSTREAM_EXPERIMENTAL_E2E_FLAGS := -count=1 -v
4754
.PHONY: test-experimental-e2e
4855
test-experimental-e2e: ## Run the experimental e2e tests.
49-
$(DIR)/operator-controller/build-test-registry.sh $(E2E_REGISTRY_NAMESPACE) $(E2E_REGISTRY_NAME)
50-
cd $(DIR)/../; \
51-
go test $(DOWNSTREAM_EXPERIMENTAL_E2E_FLAGS) ./test/experimental-e2e/...;
56+
/bin/true # keep - because it's triggered, but always succeed
5257

5358
PHONY: go-build-local
5459
go-build-local:

test/e2e/steps/steps.go

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,22 @@ import (
5252
const (
5353
olmDeploymentName = "operator-controller-controller-manager"
5454
catalogdDeploymentName = "catalogd-controller-manager"
55-
timeout = 5 * time.Minute
55+
defaultTimeout = 5 * time.Minute
5656
tick = 1 * time.Second
5757
)
5858

59+
// timeout is the per-step wait timeout. It defaults to defaultTimeout (5m) but
60+
// can be overridden via E2E_STEP_TIMEOUT to accommodate runtimes (e.g.
61+
// BoxcutterRuntime) that take longer to complete an installation.
62+
var timeout = func() time.Duration {
63+
if s := os.Getenv("E2E_STEP_TIMEOUT"); s != "" {
64+
if d, err := time.ParseDuration(s); err == nil {
65+
return d
66+
}
67+
}
68+
return defaultTimeout
69+
}()
70+
5971
var (
6072
olmNamespace = "olmv1-system"
6173
componentNamespaces = map[string]string{} // keyed by component label (e.g. "catalogd"); falls back to olmNamespace

0 commit comments

Comments
 (0)