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
32 changes: 8 additions & 24 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -259,21 +259,14 @@ E2E_TIMEOUT ?= 10m
e2e: #EXHELP Run the e2e tests.
go test -count=1 -v ./test/e2e/features_test.go -timeout=$(E2E_TIMEOUT)

E2E_REGISTRY_NAME := docker-registry
E2E_REGISTRY_NAMESPACE := operator-controller-e2e

export REG_PKG_NAME := registry-operator
export CLUSTER_REGISTRY_HOST := $(E2E_REGISTRY_NAME).$(E2E_REGISTRY_NAMESPACE).svc:5000
export LOCAL_REGISTRY_HOST := localhost:30000
export E2E_TEST_CATALOG_V1 := e2e/test-catalog:v1
export E2E_TEST_CATALOG_V2 := e2e/test-catalog:v2
export CATALOG_IMG := $(CLUSTER_REGISTRY_HOST)/$(E2E_TEST_CATALOG_V1)
export CLUSTER_REGISTRY_HOST := docker-registry.operator-controller-e2e.svc:5000
.PHONY: extension-developer-e2e
extension-developer-e2e: $(OPERATOR_SDK) $(KUSTOMIZE) #EXHELP Run extension create, upgrade and delete tests.
test/extension-developer-e2e/setup.sh $(OPERATOR_SDK) $(CONTAINER_RUNTIME) $(KUSTOMIZE) ${LOCAL_REGISTRY_HOST} ${CLUSTER_REGISTRY_HOST}
extension-developer-e2e: export OPERATOR_SDK := $(OPERATOR_SDK)
extension-developer-e2e: export CONTAINER_RUNTIME := $(CONTAINER_RUNTIME)
extension-developer-e2e: $(OPERATOR_SDK) #EXHELP Run extension create, upgrade and delete tests.
go test -count=1 -v ./test/extension-developer-e2e/...

UNIT_TEST_DIRS := $(shell go list ./... | grep -vE "/test/|/testutils")
UNIT_TEST_DIRS := $(shell go list ./... | grep -vE "/test/|/testutils") $(shell go list ./test/internal/...)
COVERAGE_UNIT_DIR := $(ROOT_DIR)/coverage/unit

.PHONY: envtest-k8s-bins #HELP Uses setup-envtest to download and install the binaries required to run ENVTEST-test based locally at the project/bin directory.
Expand All @@ -298,15 +291,6 @@ test-regression: #HELP Run regression test
rm -rf $(COVERAGE_REGRESSION_DIR) && mkdir -p $(COVERAGE_REGRESSION_DIR)
go test -count=1 -v ./test/regression/... -cover -coverprofile ${ROOT_DIR}/coverage/regression.out -test.gocoverdir=$(COVERAGE_REGRESSION_DIR)

.PHONY: image-registry
E2E_REGISTRY_IMAGE=localhost/e2e-test-registry:devel
image-registry: export GOOS=linux
image-registry: export GOARCH=amd64
image-registry: ## Build the testdata catalog used for e2e tests and push it to the image registry
go build $(GO_BUILD_FLAGS) $(GO_BUILD_EXTRA_FLAGS) -tags '$(GO_BUILD_TAGS)' -ldflags '$(GO_BUILD_LDFLAGS)' -gcflags '$(GO_BUILD_GCFLAGS)' -asmflags '$(GO_BUILD_ASMFLAGS)' -o ./testdata/push/bin/push ./testdata/push/push.go
$(CONTAINER_RUNTIME) build -f ./testdata/Dockerfile -t $(E2E_REGISTRY_IMAGE) ./testdata
$(KIND) load docker-image $(E2E_REGISTRY_IMAGE) --name $(KIND_CLUSTER_NAME)
./testdata/build-test-registry.sh $(E2E_REGISTRY_NAMESPACE) $(E2E_REGISTRY_NAME) $(E2E_REGISTRY_IMAGE)

