@@ -45,7 +45,7 @@ func TestClusterCacheReconciler(t *testing.T) {
4545
4646 // createAndWatchCluster creates a new cluster and ensures the clusterCacheTracker has a clusterAccessor for it
4747 createAndWatchCluster := func (clusterName string , testNamespace * corev1.Namespace , g * WithT ) {
48- t .Log ( fmt . Sprintf ( "Creating a cluster %q" , clusterName ) )
48+ t .Logf ( "Creating a cluster %q" , clusterName )
4949 testCluster := & clusterv1.Cluster {
5050 ObjectMeta : metav1.ObjectMeta {
5151 Name : clusterName ,
@@ -136,7 +136,7 @@ func TestClusterCacheReconciler(t *testing.T) {
136136 defer teardown (t , g , testNamespace )
137137
138138 for _ , clusterName := range []string {"cluster-1" , "cluster-2" , "cluster-3" } {
139- t .Log ( fmt . Sprintf ( "Deleting cluster %q" , clusterName ) )
139+ t .Logf ( "Deleting cluster %q" , clusterName )
140140 obj := & clusterv1.Cluster {
141141 ObjectMeta : metav1.ObjectMeta {
142142 Namespace : testNamespace .Name ,
@@ -145,7 +145,7 @@ func TestClusterCacheReconciler(t *testing.T) {
145145 }
146146 g .Expect (k8sClient .Delete (ctx , obj )).To (Succeed ())
147147
148- t .Log ( fmt . Sprintf ( "Checking cluster %q's clusterAccessor is removed" , clusterName ) )
148+ t .Logf ( "Checking cluster %q's clusterAccessor is removed" , clusterName )
149149 g .Eventually (func () bool { return cct .clusterAccessorExists (util .ObjectKey (obj )) }, timeout ).Should (BeFalse ())
150150 }
151151 })
0 commit comments