File tree Expand file tree Collapse file tree
internal/engines/scalefromzero Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ import (
3535 poolreconciler "github.com/llm-d/llm-d-workload-variant-autoscaler/internal/controller"
3636 "github.com/llm-d/llm-d-workload-variant-autoscaler/internal/datastore"
3737 "github.com/llm-d/llm-d-workload-variant-autoscaler/internal/utils"
38+ "github.com/llm-d/llm-d-workload-variant-autoscaler/internal/utils/scaletarget"
3839 unittestutil "github.com/llm-d/llm-d-workload-variant-autoscaler/test/utils"
3940 dynamicfake "k8s.io/client-go/dynamic/fake"
4041 ctrl "sigs.k8s.io/controller-runtime"
@@ -472,13 +473,12 @@ func TestNamespacedMetricsSourceLookup(t *testing.T) {
472473 maxConcurrency : 30 ,
473474 }
474475
475- // Get deployments map
476- deployments := map [string ]* appsV1.Deployment {
477- tt .vaNamespace + "/" + deploymentName : dp ,
476+ scaleTargets := map [string ]scaletarget.ScaleTargetAccessor {
477+ tt .vaNamespace + "/" + deploymentName : scaletarget .NewDeploymentAccessor (dp ),
478478 }
479479
480480 // Process the inactive variant
481- err := engine .processInactiveVariant (ctx , deployments , * va , 0 )
481+ err := engine .processInactiveVariant (ctx , scaleTargets , * va , 0 )
482482
483483 if tt .expectSkip {
484484 // When pool is not found (different namespace), we expect nil error (skip)
You can’t perform that action at this time.
0 commit comments