# When running the e2e suite, you can set the ARTIFACT_PATH variable to the absolute path
# of the directory for the operator-controller e2e tests to store the artifacts, which
Expand All @@ -320,7 +304,7 @@ test-e2e: GO_BUILD_EXTRA_FLAGS := -cover
test-e2e: COVERAGE_NAME := e2e
test-e2e: export MANIFEST := $(STANDARD_RELEASE_MANIFEST)
test-e2e: export INSTALL_DEFAULT_CATALOGS := false
test-e2e: run-internal image-registry prometheus e2e e2e-coverage kind-clean #HELP Run e2e test suite on local kind cluster
test-e2e: run-internal prometheus e2e e2e-coverage kind-clean #HELP Run e2e test suite on local kind cluster

.PHONY: test-experimental-e2e
test-experimental-e2e: SOURCE_MANIFEST := $(EXPERIMENTAL_E2E_MANIFEST)
Expand All @@ -332,7 +316,7 @@ test-experimental-e2e: export MANIFEST := $(EXPERIMENTAL_RELEASE_MANIFEST)
test-experimental-e2e: export INSTALL_DEFAULT_CATALOGS := false
test-experimental-e2e: PROMETHEUS_VALUES := helm/prom_experimental.yaml
test-experimental-e2e: E2E_TIMEOUT := 15m
test-experimental-e2e: run-internal image-registry prometheus e2e e2e-coverage kind-clean #HELP Run experimental e2e test suite on local kind cluster
test-experimental-e2e: run-internal prometheus e2e e2e-coverage kind-clean #HELP Run experimental e2e test suite on local kind cluster

.PHONY: prometheus
prometheus: PROMETHEUS_NAMESPACE := olmv1-system
Expand All @@ -349,7 +333,7 @@ test-extension-developer-e2e: SOURCE_MANIFEST := $(STANDARD_E2E_MANIFEST)
test-extension-developer-e2e: KIND_CLUSTER_NAME := operator-controller-ext-dev-e2e
test-extension-developer-e2e: export INSTALL_DEFAULT_CATALOGS := false
test-extension-developer-e2e: export MANIFEST := $(STANDARD_RELEASE_MANIFEST)
test-extension-developer-e2e: run-internal image-registry extension-developer-e2e kind-clean #HELP Run extension-developer e2e on local kind cluster
test-extension-developer-e2e: run-internal extension-developer-e2e kind-clean #HELP Run extension-developer e2e on local kind cluster

.PHONY: run-latest-release
run-latest-release:
Expand Down
118 changes: 118 additions & 0 deletions docs/superpowers/specs/2026-04-13-e2e-test-isolation-design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# E2E Test Isolation: Per-Scenario Catalogs via Dynamic OCI Image Building
Copy link
Copy Markdown
Contributor

@camilamacedo86 camilamacedo86 Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joelanford should we get it merged?
It might be nice have the design of the tests but should this dir be the correct one/
I think it was generated by CLAUDE to address the need.

Copy link
Copy Markdown
Member Author

@joelanford joelanford Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have a directory for this kind of thing? I do think we should merge this kind of doc, and I was definitely intending to have this exact discussion.


## Problem

E2E test scenarios previously shared cluster-scoped resources (ClusterCatalogs, CRDs, packages),
causing cascading failures when one scenario left state behind. Parallelism was impossible because
scenarios conflicted on shared resource names.

## Solution

Each scenario dynamically builds and pushes its own bundle and catalog OCI images at test time,
parameterized by scenario ID. All cluster-scoped resource names include the scenario ID, making
conflicts structurally impossible.

```
Scenario starts
-> Generate parameterized bundle manifests (CRD names, deployments, etc. include scenario ID)
-> Build + push bundle OCI images to e2e registry via go-containerregistry
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tmshort WDYT? Can it work on downstream?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working on that! #2651 (comment)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've got this PR updated to keep around the essentials needed to avoid (hopefully) avoid breaking downstream. I've also got a new downstream PR that contains no downstream changes (just cherry-pick from upstream, resolve conflicts, and vendor): openshift/operator-framework-operator-controller#700

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-> Generate FBC catalog config referencing those bundle image refs
-> Build + push catalog OCI image to e2e registry
-> Create ClusterCatalog pointing at the catalog image
-> Run scenario steps
-> Cleanup all resources (including catalog)
```

### Key Properties

