Skip to content

Commit a559f7b

Browse files
committed
fixed datastore unit-test
Signed-off-by: Nir Rozenbaum <[email protected]>
1 parent 9ab92ee commit a559f7b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/epp/datastore/datastore_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ func TestMetrics(t *testing.T) {
342342
WithScheme(scheme).
343343
Build()
344344
podInfoFactory := podinfo.NewPodInfoFactory(map[podinfo.Scraper]*podinfo.ScraperConfig{
345-
&backendmetrics.FakeMetricsScraper{}: podinfo.NewScraperConfig(time.Millisecond, 5*time.Second),
345+
test.fms: podinfo.NewScraperConfig(time.Millisecond, 5*time.Second),
346346
})
347347
ds := NewDatastore(ctx, podInfoFactory)
348348
_ = ds.PoolSet(ctx, fakeClient, inferencePool)
@@ -352,8 +352,8 @@ func TestMetrics(t *testing.T) {
352352
assert.EventuallyWithT(t, func(t *assert.CollectT) {
353353
got := ds.PodGetAll()
354354
metrics := []*backendmetrics.Metrics{}
355-
for _, one := range got {
356-
if podMetrics, ok := one.GetData(backendmetrics.MetricsDataKey); ok {
355+
for _, podInfo := range got {
356+
if podMetrics, ok := podInfo.GetData(backendmetrics.MetricsDataKey); ok {
357357
metrics = append(metrics, podMetrics.(*backendmetrics.Metrics))
358358
}
359359
}

0 commit comments

Comments
 (0)