Skip to content

Commit 84e1f47

Browse files
Merge pull request #22736 from adambkaplan/wait-registry-hostname-2
Bug 1702743: Wait for internal registry hostname to be published before running e2e test (2)
2 parents 0881722 + c54f6b2 commit 84e1f47

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

test/extended/templates/templateinstance_readiness.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import (
88
g "github.com/onsi/ginkgo"
99
o "github.com/onsi/gomega"
1010

11-
"k8s.io/api/core/v1"
1211
corev1 "k8s.io/api/core/v1"
12+
v1 "k8s.io/api/core/v1"
1313
kerrors "k8s.io/apimachinery/pkg/api/errors"
1414
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1515
"k8s.io/apimachinery/pkg/util/wait"
@@ -101,7 +101,12 @@ var _ = g.Describe("[Conformance][templates] templateinstance readiness test", f
101101

102102
g.Context("", func() {
103103
g.BeforeEach(func() {
104-
err := cli.Run("create").Args("-f", templatefixture).Execute()
104+
// Tests that push to an ImageStreamTag need to wait for the internal registry hostname
105+
// HACK - wait for OpenShift namespace imagestreams to ensure apiserver has right hostname
106+
err := exutil.WaitForOpenShiftNamespaceImageStreams(cli)
107+
o.Expect(err).NotTo(o.HaveOccurred())
108+
109+
err = cli.Run("create").Args("-f", templatefixture).Execute()
105110
o.Expect(err).NotTo(o.HaveOccurred())
106111

107112
template, err = cli.TemplateClient().TemplateV1().Templates(cli.Namespace()).Get("simple-example", metav1.GetOptions{})

0 commit comments

Comments
 (0)