Skip to content

CLID-602: Test for enclave scenario#1411

Open
nidangavali wants to merge 1 commit into
openshift:mainfrom
nidangavali:CLID-602
Open

CLID-602: Test for enclave scenario#1411
nidangavali wants to merge 1 commit into
openshift:mainfrom
nidangavali:CLID-602

Conversation

@nidangavali
Copy link
Copy Markdown
Contributor

@nidangavali nidangavali commented May 19, 2026

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Github / Jira issue:

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Code Improvements (Refactoring, Performance, CI upgrades, etc)
  • Internal repo assets (diagrams / docs on github repo)
  • This change requires a documentation update on openshift docs

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.

Expected Outcome

Please describe the outcome expected from the tests.

Summary by CodeRabbit

  • Tests
    • Added an integration test covering a multi-stage mirror-to-mirror enclave workflow, including validation of mirrored images, catalog contents, excluded packages, and IDMS references.
    • Added helper utilities to assert catalog/package presence/absence, log mirror run diagnostics, and compare registry repository sets.
    • Added ImageSetConfiguration test manifests for the enclave multi-stage workflow.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label May 19, 2026
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented May 19, 2026

@nidangavali: This pull request references CLID-602 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the sub-task to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Github / Jira issue:

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Code Improvements (Refactoring, Performance, CI upgrades, etc)
  • Internal repo assets (diagrams / docs on github repo)
  • This change requires a documentation update on openshift docs

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.

Expected Outcome

Please describe the outcome expected from the tests.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 19, 2026

Walkthrough

Adds an enclave mirror-to-mirror integration test (two-step flow), two ISC templates (step-1 filters, step-2 full with placeholder), and test helpers to validate mirrored catalogs, image sets, excluded packages, IDMS, and registry parity.

Changes

Enclave Integration Test

Layer / File(s) Summary
Enclave ISC templates
tests/integration/testdata/imagesetconfigs/enclave/isc-enclave-source.yaml, tests/integration/testdata/imagesetconfigs/enclave/isc-enclave-full.yaml
Step 1 source ISC defines operator package filters (foo beta channel with version bounds, bar stable channel); Step 2 full ISC uses a __INTERMEDIATE_CATALOG__ placeholder replaced at runtime with the intermediate registry endpoint.
Test validation helpers
tests/integration/helpers_test.go
Four new helpers: expectPackagesNotInMirroredCatalog validates excluded packages are absent from catalog configs, logOcMirrorResult emits execution details to GinkgoWriter, logRegistryRepositories enumerates registry repositories and tags, and expectRegistriesMatch asserts destination and source registry repository sets are identical. Also adds a comment describing referenceWithoutTagOrDigest behavior.
Enclave integration test
tests/integration/enclave_test.go
Main test creates working directories, starts destination registry, runs two MirrorToMirror steps (step 1 from remote catalog with filtering; step 2 from intermediate registry using rendered full ISC), validates operator images in both registries, confirms intermediate/enclave catalogs contain only filtered bundles, checks excluded packages are absent, verifies IDMS content, and asserts repository parity. Includes renderEnclaveFullISC helper to render the step-2 ISC with the intermediate catalog reference.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 9 | ❌ 3

❌ Failed checks (3 warnings)

