@@ -86,8 +86,7 @@ func TestPool(t *testing.T) {
8686 WithScheme (scheme ).
8787 Build ()
8888 pmf := backendmetrics .NewPodMetricsFactory (& backendmetrics.FakePodMetricsClient {}, time .Second )
89- ds := NewDatastore (context .Background (), 0 )
90- ds .SetEndpointFactory (pmf )
89+ ds := NewDatastore (context .Background (), pmf , 0 )
9190 _ = ds .PoolSet (context .Background (), fakeClient , tt .inferencePool )
9291 gotPool , gotErr := ds .PoolGet ()
9392 if diff := cmp .Diff (tt .wantErr , gotErr , cmpopts .EquateErrors ()); diff != "" {
@@ -194,8 +193,7 @@ func TestObjective(t *testing.T) {
194193 for _ , test := range tests {
195194 t .Run (test .name , func (t * testing.T ) {
196195 pmf := backendmetrics .NewPodMetricsFactory (& backendmetrics.FakePodMetricsClient {}, time .Second )
197- ds := NewDatastore (t .Context (), 0 )
198- ds .SetEndpointFactory (pmf )
196+ ds := NewDatastore (t .Context (), pmf , 0 )
199197 for _ , m := range test .existingModels {
200198 ds .ObjectiveSet (m )
201199 }
@@ -329,8 +327,7 @@ func TestMetrics(t *testing.T) {
329327 WithScheme (scheme ).
330328 Build ()
331329 pmf := backendmetrics .NewPodMetricsFactory (test .pmc , time .Millisecond )
332- ds := NewDatastore (ctx , 0 )
333- ds .SetEndpointFactory (pmf )
330+ ds := NewDatastore (ctx , pmf , 0 )
334331 _ = ds .PoolSet (ctx , fakeClient , inferencePool )
335332 for _ , pod := range test .storePods {
336333 ds .PodUpdateOrAddIfNotExist (pod )
@@ -398,8 +395,7 @@ func TestPods(t *testing.T) {
398395 t .Run (test .name , func (t * testing.T ) {
399396 ctx := context .Background ()
400397 pmf := backendmetrics .NewPodMetricsFactory (& backendmetrics.FakePodMetricsClient {}, time .Second )
401- ds := NewDatastore (t .Context (), 0 )
402- ds .SetEndpointFactory (pmf )
398+ ds := NewDatastore (t .Context (), pmf , 0 )
403399 fakeClient := fake .NewFakeClient ()
404400 if err := ds .PoolSet (ctx , fakeClient , inferencePool ); err != nil {
405401 t .Error (err )
@@ -583,8 +579,7 @@ func TestPodInfo(t *testing.T) {
583579 t .Run (test .name , func (t * testing.T ) {
584580 ctx := context .Background ()
585581 pmf := backendmetrics .NewPodMetricsFactory (& backendmetrics.FakePodMetricsClient {}, time .Second )
586- ds := NewDatastore (t .Context (), 0 )
587- ds .SetEndpointFactory (pmf )
582+ ds := NewDatastore (t .Context (), pmf , 0 )
588583 fakeClient := fake .NewFakeClient ()
589584 if err := ds .PoolSet (ctx , fakeClient , test .pool ); err != nil {
590585 t .Error (err )
0 commit comments