Skip to content

Commit 8d0ff96

Browse files
committed
Updated tests cases
1 parent 3d5f6ae commit 8d0ff96

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

splitio/client/input_validator_test.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -703,38 +703,47 @@ func TestNotReadyYet(t *testing.T) {
703703
expectedMessage1 := "{operation}: the SDK is not ready, results may be incorrect for feature flag feature. Make sure to wait for SDK readiness before using this method"
704704
expectedMessage2 := "{operation}: the SDK is not ready, results may be incorrect for feature flags feature, feature_2. Make sure to wait for SDK readiness before using this method"
705705

706+
mW.Reset()
706707
clientNotReady.Treatment("test", "feature", nil)
707708
if !mW.Matches(strings.Replace(expectedMessage1, "{operation}", "Treatment", 1)) {
708709
t.Error("Wrong message")
709710
}
710711

712+
mW.Reset()
711713
clientNotReady.Treatments("test", []string{"feature", "feature_2"}, nil)
712714
if !mW.Matches(strings.Replace(expectedMessage2, "{operation}", "Treatments", 1)) {
713715
t.Error("Wrong message")
714716
}
715717

718+
mW.Reset()
716719
clientNotReady.TreatmentWithConfig("test", "feature", nil)
717720
if !mW.Matches(strings.Replace(expectedMessage1, "{operation}", "TreatmentWithConfig", 1)) {
718721
t.Error("Wrong message")
719722
}
720723

724+
mW.Reset()
721725
clientNotReady.TreatmentsWithConfig("test", []string{"feature", "feature_2"}, nil)
722726
if !mW.Matches(strings.Replace(expectedMessage2, "{operation}", "TreatmentsWithConfig", 1)) {
723727
t.Error("Wrong message", mW.messages)
724728
}
729+
730+
mW.Reset()
725731
expected := "Track: the SDK is not ready, results may be incorrect. Make sure to wait for SDK readiness before using this method"
726732
expectedTrack(clientNotReady.Track("key", "traffic", "eventType", nil, nil), expected, t)
727733

734+
mW.Reset()
728735
maganerNotReady.Split("feature")
729736
if !mW.Matches(strings.Replace(expectedMessage, "{operation}", "Split", 1)) {
730737
t.Error("Wrong message")
731738
}
732739

740+
mW.Reset()
733741
maganerNotReady.Splits()
734742
if !mW.Matches(strings.Replace(expectedMessage, "{operation}", "Splits", 1)) {
735743
t.Error("Wrong message")
736744
}
737745

746+
mW.Reset()
738747
maganerNotReady.SplitNames()
739748
if !mW.Matches(strings.Replace(expectedMessage, "{operation}", "SplitNames", 1)) {
740749
t.Error("Wrong message")

0 commit comments

Comments
 (0)