dual stack, services, tests: enclose test setup in a `By` clause
@@ -259,6 +259,7 @@ var _ = SIGDescribe("[Serial]Services", func() {
table.DescribeTable("[Conformance] should be able to reach the vmi based on labels specified on the vmi", func(ipFamily k8sv1.IPFamily) {
serviceName := "myservice"
+ By("setting up resources to expose the VMI via a service", func() {
if ipFamily == k8sv1.IPv6Protocol {
libnet.SkipWhenNotDualStackCluster(virtClient)
@@ -270,6 +271,10 @@ var _ = SIGDescribe("[Serial]Services", func() {
_, err := virtClient.CoreV1().Services(inboundVMI.Namespace).Create(service)
Expect(err).NotTo(HaveOccurred(), "the k8sv1.Service entity should have been created.")
+ })
+
+ By("checking connectivity the the exposed service")
+ var err error
jobCleanup, err = assertConnectivityToService(serviceName, inboundVMI.Namespace, servicePort)
Expect(err).NotTo(HaveOccurred(), "connectivity is expected to the exposed service")
