@@ -20,6 +20,7 @@ import (
2020 "github.com/seldonio/seldon-core/tests/integration/godog/scenario/assertions"
2121 "gopkg.in/yaml.v3"
2222 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
23+ "k8s.io/utils/ptr"
2324)
2425
2526type Model struct {
@@ -63,7 +64,7 @@ func LoadModelSteps(scenario *godog.ScenarioContext, w *World) {
6364 scenario .Step (`^the model (?:should )?eventually become(?:s)? Ready$` , func () error {
6465 return w .CurrentModel .ModelReady (w .WatcherStorage )
6566 })
66- scenario .Step (`^the model status message should be "([^"]+)"$` , w .CurrentModel .AssertModelStatus )
67+ scenario .Step (`^the model status message should eventually be "([^"]+)"$` , w .CurrentModel .AssertModelStatus )
6768}
6869
6970func LoadExplicitModelSteps (scenario * godog.ScenarioContext , w * World ) {
@@ -170,12 +171,16 @@ func (m *Model) Reset(world *World) {
170171}
171172
172173func (m * Model ) SetMinReplicas (replicas int ) {
173-
174+ m . model . Spec . ScalingSpec . MinReplicas = ptr . To ( int32 ( replicas ))
174175}
175176
176- func (m * Model ) SetMaxReplicas (replicas int ) {}
177+ func (m * Model ) SetMaxReplicas (replicas int ) {
178+ m .model .Spec .ScalingSpec .MaxReplicas = ptr .To (int32 (replicas ))
179+ }
177180
178- func (m * Model ) SetReplicas (replicas int ) {}
181+ func (m * Model ) SetReplicas (replicas int ) {
182+ m .model .Spec .ScalingSpec .Replicas = ptr .To (int32 (replicas ))
183+ }
179184
180185// ApplyModel model is aware of namespace and testsuite config and it might add extra information to the cr that the step hasn't added like namespace
181186func (m * Model ) ApplyModel (k * k8sclient.K8sClient ) error {
0 commit comments