@@ -45,7 +45,7 @@ func TestClusterCacheReconciler(t *testing.T) {
45
45
46
46
// createAndWatchCluster creates a new cluster and ensures the clusterCacheTracker has a clusterAccessor for it
47
47
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 )
49
49
testCluster := & clusterv1.Cluster {
50
50
ObjectMeta : metav1.ObjectMeta {
51
51
Name : clusterName ,
@@ -136,7 +136,7 @@ func TestClusterCacheReconciler(t *testing.T) {
136
136
defer teardown (t , g , testNamespace )
137
137
138
138
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 )
140
140
obj := & clusterv1.Cluster {
141
141
ObjectMeta : metav1.ObjectMeta {
142
142
Namespace : testNamespace .Name ,
@@ -145,7 +145,7 @@ func TestClusterCacheReconciler(t *testing.T) {
145
145
}
146
146
g .Expect (k8sClient .Delete (ctx , obj )).To (Succeed ())
147
147
148
- t .Log ( fmt . Sprintf ( "Checking cluster %q's clusterAccessor is removed" , clusterName ) )
148
+ t .Logf ( "Checking cluster %q's clusterAccessor is removed" , clusterName )
149
149
g .Eventually (func () bool { return cct .clusterAccessorExists (util .ObjectKey (obj )) }, timeout ).Should (BeFalse ())
150
150
}
151
151
})
0 commit comments