diff --git a/internal/resolution/variablesources/bundle_deployment_test.go b/internal/resolution/variablesources/bundle_deployment_test.go index 1010d0743..e6ee81b84 100644 --- a/internal/resolution/variablesources/bundle_deployment_test.go +++ b/internal/resolution/variablesources/bundle_deployment_test.go @@ -131,6 +131,6 @@ var _ = Describe("BundleDeploymentVariableSource", func() { bdVariableSource := variablesources.NewBundleDeploymentVariableSource(bundleDeployments, testBundleList, &MockRequiredPackageSource{}) _, err := bdVariableSource.GetVariables(context.Background()) - Expect(err.Error()).To(Equal("bundleImage \"quay.io/operatorhubio/prometheus@sha256:nonexistent\" not found")) + Expect(err.Error()).To(Equal(`bundle with image "quay.io/operatorhubio/prometheus@sha256:nonexistent" not found in available catalogs but is currently installed via BundleDeployment "prometheus"`)) }) }) diff --git a/internal/resolution/variablesources/installed_package.go b/internal/resolution/variablesources/installed_package.go index 1f1f3792e..adfb2af19 100644 --- a/internal/resolution/variablesources/installed_package.go +++ b/internal/resolution/variablesources/installed_package.go @@ -50,7 +50,7 @@ func MakeInstalledPackageVariables( // find corresponding bundle for the installed content resultSet := catalogfilter.Filter(allBundles, catalogfilter.WithBundleImage(bundleImage)) if len(resultSet) == 0 { - return nil, fmt.Errorf("bundleImage %q not found", bundleImage) + return nil, fmt.Errorf("bundle with image %q not found in available catalogs but is currently installed via BundleDeployment %q", bundleImage, bundleDeployment.Name) } sort.SliceStable(resultSet, func(i, j int) bool { diff --git a/internal/resolution/variablesources/installed_package_test.go b/internal/resolution/variablesources/installed_package_test.go index 15937681d..4fd4f7a60 100644 --- a/internal/resolution/variablesources/installed_package_test.go +++ b/internal/resolution/variablesources/installed_package_test.go @@ -321,6 +321,6 @@ func TestMakeInstalledPackageVariables(t *testing.T) { }, ) assert.Nil(t, installedPackages) - assert.ErrorContains(t, err, `bundleImage "registry.io/repo/test-package@v9.0.0" not found`) + assert.ErrorContains(t, err, `bundle with image "registry.io/repo/test-package@v9.0.0" not found in available catalogs but is currently installed via BundleDeployment "bd-0"`) }) }