- Every cluster-scoped resource name includes the scenario ID -- no conflicts by construction.
- Failed scenario state is preserved for debugging without affecting other scenarios.
- Parallelism (`Concurrency > 1`) is safe without further changes.
- Adding new scenarios requires zero coordination with existing ones.

## Builder API (`test/e2e/catalog/`)

Bundles are defined as components of a catalog. A single `Build()` call builds and pushes
all bundle images, generates the FBC, and pushes the catalog image:

```go
cat := catalog.NewCatalog("test", scenarioID,
catalog.WithPackage("test",
catalog.Bundle("1.0.0", catalog.WithCRD(), catalog.WithDeployment(), catalog.WithConfigMap()),
catalog.Bundle("1.2.0", catalog.WithCRD(), catalog.WithDeployment()),
catalog.Channel("beta", catalog.Entry("1.0.0"), catalog.Entry("1.2.0")),
),
)
result, err := cat.Build(ctx, "v1", localRegistry, clusterRegistry)
// result.CatalogName = "test-catalog-{scenarioID}"
// result.CatalogImageRef = "{clusterRegistry}/e2e/test-catalog-{scenarioID}:v1"
// result.PackageNames = {"test": "test-{scenarioID}"}
```

### Bundle Options

- `WithCRD()` -- CRD with group `e2e-{id}.e2e.operatorframework.io`
- `WithDeployment()` -- Deployment named `test-operator-{id}` (includes CSV, script ConfigMap, NetworkPolicy)
- `WithConfigMap()` -- additional test ConfigMap
- `WithInstallMode(modes...)` -- sets supported install modes on the CSV
- `WithLargeCRD(fieldCount)` -- CRD with many fields for large bundle testing
- `WithClusterRegistry(host)` -- overrides the cluster-side registry host (for mirror testing)
- `StaticBundleDir(dir)` -- reads pre-built bundle manifests without parameterization (e.g. webhook-operator)
- `BadImage()` -- uses an invalid container image to trigger ImagePullBackOff
- `WithBundleProperty(type, value)` -- adds a property to bundle metadata

## Feature File Conventions

Feature files define catalogs inline via data tables:

```gherkin
Background:
Given OLM is available
And an image registry is available
And a catalog "test" with packages:
| package | version | channel | replaces | contents |
| test | 1.0.0 | alpha | | CRD, Deployment, ConfigMap |
| test | 1.0.1 | alpha | 1.0.0 | CRD, Deployment, ConfigMap |
| test | 1.2.0 | beta | | CRD, Deployment |
```

### Variable Substitution

Templates in feature file YAML use these variables:

| Variable | Expansion | Example |
|----------|-----------|---------|
| `${NAME}` | ClusterExtension name | `ce-abc123` |
| `${TEST_NAMESPACE}` | Scenario namespace | `ns-abc123` |
| `${SCENARIO_ID}` | Unique scenario identifier | `abc123` |
| `${PACKAGE:<name>}` | Parameterized package name | `test-abc123` |
| `${CATALOG:<name>}` | ClusterCatalog resource name | `test-catalog-abc123` |
| `${COS_NAME}` | ClusterObjectSet name | `cos-abc123` |

### Naming Conventions

| Resource | Pattern |
|----------|---------|
| CRD group | `e2e-{id}.e2e.operatorframework.io` |
| Deployment | `test-operator-{id}` |
| Package name (FBC) | `{package}-{id}` |
| Bundle image | `{registry}/bundles/{package}-{id}:v{version}` |
| Catalog image | `{registry}/e2e/{name}-catalog-{id}:{tag}` |
| ClusterCatalog | `{name}-catalog-{id}` |
| Namespace | `ns-{id}` |
| ClusterExtension | `ce-{id}` |

## Registry Access

An in-cluster OCI registry (`test/internal/registry/`) stores bundle and catalog images.
The registry runs as a ClusterIP Service; there is no NodePort or kind `extraPortMappings`.

The test runner reaches the registry via **Kubernetes port-forward** (SPDY through the API
server), which works regardless of the cluster's network topology. A `sync.OnceValues` in the
step definitions starts the port-forward once and returns the dynamically assigned
`localhost:<port>` address used for all `crane.Push` / `crane.Tag` calls.

