Skip to content

Commit

Permalink
e2e: Fix authentication issue when connecting to the OCP image registry
Browse files Browse the repository at this point in the history
Signed-off-by: timflannagan <timflannagan@gmail.com>
  • Loading branch information
timflannagan committed Mar 23, 2022
1 parent 3604159 commit c970cc6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/e2e/catalog_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ import (
"github.com/operator-framework/operator-lifecycle-manager/test/e2e/ctx"
)

const (
openshiftregistryFQDN = "image-registry.openshift-image-registry.svc:5000"
catsrcImage = "docker://quay.io/olmtest/catsrc-update-test:"
)

var _ = Describe("Catalog represents a store of bundles which OLM can use to install Operators", func() {
var (
c operatorclient.ClientInterface
Expand Down Expand Up @@ -694,7 +699,7 @@ var _ = Describe("Catalog represents a store of bundles which OLM can use to ins
err = registryPortForward(ns.GetName())
Expect(err).NotTo(HaveOccurred(), "port-forwarding local registry: %s", err)
} else {
registryURL = openshiftregistryFQDN
registryURL = fmt.Sprintf("%s/%s", openshiftregistryFQDN, ns.GetName())
registryAuth, err = openshiftRegistryAuth(c, ns.GetName())
Expect(err).NotTo(HaveOccurred(), "error getting openshift registry authentication: %s", err)
}
Expand Down Expand Up @@ -1155,11 +1160,6 @@ var _ = Describe("Catalog represents a store of bundles which OLM can use to ins
})
})

const (
openshiftregistryFQDN = "image-registry.openshift-image-registry.svc:5000/openshift-operators"
catsrcImage = "docker://quay.io/olmtest/catsrc-update-test:"
)

func getOperatorDeployment(c operatorclient.ClientInterface, namespace string, operatorLabels labels.Set) (*appsv1.Deployment, error) {
deployments, err := c.ListDeploymentsWithLabels(namespace, operatorLabels)
if err != nil || deployments == nil || len(deployments.Items) != 1 {
Expand Down

0 comments on commit c970cc6

Please sign in to comment.