diff --git a/go.mod b/go.mod index f9306440..5eaa6ea0 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,7 @@ require ( github.com/golang-jwt/jwt/v4 v4.5.2 github.com/google/uuid v1.3.1 github.com/lestrrat-go/jwx/v2 v2.0.21 - github.com/optimizely/go-sdk/v2 v2.4.0 + github.com/optimizely/go-sdk/v2 v2.5.0 github.com/orcaman/concurrent-map v1.0.0 github.com/prometheus/client_golang v1.18.0 github.com/rakyll/statik v0.1.7 diff --git a/go.sum b/go.sum index 97ad5486..644bc686 100644 --- a/go.sum +++ b/go.sum @@ -246,8 +246,8 @@ github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1y github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE= github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= -github.com/optimizely/go-sdk/v2 v2.4.0 h1:EE9FOr1bAT3lKSUOEI3Ywqi/01yVrw+RJY+bI0VMgBs= -github.com/optimizely/go-sdk/v2 v2.4.0/go.mod h1:MusRCFsU7+XzJCoCTgheLoENJSf1iiFYm4KbJqz6BYA= +github.com/optimizely/go-sdk/v2 v2.5.0 h1:M3U6J4Mq3y6GBNKrFAAq6JFtF6o5rPaE2azNx48gYd0= +github.com/optimizely/go-sdk/v2 v2.5.0/go.mod h1:MusRCFsU7+XzJCoCTgheLoENJSf1iiFYm4KbJqz6BYA= github.com/orcaman/concurrent-map v1.0.0 h1:I/2A2XPCb4IuQWcQhBhSwGfiuybl/J0ev9HDbW65HOY= github.com/orcaman/concurrent-map v1.0.0/go.mod h1:Lu3tH6HLW3feq74c2GC+jIMS/K2CFcDWnWD9XkenwhI= github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU= diff --git a/pkg/optimizely/optimizelytest/config.go b/pkg/optimizely/optimizelytest/config.go index a07020a4..bc3cc996 100644 --- a/pkg/optimizely/optimizelytest/config.go +++ b/pkg/optimizely/optimizelytest/config.go @@ -528,10 +528,17 @@ func (c *TestProjectConfig) GetHoldoutList() []entities.Holdout { return []entities.Holdout{} } -// GetHoldoutsForFlag returns all holdouts applicable to the given feature flag. -// In production, this would return a filtered list based on the flag's includedFlags/excludedFlags. +// GetGlobalHoldouts returns all global holdouts (those with IncludedRules == nil), +// evaluated at flag level before any per-rule evaluation. // For this test mock, we return an empty list since no tests currently require holdout logic. -func (c *TestProjectConfig) GetHoldoutsForFlag(featureKey string) []entities.Holdout { +func (c *TestProjectConfig) GetGlobalHoldouts() []entities.Holdout { + return []entities.Holdout{} +} + +// GetHoldoutsForRule returns all local holdouts targeting the given rule ID, +// evaluated per-rule after forced decisions and before audience/traffic checks. +// For this test mock, we return an empty list since no tests currently require holdout logic. +func (c *TestProjectConfig) GetHoldoutsForRule(ruleID string) []entities.Holdout { return []entities.Holdout{} }