In-cluster components (e.g. the catalog unpacker) pull images using the Service DNS name
(`docker-registry.operator-controller-e2e.svc.cluster.local:5000`), resolved by CoreDNS.
Containerd on the node is never involved because the registry only holds OCI artifacts
consumed by Go code, not container images for pods.
4 changes: 4 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ require (
github.com/containerd/typeurl/v2 v2.2.3 // indirect
github.com/containers/libtrust v0.0.0-20230121012942-c1716e8a8d01 // indirect
github.com/containers/ocicrypt v1.2.1 // indirect
github.com/creack/pty v1.1.24 // indirect
github.com/cucumber/gherkin/go/v26 v26.2.0 // indirect
github.com/cucumber/messages/go/v21 v21.0.1 // indirect
github.com/cyberphone/json-canonicalization v0.0.0-20241213102144-19d51d7fe467 // indirect
Expand Down Expand Up @@ -141,6 +142,7 @@ require (
github.com/google/gnostic-models v0.7.1 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/gorilla/mux v1.8.1 // indirect
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect
github.com/gosuri/uitable v0.0.4 // indirect
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.7 // indirect
Expand Down Expand Up @@ -172,6 +174,7 @@ require (
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/moby/locker v1.0.1 // indirect
github.com/moby/spdystream v0.5.0 // indirect
github.com/moby/sys/capability v0.4.0 // indirect
github.com/moby/sys/mountinfo v0.7.2 // indirect
github.com/moby/sys/sequential v0.6.0 // indirect
Expand All @@ -182,6 +185,7 @@ require (
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
github.com/nxadm/tail v1.4.11 // indirect
github.com/onsi/gomega v1.39.1 // indirect
github.com/opencontainers/runtime-spec v1.3.0 // indirect
Expand Down
12 changes: 10 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d h1:licZJFw2RwpH
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d/go.mod h1:asat636LX7Bqt5lYEZ27JNDcqxfjdBQuJ/MM4CN/Lzo=
github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ=
github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw=
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so=
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
Expand Down Expand Up @@ -87,8 +89,8 @@ github.com/coreos/go-systemd/v22 v22.6.0 h1:aGVa/v8B7hpb0TKl0MWoAavPDmHvobFe5R5z
github.com/coreos/go-systemd/v22 v22.6.0/go.mod h1:iG+pp635Fo7ZmV/j14KUcmEyWF+0X7Lua8rrTWzYgWU=
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY=
github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4=
github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s=
github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE=
github.com/cucumber/gherkin/go/v26 v26.2.0 h1:EgIjePLWiPeslwIWmNQ3XHcypPsWAHoMCz/YEBKP4GI=
github.com/cucumber/gherkin/go/v26 v26.2.0/go.mod h1:t2GAPnB8maCT4lkHL99BDCVNzCh1d7dBhCLt150Nr/0=
github.com/cucumber/godog v0.15.1 h1:rb/6oHDdvVZKS66hrhpjFQFHjthFSrQBCOI1LwshNTI=
Expand Down Expand Up @@ -274,6 +276,8 @@ github.com/gorilla/handlers v1.5.2 h1:cLTUSsNkgcwhgRqvCNmdbRWG0A3N4F+M2nWKdScwyE
github.com/gorilla/handlers v1.5.2/go.mod h1:dX+xVpaxdSw+q0Qek8SSsl3dfMk3jNddUkMzo0GtH0w=
github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=
github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 h1:JeSE6pjso5THxAzdVpqr6/geYxZytqFMBCOtn/ujyeo=
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674/go.mod h1:r4w70xmWCQKmi1ONH4KIaBptdivuRPyosB9RmPlGEwA=
github.com/gosuri/uitable v0.0.4 h1:IG2xLKRvErL3uhY6e1BylFzG+aJiwQviDDTfOKeKTpY=
github.com/gosuri/uitable v0.0.4/go.mod h1:tKR86bXuXPZazfOTG1FIzvjIdXzd0mo4Vtn16vt0PJo=
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJrOjhax5N+uePQ0Fh1Z7PheYoUI/0nzkPA=
Expand Down Expand Up @@ -369,6 +373,8 @@ github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zx
github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
github.com/moby/locker v1.0.1 h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg=
github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc=
github.com/moby/spdystream v0.5.0 h1:7r0J1Si3QO/kjRitvSLVVFUjxMEb/YLj6S9FF62JBCU=
github.com/moby/spdystream v0.5.0/go.mod h1:xBAYlnt/ay+11ShkdFKNAG7LsyK/tmNBVvVOwrfMgdI=
github.com/moby/sys/capability v0.4.0 h1:4D4mI6KlNtWMCM1Z/K0i7RV1FkX+DBDHKVJpCndZoHk=
github.com/moby/sys/capability v0.4.0/go.mod h1:4g9IK291rVkms3LKCDOoYlnV8xKwoDTpIrNEE35Wq0I=
github.com/moby/sys/mountinfo v0.7.2 h1:1shs6aH5s4o5H2zQLn796ADW1wMrIwHsyJ2v9KouLrg=
Expand All @@ -393,6 +399,8 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU=
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus=
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
github.com/nxadm/tail v1.4.11 h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY=
github.com/nxadm/tail v1.4.11/go.mod h1:OTaG3NK980DZzxbRq6lEuzgU+mug70nY11sMd4JXXHc=
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
Expand Down

This file was deleted.

5 changes: 0 additions & 5 deletions hack/kind-config/containerd/certs.d/go.mod

This file was deleted.

12 changes: 6 additions & 6 deletions internal/operator-controller/applier/boxcutter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ import (
"github.com/operator-framework/operator-controller/internal/operator-controller/applier"
"github.com/operator-framework/operator-controller/internal/operator-controller/authorization"
"github.com/operator-framework/operator-controller/internal/operator-controller/labels"
"github.com/operator-framework/operator-controller/internal/operator-controller/rukpak/util/testing/bundlefs"
"github.com/operator-framework/operator-controller/internal/operator-controller/rukpak/util/testing/clusterserviceversion"
bundlecsv "github.com/operator-framework/operator-controller/internal/testing/bundle/csv"
bundlefs "github.com/operator-framework/operator-controller/internal/testing/bundle/fs"
)

var (
dummyBundle = bundlefs.Builder().
WithPackageName("test-package").
WithCSV(clusterserviceversion.Builder().WithName("test-csv").Build()).
WithCSV(bundlecsv.Builder().WithName("test-csv").Build()).
Build()
)

Expand Down Expand Up @@ -313,7 +313,7 @@ func Test_SimpleRevisionGenerator_GenerateRevision_BundleAnnotations(t *testing.
WithPackageName("test-package").
WithBundleProperty("olm.bundle.property", "some-value").
WithBundleProperty("olm.another.bundle.property", "some-other-value").
WithCSV(clusterserviceversion.Builder().WithName("test-csv").Build()).
WithCSV(bundlecsv.Builder().WithName("test-csv").Build()).
Build()

rev, err := b.GenerateRevision(t.Context(), bundleFS, ext, map[string]string{}, map[string]string{})
Expand All @@ -327,7 +327,7 @@ func Test_SimpleRevisionGenerator_GenerateRevision_BundleAnnotations(t *testing.
t.Run("olm.properties should not be present if there are no bundle properties", func(t *testing.T) {
bundleFS := bundlefs.Builder().
WithPackageName("test-package").
WithCSV(clusterserviceversion.Builder().WithName("test-csv").Build()).
WithCSV(bundlecsv.Builder().WithName("test-csv").Build()).
Build()

rev, err := b.GenerateRevision(t.Context(), bundleFS, ext, map[string]string{}, map[string]string{})
Expand All @@ -342,7 +342,7 @@ func Test_SimpleRevisionGenerator_GenerateRevision_BundleAnnotations(t *testing.
bundleFS := bundlefs.Builder().
WithPackageName("test-package").
WithBundleProperty("olm.bundle.property", "some-value").
WithCSV(clusterserviceversion.Builder().
WithCSV(bundlecsv.Builder().
WithName("test-csv").
WithAnnotations(map[string]string{
"some.csv.annotation": "some-other-value",
Expand Down
Loading
Loading