Skip to content

Commit 85bcb03

Browse files
authored
Merge pull request #118 from tpantelis/conformance_logging
Log general steps in the conformance tests
2 parents f6fc7dd + c8fdd69 commit 85bcb03

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

conformance/conformance_suite.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,15 @@ func (t *testDriver) createServiceExport(c *clusterClients, serviceExport *v1alp
197197
_, err := c.mcs.MulticlusterV1alpha1().ServiceExports(t.namespace).Create(
198198
ctx, serviceExport, metav1.CreateOptions{})
199199
Expect(err).ToNot(HaveOccurred())
200+
201+
By(fmt.Sprintf("Service \"%s/%s\" exported on cluster %q", t.namespace, helloServiceName, c.name))
200202
}
201203

202204
func (t *testDriver) deleteServiceExport(c *clusterClients) {
203205
Expect(c.mcs.MulticlusterV1alpha1().ServiceExports(t.namespace).Delete(ctx, helloServiceName,
204206
metav1.DeleteOptions{})).ToNot(HaveOccurred())
207+
208+
By(fmt.Sprintf("Service \"%s/%s\" unexported on cluster %q", t.namespace, helloServiceName, c.name))
205209
}
206210

207211
func (t *testDriver) deployHelloService(c *clusterClients, service *corev1.Service) {
@@ -210,8 +214,10 @@ func (t *testDriver) deployHelloService(c *clusterClients, service *corev1.Servi
210214
Expect(err).ToNot(HaveOccurred())
211215
}
212216

213-
_, err := c.k8s.CoreV1().Services(t.namespace).Create(ctx, service, metav1.CreateOptions{})
217+
deployed, err := c.k8s.CoreV1().Services(t.namespace).Create(ctx, service, metav1.CreateOptions{})
214218
Expect(err).ToNot(HaveOccurred())
219+
220+
By(fmt.Sprintf("Service \"%s/%s\" deployed on cluster %q", deployed.Namespace, deployed.Name, c.name))
215221
}
216222

217223
func (t *testDriver) getServiceImport(c *clusterClients, name string) *v1alpha1.ServiceImport {

conformance/endpoint_slice.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@ var _ = Describe("", Label(OptionalLabel, EndpointSliceLabel), func() {
6969
}
7070
}
7171

72-
By("Unexporting the service")
73-
7472
t.deleteServiceExport(&clients[0])
7573

7674
for i, client := range clients {

conformance/service_import.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,12 @@ func testGeneralServiceImport() {
8282
t.ensureServiceImport(&clients[0], t.helloService.Name, fmt.Sprintf(
8383
"the ServiceImport no longer exists after exporting on cluster %q", clients[1].name))
8484

85-
By(fmt.Sprintf("Unexporting the service on the first cluster %q", clients[0].name))
86-
8785
t.deleteServiceExport(&clients[0])
8886

8987
t.ensureServiceImport(&clients[0], t.helloService.Name, fmt.Sprintf(
9088
"the ServiceImport no longer exists after unexporting the service on cluster %q while still exported on cluster %q",
9189
clients[0].name, clients[1].name))
9290

93-
By(fmt.Sprintf("Unexporting the service on the second cluster %q", clients[1].name))
94-
9591
t.deleteServiceExport(&clients[1])
9692

9793
t.awaitNoServiceImport(&clients[0], helloServiceName,
@@ -174,8 +170,6 @@ func testClusterIPServiceImport() {
174170
fmt.Sprintf("ServiceImport on cluster %q has type %q", clients[i].name, serviceImport.Spec.Type)))
175171
}
176172

177-
By("Unexporting the service")
178-
179173
t.deleteServiceExport(&clients[0])
180174

181175
for i := range clients {
@@ -286,8 +280,6 @@ func testHeadlessServiceImport() {
286280
fmt.Sprintf("ServiceImport on cluster %q has type %q", clients[i].name, serviceImport.Spec.Type)))
287281
}
288282

289-
By("Unexporting the service")
290-
291283
t.deleteServiceExport(&clients[0])
292284

293285
for i := range clients {

0 commit comments

Comments
 (0)