Skip to content

Commit c54f6b2

Browse files
committed
templateinstance: wait for registry hostname
Wait for the registry hostname to be published before running the templateinstance readiness test.
1 parent d939fc8 commit c54f6b2

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)