Skip to content

Commit 3daf0ce

Browse files
committed
e2e: Change logging to avoid use of By
1 parent 43c27cd commit 3daf0ce

File tree

5 files changed

+54
-54
lines changed

5 files changed

+54
-54
lines changed

test/e2e/shared/cluster.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func createClusterctlLocalRepository(config *clusterctl.E2EConfig, repositoryFol
5959

6060
// setupBootstrapCluster installs Cluster API components via clusterctl.
6161
func setupBootstrapCluster(config *clusterctl.E2EConfig, scheme *runtime.Scheme, useExistingCluster bool) (bootstrap.ClusterProvider, framework.ClusterProxy) {
62-
Byf("Running setupBootstrapCluster (useExistingCluster: %t)", useExistingCluster)
62+
Logf("Running setupBootstrapCluster (useExistingCluster: %t)", useExistingCluster)
6363

6464
// We only want to set clusterProvider if we create a new bootstrap cluster in this test.
6565
// If we re-use an existing one, we don't want to delete it afterwards, so we don't set it.
@@ -78,7 +78,7 @@ func setupBootstrapCluster(config *clusterctl.E2EConfig, scheme *runtime.Scheme,
7878
// Only use the kubeconfigPath if the current context is the configured kubeContext
7979
// Otherwise we might deploy to the wrong cluster.
8080
// TODO(sbuerin): this logic could be a lot nicer if we could hand over a kubeContext to NewClusterProxy
81-
Byf("Found currentContext %q in %q (configured kubeContext is %q)", kubecfg.CurrentContext, testKubeconfigPath, kubeContext)
81+
Logf("Found currentContext %q in %q (configured kubeContext is %q)", kubecfg.CurrentContext, testKubeconfigPath, kubeContext)
8282
if kubecfg.CurrentContext == kubeContext {
8383
kubeconfigPath = testKubeconfigPath
8484
}

test/e2e/shared/common.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import (
4040
)
4141

4242
func SetupSpecNamespace(ctx context.Context, specName string, e2eCtx *E2EContext) *corev1.Namespace {
43-
Byf("Creating a namespace for hosting the %q test spec", specName)
43+
Logf("Creating a namespace for hosting the %q test spec", specName)
4444
namespace, cancelWatches := framework.CreateNamespaceAndWatchEvents(ctx, framework.CreateNamespaceAndWatchEventsInput{
4545
Creator: e2eCtx.Environment.BootstrapClusterProxy.GetClient(),
4646
ClientSet: e2eCtx.Environment.BootstrapClusterProxy.GetClientSet(),
@@ -54,14 +54,14 @@ func SetupSpecNamespace(ctx context.Context, specName string, e2eCtx *E2EContext
5454
}
5555

5656
func DumpSpecResourcesAndCleanup(ctx context.Context, specName string, namespace *corev1.Namespace, e2eCtx *E2EContext) {
57-
Byf("Running DumpSpecResourcesAndCleanup for namespace %q", namespace.Name)
57+
Logf("Running DumpSpecResourcesAndCleanup for namespace %q", namespace.Name)
5858
// Dump all Cluster API related resources to artifacts before deleting them.
5959
cancelWatches := e2eCtx.Environment.Namespaces[namespace]
6060
dumpSpecResources(ctx, e2eCtx, namespace)
6161

6262
dumpOpenStack(ctx, e2eCtx, e2eCtx.Environment.BootstrapClusterProxy.GetName())
6363

64-
Byf("Dumping all OpenStack server instances in the %q namespace", namespace.Name)
64+
Logf("Dumping all OpenStack server instances in the %q namespace", namespace.Name)
6565
dumpMachines(ctx, e2eCtx, namespace)
6666

6767
if !e2eCtx.Settings.SkipCleanup {
@@ -70,7 +70,7 @@ func DumpSpecResourcesAndCleanup(ctx context.Context, specName string, namespace
7070
Namespace: namespace.Name,
7171
}, e2eCtx.E2EConfig.GetIntervals(specName, "wait-delete-cluster")...)
7272

73-
Byf("Deleting namespace used for hosting the %q test spec", specName)
73+
Logf("Deleting namespace used for hosting the %q test spec", specName)
7474
framework.DeleteNamespace(ctx, framework.DeleteNamespaceInput{
7575
Deleter: e2eCtx.Environment.BootstrapClusterProxy.GetClient(),
7676
Name: namespace.Name,
@@ -207,13 +207,13 @@ func dumpSpecResources(ctx context.Context, e2eCtx *E2EContext, namespace *corev
207207
})
208208
}
209209

210-
func Byf(format string, a ...interface{}) {
211-
By("[" + time.Now().Format(time.RFC3339) + "] " + fmt.Sprintf(format, a...))
210+
func Logf(format string, a ...interface{}) {
211+
fmt.Fprintf(GinkgoWriter, "["+time.Now().Format(time.RFC3339)+"] "+format+"\n", a...)
212212
}
213213

214214
func Debugf(debug bool, format string, a ...interface{}) {
215215
if debug {
216-
By("[DEBUG] [" + time.Now().Format(time.RFC3339) + "] " + fmt.Sprintf(format, a...))
216+
fmt.Fprintf(GinkgoWriter, "[DEBUG] ["+time.Now().Format(time.RFC3339)+"] "+format+"\n", a...)
217217
}
218218
}
219219

@@ -232,6 +232,6 @@ func SetEnvVar(key, value string, private bool) {
232232
printableValue = value
233233
}
234234

235-
Byf("Setting environment variable: key=%s, value=%s", key, printableValue)
235+
Logf("Setting environment variable: key=%s, value=%s", key, printableValue)
236236
_ = os.Setenv(key, value)
237237
}

test/e2e/shared/openstack.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ type ServerExtWithIP struct {
6363

6464
// ensureSSHKeyPair ensures A SSH key is present under the name.
6565
func ensureSSHKeyPair(e2eCtx *E2EContext) {
66-
Byf("Ensuring presence of SSH key %q in OpenStack", DefaultSSHKeyPairName)
66+
Logf("Ensuring presence of SSH key %q in OpenStack", DefaultSSHKeyPairName)
6767

6868
providerClient, clientOpts, _, err := GetTenantProviderClient(e2eCtx)
6969
Expect(err).NotTo(HaveOccurred())
@@ -83,7 +83,7 @@ func ensureSSHKeyPair(e2eCtx *E2EContext) {
8383
}
8484

8585
sshDir := filepath.Join(e2eCtx.Settings.ArtifactFolder, "ssh")
86-
Byf("Storing keypair in %q", sshDir)
86+
Logf("Storing keypair in %q", sshDir)
8787

8888
err = os.MkdirAll(sshDir, 0o750)
8989
Expect(err).NotTo(HaveOccurred())
@@ -96,7 +96,7 @@ func ensureSSHKeyPair(e2eCtx *E2EContext) {
9696
}
9797

9898
func dumpOpenStack(_ context.Context, e2eCtx *E2EContext, bootstrapClusterProxyName string) {
99-
Byf("Running dumpOpenStack")
99+
Logf("Running dumpOpenStack")
100100
logPath := filepath.Join(e2eCtx.Settings.ArtifactFolder, "clusters", bootstrapClusterProxyName, "openstack-resources")
101101
if err := os.MkdirAll(logPath, os.ModePerm); err != nil {
102102
_, _ = fmt.Fprintf(GinkgoWriter, "error creating directory %s: %s\n", logPath, err)

test/e2e/shared/suite.go

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,17 @@ type synchronizedBeforeTestSuiteConfig struct {
5252

5353
// Node1BeforeSuite is the common setup down on the first ginkgo node before the test suite runs.
5454
func Node1BeforeSuite(e2eCtx *E2EContext) []byte {
55-
Byf("Running Node1BeforeSuite")
56-
defer Byf("Finished Node1BeforeSuite")
55+
Logf("Running Node1BeforeSuite")
56+
defer Logf("Finished Node1BeforeSuite")
5757

5858
flag.Parse()
5959
Expect(e2eCtx.Settings.ConfigPath).To(BeAnExistingFile(), "Invalid test suite argument. configPath should be an existing file.")
6060
Expect(os.MkdirAll(e2eCtx.Settings.ArtifactFolder, 0o750)).To(Succeed(), "Invalid test suite argument. Can't create artifacts-folder %q", e2eCtx.Settings.ArtifactFolder)
61-
Byf("Loading the e2e test configuration from %q", e2eCtx.Settings.ConfigPath)
61+
Logf("Loading the e2e test configuration from %q", e2eCtx.Settings.ConfigPath)
6262
e2eCtx.E2EConfig = LoadE2EConfig(e2eCtx.Settings.ConfigPath)
6363

6464
Expect(e2eCtx.E2EConfig.GetVariable(OpenStackCloudYAMLFile)).To(BeAnExistingFile(), "Invalid test suite argument. Value of environment variable OPENSTACK_CLOUD_YAML_FILE should be an existing file: %s", e2eCtx.E2EConfig.GetVariable(OpenStackCloudYAMLFile))
65-
Byf("Loading the clouds.yaml from %q", e2eCtx.E2EConfig.GetVariable(OpenStackCloudYAMLFile))
65+
Logf("Loading the clouds.yaml from %q", e2eCtx.E2EConfig.GetVariable(OpenStackCloudYAMLFile))
6666

6767
// TODO(sbuerin): we always need ci artifacts, because we don't have images for every Kubernetes version
6868
err := filepath.WalkDir(path.Join(e2eCtx.Settings.DataFolder, "infrastructure-openstack"), func(f string, d fs.DirEntry, _ error) error {
@@ -114,13 +114,13 @@ func Node1BeforeSuite(e2eCtx *E2EContext) []byte {
114114

115115
ensureSSHKeyPair(e2eCtx)
116116

117-
Byf("Creating a clusterctl local repository into %q", e2eCtx.Settings.ArtifactFolder)
117+
Logf("Creating a clusterctl local repository into %q", e2eCtx.Settings.ArtifactFolder)
118118
e2eCtx.Environment.ClusterctlConfigPath = createClusterctlLocalRepository(e2eCtx.E2EConfig, filepath.Join(e2eCtx.Settings.ArtifactFolder, "repository"))
119119

120-
Byf("Setting up the bootstrap cluster")
120+
Logf("Setting up the bootstrap cluster")
121121
e2eCtx.Environment.BootstrapClusterProvider, e2eCtx.Environment.BootstrapClusterProxy = setupBootstrapCluster(e2eCtx.E2EConfig, e2eCtx.Environment.Scheme, e2eCtx.Settings.UseExistingCluster)
122122

123-
Byf("Initializing the bootstrap cluster")
123+
Logf("Initializing the bootstrap cluster")
124124
initBootstrapCluster(e2eCtx)
125125

126126
conf := synchronizedBeforeTestSuiteConfig{
@@ -142,8 +142,8 @@ func Node1BeforeSuite(e2eCtx *E2EContext) []byte {
142142

143143
// AllNodesBeforeSuite is the common setup down on each ginkgo parallel node before the test suite runs.
144144
func AllNodesBeforeSuite(e2eCtx *E2EContext, data []byte) {
145-
Byf("Running AllNodesBeforeSuite")
146-
defer Byf("Finished AllNodesBeforeSuite")
145+
Logf("Running AllNodesBeforeSuite")
146+
defer Logf("Finished AllNodesBeforeSuite")
147147

148148
conf := &synchronizedBeforeTestSuiteConfig{}
149149
err := yaml.UnmarshalStrict(data, conf)
@@ -222,20 +222,20 @@ func AllNodesBeforeSuite(e2eCtx *E2EContext, data []byte) {
222222

223223
// AllNodesAfterSuite is cleanup that runs on all ginkgo parallel nodes after the test suite finishes.
224224
func AllNodesAfterSuite(e2eCtx *E2EContext) {
225-
Byf("Running AllNodesAfterSuite")
226-
defer Byf("Finished AllNodesAfterSuite")
225+
Logf("Running AllNodesAfterSuite")
226+
defer Logf("Finished AllNodesAfterSuite")
227227

228-
Byf("Stopping ResourceTicker")
228+
Logf("Stopping ResourceTicker")
229229
if e2eCtx.Environment.ResourceTickerDone != nil {
230230
e2eCtx.Environment.ResourceTickerDone <- true
231231
}
232-
Byf("Stopped ResourceTicker")
232+
Logf("Stopped ResourceTicker")
233233

234-
Byf("Stopping MachineTicker")
234+
Logf("Stopping MachineTicker")
235235
if e2eCtx.Environment.MachineTickerDone != nil {
236236
e2eCtx.Environment.MachineTickerDone <- true
237237
}
238-
Byf("Stopped MachineTicker")
238+
Logf("Stopped MachineTicker")
239239

240240
ctx, cancel := context.WithTimeout(context.TODO(), 5*time.Minute)
241241
defer cancel()
@@ -252,10 +252,10 @@ func AllNodesAfterSuite(e2eCtx *E2EContext) {
252252

253253
// Node1AfterSuite is cleanup that runs on the first ginkgo node after the test suite finishes.
254254
func Node1AfterSuite(e2eCtx *E2EContext) {
255-
Byf("Running Node1AfterSuite")
256-
defer Byf("Finished Node1AfterSuite")
255+
Logf("Running Node1AfterSuite")
256+
defer Logf("Finished Node1AfterSuite")
257257

258-
Byf("Tearing down the management cluster")
258+
Logf("Tearing down the management cluster")
259259
if !e2eCtx.Settings.SkipCleanup {
260260
tearDown(e2eCtx.Environment.BootstrapClusterProvider, e2eCtx.Environment.BootstrapClusterProxy)
261261
}

test/e2e/suites/e2e/e2e_test.go

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ var _ = Describe("e2e tests [PR-Blocking]", func() {
8484

8585
Describe("Workload cluster (default)", func() {
8686
It("It should be creatable and deletable", func() {
87-
shared.Byf("Creating a cluster")
87+
shared.Logf("Creating a cluster")
8888
clusterName := fmt.Sprintf("cluster-%s", namespace.Name)
8989
configCluster := defaultConfigCluster(clusterName, namespace.Name)
9090
configCluster.ControlPlaneMachineCount = pointer.Int64Ptr(3)
@@ -144,7 +144,7 @@ var _ = Describe("e2e tests [PR-Blocking]", func() {
144144

145145
Describe("Workload cluster (external cloud provider)", func() {
146146
It("It should be creatable and deletable", func() {
147-
shared.Byf("Creating a cluster")
147+
shared.Logf("Creating a cluster")
148148
clusterName := fmt.Sprintf("cluster-%s", namespace.Name)
149149
configCluster := defaultConfigCluster(clusterName, namespace.Name)
150150
configCluster.ControlPlaneMachineCount = pointer.Int64Ptr(1)
@@ -166,7 +166,7 @@ var _ = Describe("e2e tests [PR-Blocking]", func() {
166166
Expect(workerMachines).To(HaveLen(1))
167167
Expect(controlPlaneMachines).To(HaveLen(1))
168168

169-
shared.Byf("Waiting for worker nodes to be in Running phase")
169+
shared.Logf("Waiting for worker nodes to be in Running phase")
170170
statusChecks := []framework.MachineStatusCheck{framework.MachinePhaseCheck(string(clusterv1.MachinePhaseRunning))}
171171
machineStatusInput := framework.WaitForMachineStatusCheckInput{
172172
Getter: e2eCtx.Environment.BootstrapClusterProxy.GetClient(),
@@ -185,7 +185,7 @@ var _ = Describe("e2e tests [PR-Blocking]", func() {
185185

186186
Describe("Workload cluster (without lb)", func() {
187187
It("Should create port(s) with custom options", func() {
188-
shared.Byf("Creating a cluster")
188+
shared.Logf("Creating a cluster")
189189
clusterName := fmt.Sprintf("cluster-%s", namespace.Name)
190190
configCluster := defaultConfigCluster(clusterName, namespace.Name)
191191
configCluster.ControlPlaneMachineCount = pointer.Int64Ptr(1)
@@ -207,7 +207,7 @@ var _ = Describe("e2e tests [PR-Blocking]", func() {
207207
Expect(workerMachines).To(HaveLen(1))
208208
Expect(controlPlaneMachines).To(HaveLen(1))
209209

210-
shared.Byf("Creating MachineDeployment with custom port options")
210+
shared.Logf("Creating MachineDeployment with custom port options")
211211
md3Name := clusterName + "-md-3"
212212
testSecurityGroupName := "testSecGroup"
213213
// create required test security group
@@ -242,7 +242,7 @@ var _ = Describe("e2e tests [PR-Blocking]", func() {
242242
InfraMachineTemplate: makeOpenStackMachineTemplateWithPortOptions(namespace.Name, clusterName, md3Name, customPortOptions, machineTags),
243243
})
244244

245-
shared.Byf("Waiting for custom port to be created")
245+
shared.Logf("Waiting for custom port to be created")
246246
var plist []ports.Port
247247
var err error
248248
Eventually(func() int {
@@ -297,28 +297,28 @@ var _ = Describe("e2e tests [PR-Blocking]", func() {
297297
// We can't clean up these networks in a corresponding AfterEach because they will still be in use by the cluster.
298298
// Instead we clean them up after the cluster has been deleted.
299299

300-
shared.Byf("Creating additional networks")
300+
shared.Logf("Creating additional networks")
301301

302302
extraNet1, err = shared.CreateOpenStackNetwork(e2eCtx, fmt.Sprintf("%s-extraNet1", namespace.Name), "10.14.0.0/24")
303303
Expect(err).NotTo(HaveOccurred())
304304
postClusterCleanup = append(postClusterCleanup, func() {
305-
shared.Byf("Deleting additional network %s", extraNet1.Name)
305+
shared.Logf("Deleting additional network %s", extraNet1.Name)
306306
err := shared.DeleteOpenStackNetwork(e2eCtx, extraNet1.ID)
307307
Expect(err).NotTo(HaveOccurred())
308308
})
309309

310310
extraNet2, err = shared.CreateOpenStackNetwork(e2eCtx, fmt.Sprintf("%s-extraNet2", namespace.Name), "10.14.1.0/24")
311311
Expect(err).NotTo(HaveOccurred())
312312
postClusterCleanup = append(postClusterCleanup, func() {
313-
shared.Byf("Deleting additional network %s", extraNet2.Name)
313+
shared.Logf("Deleting additional network %s", extraNet2.Name)
314314
err := shared.DeleteOpenStackNetwork(e2eCtx, extraNet2.ID)
315315
Expect(err).NotTo(HaveOccurred())
316316
})
317317

318318
os.Setenv("CLUSTER_EXTRA_NET_1", extraNet1.ID)
319319
os.Setenv("CLUSTER_EXTRA_NET_2", extraNet2.ID)
320320

321-
shared.Byf("Creating a cluster")
321+
shared.Logf("Creating a cluster")
322322
clusterName = fmt.Sprintf("cluster-%s", namespace.Name)
323323
configCluster = defaultConfigCluster(clusterName, namespace.Name)
324324
configCluster.ControlPlaneMachineCount = pointer.Int64Ptr(1)
@@ -358,10 +358,10 @@ var _ = Describe("e2e tests [PR-Blocking]", func() {
358358

359359
for i := range allMachines {
360360
machine := &allMachines[i]
361-
shared.Byf("Checking ports for machine %s", machine.Name)
361+
shared.Logf("Checking ports for machine %s", machine.Name)
362362
instanceID := getInstanceIDForMachine(machine)
363363

364-
shared.Byf("Fetching ports for instance %s", instanceID)
364+
shared.Logf("Fetching ports for instance %s", instanceID)
365365
ports, err := shared.DumpOpenStackPorts(e2eCtx, ports.ListOpts{
366366
DeviceID: instanceID,
367367
})
@@ -396,15 +396,15 @@ var _ = Describe("e2e tests [PR-Blocking]", func() {
396396

397397
Describe("MachineDeployment misconfigurations", func() {
398398
It("Should fail to create MachineDeployment with invalid subnet or invalid availability zone", func() {
399-
shared.Byf("Creating a cluster")
399+
shared.Logf("Creating a cluster")
400400
clusterName := fmt.Sprintf("cluster-%s", namespace.Name)
401401
configCluster := defaultConfigCluster(clusterName, namespace.Name)
402402
configCluster.ControlPlaneMachineCount = pointer.Int64Ptr(1)
403403
configCluster.WorkerMachineCount = pointer.Int64Ptr(0)
404404
configCluster.Flavor = shared.FlavorDefault
405405
_ = createCluster(ctx, configCluster)
406406

407-
shared.Byf("Creating Machine Deployment with invalid subnet id")
407+
shared.Logf("Creating Machine Deployment with invalid subnet id")
408408
md1Name := clusterName + "-md-1"
409409
framework.CreateMachineDeployment(ctx, framework.CreateMachineDeploymentInput{
410410
Creator: e2eCtx.Environment.BootstrapClusterProxy.GetClient(),
@@ -413,14 +413,14 @@ var _ = Describe("e2e tests [PR-Blocking]", func() {
413413
InfraMachineTemplate: makeOpenStackMachineTemplate(namespace.Name, clusterName, md1Name, "invalid-subnet"),
414414
})
415415

416-
shared.Byf("Looking for failure event to be reported")
416+
shared.Logf("Looking for failure event to be reported")
417417
Eventually(func() bool {
418418
eventList := getEvents(namespace.Name)
419419
subnetError := "Failed to create server: no ports with fixed IPs found on Subnet \"invalid-subnet\""
420420
return isErrorEventExists(namespace.Name, md1Name, "FailedCreateServer", subnetError, eventList)
421421
}, e2eCtx.E2EConfig.GetIntervals(specName, "wait-worker-nodes")...).Should(BeTrue())
422422

423-
shared.Byf("Creating Machine Deployment in an invalid Availability Zone")
423+
shared.Logf("Creating Machine Deployment in an invalid Availability Zone")
424424
md2Name := clusterName + "-md-2"
425425
framework.CreateMachineDeployment(ctx, framework.CreateMachineDeploymentInput{
426426
Creator: e2eCtx.Environment.BootstrapClusterProxy.GetClient(),
@@ -429,7 +429,7 @@ var _ = Describe("e2e tests [PR-Blocking]", func() {
429429
InfraMachineTemplate: makeOpenStackMachineTemplate(namespace.Name, clusterName, md2Name, ""),
430430
})
431431

432-
shared.Byf("Looking for failure event to be reported")
432+
shared.Logf("Looking for failure event to be reported")
433433
Eventually(func() bool {
434434
eventList := getEvents(namespace.Name)
435435
azError := "The requested availability zone is not available"
@@ -461,11 +461,11 @@ var _ = Describe("e2e tests [PR-Blocking]", func() {
461461
// second compute is already up by the time we get here,
462462
// and we don't have to wait.
463463
Eventually(func() []string {
464-
shared.Byf("Waiting for the alternate AZ '%s' to be created", failureDomainAlt)
464+
shared.Logf("Waiting for the alternate AZ '%s' to be created", failureDomainAlt)
465465
return shared.GetComputeAvailabilityZones(e2eCtx)
466466
}, e2eCtx.E2EConfig.GetIntervals(specName, "wait-alt-az")...).Should(ContainElement(failureDomainAlt))
467467

468-
shared.Byf("Creating a cluster")
468+
shared.Logf("Creating a cluster")
469469
clusterName = fmt.Sprintf("cluster-%s", namespace.Name)
470470
configCluster := defaultConfigCluster(clusterName, namespace.Name)
471471
configCluster.ControlPlaneMachineCount = pointer.Int64Ptr(3)
@@ -803,7 +803,7 @@ func makeMachineDeployment(namespace, mdName, clusterName string, failureDomain
803803
}
804804

805805
func waitForDaemonSetRunning(ctx context.Context, ctrlClient crclient.Client, namespace, name string) {
806-
shared.Byf("Ensuring DaemonSet %s is running", name)
806+
shared.Logf("Ensuring DaemonSet %s is running", name)
807807
daemonSet := &appsv1.DaemonSet{}
808808
Eventually(
809809
func() (bool, error) {
@@ -816,7 +816,7 @@ func waitForDaemonSetRunning(ctx context.Context, ctrlClient crclient.Client, na
816816
}
817817

818818
func waitForNodesReadyWithoutCCMTaint(ctx context.Context, ctrlClient crclient.Client, nodeCount int) {
819-
shared.Byf("Waiting for the workload nodes to be ready")
819+
shared.Logf("Waiting for the workload nodes to be ready")
820820
Eventually(func() (int, error) {
821821
nodeList := &corev1.NodeList{}
822822
if err := ctrlClient.List(ctx, nodeList); err != nil {
@@ -853,15 +853,15 @@ func createTestVolumeType(e2eCtx *shared.E2EContext) {
853853
volumeClient, err := openstack.NewBlockStorageV3(providerClient, gophercloud.EndpointOpts{Region: clientOpts.RegionName})
854854
Expect(err).NotTo(HaveOccurred())
855855

856-
shared.Byf("Creating test volume type")
856+
shared.Logf("Creating test volume type")
857857
_, err = volumetypes.Create(volumeClient, &volumetypes.CreateOpts{
858858
Name: e2eCtx.E2EConfig.GetVariable(shared.OpenStackVolumeTypeAlt),
859859
Description: "Test volume type",
860860
IsPublic: pointer.BoolPtr(true),
861861
ExtraSpecs: map[string]string{},
862862
}).Extract()
863863
if capoerrors.IsConflict(err) {
864-
shared.Byf("Volume type already exists. This may happen in development environments, but it is not expected in CI.")
864+
shared.Logf("Volume type already exists. This may happen in development environments, but it is not expected in CI.")
865865
return
866866
}
867867
Expect(err).NotTo(HaveOccurred())

0 commit comments

Comments
 (0)