@@ -128,7 +128,7 @@ func TestElasticQuotaController_Run(t *testing.T) {
128
128
},
129
129
want : []* v1alpha1.ElasticQuota {
130
130
testutil .MakeEQ ("t3-ns1" , "t3-eq1" ).
131
- Used (testutil .MakeResourceList ().CPU (0 ).Mem (0 ).Obj ()).Obj (),
131
+ Used (testutil .MakeResourceList ().CPU (3 ).Mem (3 ).Obj ()).Obj (),
132
132
testutil .MakeEQ ("t3-ns2" , "t3-eq2" ).
133
133
Used (testutil .MakeResourceList ().CPU (4 ).Mem (3 ).Obj ()).Obj (),
134
134
},
@@ -217,7 +217,7 @@ func TestElasticQuotaController_Run(t *testing.T) {
217
217
return false , err
218
218
}
219
219
if ! quota .Equals (eq .Status .Used , v .Status .Used ) {
220
- return false , fmt .Errorf ("want %v, got %v" , v .Status .Used , eq .Status .Used )
220
+ return false , fmt .Errorf ("%v: want %v, got %v" , c . name , v .Status .Used , eq .Status .Used )
221
221
}
222
222
}
223
223
return true , nil
@@ -237,7 +237,10 @@ func setUpEQ(ctx context.Context,
237
237
s := scheme .Scheme
238
238
utilruntime .Must (v1alpha1 .AddToScheme (s ))
239
239
240
- client := fake .NewClientBuilder ().WithScheme (s ).Build ()
240
+ client := fake .NewClientBuilder ().
241
+ WithScheme (s ).
242
+ WithStatusSubresource (& v1alpha1.ElasticQuota {}).
243
+ Build ()
241
244
for _ , eq := range eqs {
242
245
err := client .Create (ctx , eq )
243
246
if errors .IsAlreadyExists (err ) {
0 commit comments