Skip to content

Commit 2a258c4

Browse files
committed
fix: r
Signed-off-by: Ashing Zheng <[email protected]>
1 parent 8b42317 commit 2a258c4

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

test/e2e/crds/v2/status.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,8 @@ spec:
179179
err = yaml.Unmarshal([]byte(serviceYaml), &k8sservice)
180180
Expect(err).NotTo(HaveOccurred(), "unmarshalling service")
181181
oldSpec := k8sservice.Spec
182-
k8sservice.Spec = corev1.ServiceSpec{
183-
Type: corev1.ServiceTypeExternalName,
184-
ExternalName: "invalid.host",
182+
k8sservice.Spec.Selector = map[string]string{
183+
"app.kubernetes.io/name": "nonexistent",
185184
}
186185
newServiceYaml, err := yaml.Marshal(k8sservice)
187186
Expect(err).NotTo(HaveOccurred(), "marshalling service")
@@ -200,8 +199,6 @@ spec:
200199
),
201200
)
202201

203-
time.Sleep(5 * time.Second)
204-
205202
By("update service to original spec")
206203
serviceYaml, err = s.GetOutputFromString("svc", framework.ProviderType, "-o", "yaml")
207204
Expect(err).NotTo(HaveOccurred(), "getting service yaml")

test/e2e/gatewayapi/status.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,8 @@ spec:
135135
err = yaml.Unmarshal([]byte(serviceYaml), &k8sservice)
136136
Expect(err).NotTo(HaveOccurred(), "unmarshalling service")
137137
oldSpec := k8sservice.Spec
138-
k8sservice.Spec = corev1.ServiceSpec{
139-
Type: corev1.ServiceTypeExternalName,
140-
ExternalName: "invalid.host",
138+
k8sservice.Spec.Selector = map[string]string{
139+
"app.kubernetes.io/name": "nonexistent",
141140
}
142141
newServiceYaml, err := yaml.Marshal(k8sservice)
143142
Expect(err).NotTo(HaveOccurred(), "marshalling service")
@@ -156,8 +155,6 @@ spec:
156155
),
157156
)
158157

159-
time.Sleep(5 * time.Second)
160-
161158
By("update service to original spec")
162159
serviceYaml, err = s.GetOutputFromString("svc", framework.ProviderType, "-o", "yaml")
163160
Expect(err).NotTo(HaveOccurred(), "getting service yaml")

0 commit comments

Comments
 (0)