From 8489534e0bd249ecb443067dd88d0d56d2063507 Mon Sep 17 00:00:00 2001 From: alonso fabila Date: Mon, 28 Oct 2024 16:59:50 -0600 Subject: [PATCH] Fixes: #1618 e2e change improper use of formatting Signed-off-by: alonso fabila --- e2e/deployers/crud.go | 4 ++-- e2e/dractions/retry.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/e2e/deployers/crud.go b/e2e/deployers/crud.go index 70593c3bd..52aeb1942 100644 --- a/e2e/deployers/crud.go +++ b/e2e/deployers/crud.go @@ -252,7 +252,7 @@ func CreatePlacementDecisionConfigMap(cmName string, cmNamespace string) error { err := util.Ctx.Hub.CtrlClient.Create(context.Background(), configMap) if err != nil { if !errors.IsAlreadyExists(err) { - return fmt.Errorf("could not create configMap: %s", cmName) + return fmt.Errorf("could not create configMap %q", cmName) } util.Ctx.Log.Info("configMap " + cmName + " already Exists") @@ -271,7 +271,7 @@ func DeleteConfigMap(cmName string, cmNamespace string) error { err := util.Ctx.Hub.CtrlClient.Delete(context.Background(), configMap) if err != nil { if !errors.IsNotFound(err) { - return fmt.Errorf("could not delete configMap %s", cmName) + return fmt.Errorf("could not delete configMap %q", cmName) } util.Ctx.Log.Info("configMap " + cmName + " not found") diff --git a/e2e/dractions/retry.go b/e2e/dractions/retry.go index 8e8a7f428..dddcd38e6 100644 --- a/e2e/dractions/retry.go +++ b/e2e/dractions/retry.go @@ -46,7 +46,7 @@ func waitPlacementDecision(client client.Client, namespace string, placementName if time.Since(startTime) > time.Second*time.Duration(util.Timeout) { return "", fmt.Errorf( - "could not get placement decision for %s before timeout, fail", placementName) + "could not get placement decision for %q before timeout, fail", placementName) } time.Sleep(time.Second * time.Duration(util.TimeInterval)) @@ -78,7 +78,7 @@ func waitDRPCReady(client client.Client, namespace string, drpcName string) erro util.Ctx.Log.Info("drpc " + drpcName + " LastGroupSyncTime is nil") } - return fmt.Errorf("drpc %s is not ready yet before timeout, fail", drpcName) + return fmt.Errorf("drpc %q is not ready yet before timeout, fail", drpcName) } time.Sleep(time.Second * time.Duration(util.TimeInterval)) @@ -206,7 +206,7 @@ func waitDRPCDeleted(client client.Client, namespace string, name string) error } if time.Since(startTime) > time.Second*time.Duration(util.Timeout) { - return fmt.Errorf(fmt.Sprintf("drpc %s is not deleted yet before timeout, fail", name)) + return fmt.Errorf(fmt.Sprintf("drpc %q is not deleted yet before timeout, fail", name)) } time.Sleep(time.Second * time.Duration(util.TimeInterval))