Check name Status Explanation Resolution
Test Structure And Quality ⚠️ Warning Two assertions lack meaningful failure messages: enclave_test.go line 118 (WriteFile) and helpers_test.go line 793 (RemoveAll), violating requirement #4. Add failure messages to both assertions to aid debugging when they fail, e.g., "failed to write ISC file" and "failed to cleanup catalog configs".
Microshift Test Compatibility ⚠️ Warning Test uses ImageDigestMirrorSet (config.openshift.io/v1) API via expectCorrectIDMS helper, which is not available on MicroShift. No MicroShift protection (skip label, apigroup tag, or runtime check). Add [apigroup:config.openshift.io] tag to test name, or add [Skipped:MicroShift] label, or guard test with IsMicroShiftCluster() runtime check.
Ipv6 And Disconnected Network Test Compatibility ⚠️ Warning Test references external public registry quay.io/oc-mirror/oc-mirror-dev:test-catalog-latest, requiring external connectivity incompatible with IPv6-only disconnected CI environments. Either pre-load the catalog image into the test environment, use an internal registry, or add [Skipped:Disconnected] to test name to skip on disconnected clusters.
✅ Passed checks (9 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly indicates a new integration test for enclave scenario, which aligns with the core changes: adding enclave integration tests, test helpers, and test data configurations.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed All Ginkgo test names in the PR (enclave_test.go) are stable and deterministic with no dynamic content, timestamps, UUIDs, pod/namespace names, IP addresses, or string interpolation.
Single Node Openshift (Sno) Test Compatibility ✅ Passed These are oc-mirror CLI integration tests using local registries, not OpenShift cluster e2e tests. No multi-node assumptions. Custom check for cluster e2e tests is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed PR adds only test code and test data (integration tests, test helpers, and ImageSetConfiguration test manifests), not deployment manifests, operator code, or controllers with scheduling constraints.
Ote Binary Stdout Contract ✅ Passed All code changes are test-level functions with no process-level stdout writes. Output uses GinkgoWriter (intercepted by test framework), no fmt.Print/klog/log, and no stdout violations detected.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci openshift-ci Bot requested review from adolfo-ab and aguidirh May 19, 2026 06:05
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (2)
tests/integration/helpers_test.go (1)

783-791: ⚡ Quick win

Ensure extracted catalog dirs are always cleaned up on assertion failures.

configsDir cleanup currently runs only if the loop reaches Line 790. Any earlier failed Expect skips that line and leaks temp dirs.

Proposed fix
 func expectPackagesNotInMirroredCatalog(ctx context.Context, reg registry.Registry, iscPath string, packages ...string) {
 	cfg := parseImageSetConfig(iscPath)

 	for _, op := range cfg.Mirror.Operators {
 		configsDir := extractCatalogConfigs(ctx, reg, op.Catalog)
+		defer func(dir string) {
+			Expect(os.RemoveAll(dir)).To(Succeed())
+		}(configsDir)
+
 		for _, pkg := range packages {
 			pkgDir := filepath.Join(configsDir, pkg)
 			_, err := os.Stat(pkgDir)
 			Expect(os.IsNotExist(err)).To(BeTrue(),
 				"package %q should not be present in mirrored catalog %s", pkg, op.Catalog)
 		}
-		Expect(os.RemoveAll(configsDir)).To(Succeed())
 	}
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/integration/helpers_test.go` around lines 783 - 791, The temp directory
returned by extractCatalogConfigs (configsDir) is only removed at the end and is
skipped on early test failures; immediately after creating configsDir in the
test, register a cleanup (e.g., defer os.RemoveAll(configsDir) or use the test
framework's cleanup helper) so configsDir is always removed even if Expect
assertions fail; update the block that assigns configsDir (where
extractCatalogConfigs(ctx, reg, op.Catalog) is called) to perform the cleanup
registration right away and keep the final Expect(os.RemoveAll(...)) removal
optional/harmless.
tests/integration/enclave_test.go (1)

72-73: ⚡ Quick win

Avoid hardcoding the rendered catalog repository/tag.

Hardcoding oc-mirror/oc-mirror-dev:test-catalog-latest couples step-2 rendering to one specific source template value. Passing the computed catalog ref from step-1 keeps both steps consistent and avoids drift.

Proposed refactor
-iscFullPath := renderEnclaveFullISC(workDir2, iscFullTemplate, testRegistry.Endpoint())
+sourceCfg := parseImageSetConfig(iscSourcePath)
+Expect(sourceCfg.Mirror.Operators).NotTo(BeEmpty(), "step-1 ISC has no operators")
+step1Catalog := sourceCfg.Mirror.Operators[0].Catalog
+catalogRef := testRegistry.Endpoint() + "/" + extractRepositoryName(step1Catalog) + ":" + extractTag(step1Catalog)
+iscFullPath := renderEnclaveFullISC(workDir2, iscFullTemplate, catalogRef)
-func renderEnclaveFullISC(workDir, templateRelPath, intermediateEndpoint string) string {
+func renderEnclaveFullISC(workDir, templateRelPath, catalogRef string) string {
 ...
-	catalogRef := intermediateEndpoint + "/oc-mirror/oc-mirror-dev:test-catalog-latest"
 	content := strings.Replace(string(templateData), placeholder, catalogRef, 1)

Also applies to: 101-108

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/integration/enclave_test.go` around lines 72 - 73, The rendered catalog
ref is being hardcoded in the step-2 template; instead update the call to
renderEnclaveFullISC (and any other uses around lines 101-108) to accept and use
the computed catalog reference produced in step-1 (the variable
returned/assigned there) rather than a literal like
"oc-mirror/oc-mirror-dev:test-catalog-latest", so pass that computed catalog ref
into iscFullTemplate and into renderEnclaveFullISC (and log it via
GinkgoWriter.Printf) to keep step-1 and step-2 consistent.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/integration/enclave_test.go`:
- Around line 27-39: Test depends on an external quay.io catalog (referenced
from the ISC files isc-enclave-source.yaml / isc-enclave-full.yaml used via
iscSource and iscFullTemplate and the test "It should mirror operators to an
intermediate registry and then forward to a second registry"), making the test
flaky/offline-unfriendly; update the test setup to preload that catalog into a
local test registry fixture and point the ISC files (or the
iscSourcePath/iscFullTemplate usage) to the local registry address instead of
quay.io, or add logic in the test to detect offline mode and substitute a
locally seeded registry image before calling the mirroring flow so
expectedBundles remains unchanged and the test no longer depends on public
internet access.
- Around line 104-110: Before calling strings.Replace, assert the template
actually contains the placeholder to catch regressions: check
strings.Contains(string(templateData), placeholder) (or use
Expect(string(templateData)).To(ContainSubstring(placeholder), ...)) referencing
the existing templateData and placeholder variables; then perform the
replacement (content := strings.Replace(...)) and keep the existing
Expect(content).NotTo(ContainSubstring(placeholder), ...) assertion to verify
the placeholder was removed.

---

Nitpick comments:
In `@tests/integration/enclave_test.go`:
- Around line 72-73: The rendered catalog ref is being hardcoded in the step-2
template; instead update the call to renderEnclaveFullISC (and any other uses
around lines 101-108) to accept and use the computed catalog reference produced
in step-1 (the variable returned/assigned there) rather than a literal like
"oc-mirror/oc-mirror-dev:test-catalog-latest", so pass that computed catalog ref
into iscFullTemplate and into renderEnclaveFullISC (and log it via
GinkgoWriter.Printf) to keep step-1 and step-2 consistent.

In `@tests/integration/helpers_test.go`:
- Around line 783-791: The temp directory returned by extractCatalogConfigs
(configsDir) is only removed at the end and is skipped on early test failures;
immediately after creating configsDir in the test, register a cleanup (e.g.,
defer os.RemoveAll(configsDir) or use the test framework's cleanup helper) so
configsDir is always removed even if Expect assertions fail; update the block
that assigns configsDir (where extractCatalogConfigs(ctx, reg, op.Catalog) is
called) to perform the cleanup registration right away and keep the final
Expect(os.RemoveAll(...)) removal optional/harmless.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 47c1e7d1-6630-4bf6-8644-b21d03c4c5e0

📥 Commits

Reviewing files that changed from the base of the PR and between 2412d1a and b08a2bb.

📒 Files selected for processing (4)
  • tests/integration/enclave_test.go
  • tests/integration/helpers_test.go
  • tests/integration/testdata/imagesetconfigs/enclave/isc-enclave-full.yaml
  • tests/integration/testdata/imagesetconfigs/enclave/isc-enclave-source.yaml

Comment thread tests/integration/enclave_test.go
Comment thread tests/integration/enclave_test.go Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

♻️ Duplicate comments (1)
tests/integration/enclave_test.go (1)

50-54: ⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

Remove public internet dependency from the enclave test path.

Line 53 executes step-1 against an ISC that pulls a public quay.io catalog, which makes this scenario flaky/offline-unfriendly in CI. Please seed/use a local fixture catalog (or explicitly skip when offline) so the test is self-contained.

As per coding guidelines "When new Ginkgo e2e tests are added, check whether they make assumptions about IPv4 networking or require connectivity to external/public internet services."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/integration/enclave_test.go` around lines 50 - 54, The test calls
runner.MirrorToMirror using iscSourcePath that points at a public quay.io
catalog, causing flaky/offline CI runs; update the test to use a local fixture
catalog (seed a local registry image catalog and set iscSourcePath to that
fixture) or add an explicit offline skip guard before the call (e.g., a utility
like SkipIfOffline or a simple network check) so the step-1 mirror does not pull
from the public internet; change the reference passed into runner.MirrorToMirror
(iscSourcePath) and/or the test setup that populates testRegistry so it points
to the seeded local catalog, or wrap the runner.MirrorToMirror invocation with
the offline-skip guard to avoid external network dependency.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Duplicate comments:
In `@tests/integration/enclave_test.go`:
- Around line 50-54: The test calls runner.MirrorToMirror using iscSourcePath
that points at a public quay.io catalog, causing flaky/offline CI runs; update
the test to use a local fixture catalog (seed a local registry image catalog and
set iscSourcePath to that fixture) or add an explicit offline skip guard before
the call (e.g., a utility like SkipIfOffline or a simple network check) so the
step-1 mirror does not pull from the public internet; change the reference
passed into runner.MirrorToMirror (iscSourcePath) and/or the test setup that
populates testRegistry so it points to the seeded local catalog, or wrap the
runner.MirrorToMirror invocation with the offline-skip guard to avoid external
network dependency.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 0c406ab0-fc70-4753-ac02-451be4ed07a0

📥 Commits

Reviewing files that changed from the base of the PR and between b08a2bb and 792a4f1.

📒 Files selected for processing (4)
  • tests/integration/enclave_test.go
  • tests/integration/helpers_test.go
  • tests/integration/testdata/imagesetconfigs/enclave/isc-enclave-full.yaml
  • tests/integration/testdata/imagesetconfigs/enclave/isc-enclave-source.yaml
✅ Files skipped from review due to trivial changes (1)
  • tests/integration/testdata/imagesetconfigs/enclave/isc-enclave-full.yaml

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
tests/integration/helpers_test.go (1)

770-777: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Fix sibling-repository false positives in idmsSourceCoversRef.

The current strings.HasPrefix(ref, src) check incorrectly matches sibling paths (e.g., quay.io/openshift/release-images matches source quay.io/openshift/release), allowing IDMS validation to pass when the exact source is absent. This affects validation of platform releases, operator catalogs, and additional images.

Use exact match or path-boundary check instead:

Proposed fix
 func idmsSourceCoversRef(sources []string, ref string) bool {
 	for _, src := range sources {
-		if strings.HasPrefix(ref, src) {
+		src = strings.TrimSuffix(src, "/")
+		if ref == src || strings.HasPrefix(ref, src+"/") {
 			return true
 		}
 	}
 	return false
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/integration/helpers_test.go` around lines 770 - 777,
idmsSourceCoversRef currently uses strings.HasPrefix(ref, src) which yields
false positives for sibling repository names; update the function to match only
exact repo boundaries by returning true only if ref == src or ref starts with
src + "/" or src + ":" (to allow tags) — i.e., replace the plain HasPrefix check
in idmsSourceCoversRef with a boundary-aware check: ref == src ||
strings.HasPrefix(ref, src+"/") || strings.HasPrefix(ref, src+":").
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@tests/integration/helpers_test.go`:
- Around line 770-777: idmsSourceCoversRef currently uses strings.HasPrefix(ref,
src) which yields false positives for sibling repository names; update the
function to match only exact repo boundaries by returning true only if ref ==
src or ref starts with src + "/" or src + ":" (to allow tags) — i.e., replace
the plain HasPrefix check in idmsSourceCoversRef with a boundary-aware check:
ref == src || strings.HasPrefix(ref, src+"/") || strings.HasPrefix(ref,
src+":").

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: fafc70ed-f18d-445e-9f35-ab5c4fad5068

📥 Commits

Reviewing files that changed from the base of the PR and between 792a4f1 and 94a7355.

📒 Files selected for processing (4)
  • tests/integration/enclave_test.go
  • tests/integration/helpers_test.go
  • tests/integration/testdata/imagesetconfigs/enclave/isc-enclave-full.yaml
  • tests/integration/testdata/imagesetconfigs/enclave/isc-enclave-source.yaml
✅ Files skipped from review due to trivial changes (1)
  • tests/integration/testdata/imagesetconfigs/enclave/isc-enclave-source.yaml

Copy link
Copy Markdown
Contributor

@adolfo-ab adolfo-ab left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label May 20, 2026
@adolfo-ab
Copy link
Copy Markdown
Contributor

@aguidirh can you take a look at this one, since you are more familiar with how enclaves work?

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 20, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: adolfo-ab, nidangavali
Once this PR has been reviewed and has the lgtm label, please assign r4f4 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@nidangavali
Copy link
Copy Markdown
Contributor Author

/retest

1 similar comment
@nidangavali
Copy link
Copy Markdown
Contributor Author

/retest

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 25, 2026

@nidangavali: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Copy link
Copy Markdown
Contributor

@aguidirh aguidirh left a comment

Choose a reason for hiding this comment

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

Thanks for this PR, I added few comments.

Please let me know if you have question about them.

Also, please fill the PR description following the template on .github directory, it is important for future references. If possible include context to the commit message.

Comment thread tests/integration/enclave_test.go
Comment on lines +66 to +67
By("verifying IDMS from the first mirror contains expected content")
expectCorrectIDMS(workDir, iscSourcePath)
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.

I'm not sure if we should test IDMS here since the idea is not to test cluster resources generation.

Comment on lines +62 to +64
By("verifying the intermediate catalog contains only filtered operator bundles")
expectCatalogBundlesMatchISC(ctx, *testRegistry, iscSourcePath, expectedBundles)
expectPackagesNotInMirroredCatalog(ctx, *testRegistry, iscSourcePath, "baz")
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.

Wondering if we should be more focused when testing one feature, for example, when testing enclave support, should we also test if the catalog was filtered or if cluster resources where generated correctly?

cc: @adolfo-ab what do you think about it?

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.

I think we should only test what's necessary and specific to each test. So if the enclave scenarios do not have any particularity wrt to catalog filtering, and we're already checking catalog filtering in other tests, then we don't need to verify that here. Same for cluster resources.

apiVersion: mirror.openshift.io/v2alpha1
mirror:
operators:
- catalog: __INTERMEDIATE_CATALOG__
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.

There is one missing piece here, when we are doing enclave support the catalog will be like the original one, something like - catalog: quay.io/oc-mirror/oc-mirror-dev:test-catalog-latest, using full: true is not the way of testing enclave support. Instead we need to place a registries.conf file on the expected directory and add the mirror map, which will tell the cluster, if you find quay.io/oc-mirror/oc-mirror-dev:test-catalog-latest get it from CUSTOMER_HOST/oc-mirror/oc-mirror-dev:test-catalog-latest

This is also true for other types like releases, helm and additional images.

iscSourcePath := filepath.Join(iscDir, iscSource)

By("starting a second registry for the enclave destination")
secondRegistry, err := registry.Start(ctx, registryConfig, 5001)
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.

Consider using a dynamic port allocation (OS assigned) to avoid conflicts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants