@@ -61,13 +61,13 @@ func (s *CompositeExperimentTestSuite) TestGetDecision() {
6161 expectedExperimentDecision := ExperimentDecision {
6262 Variation : & expectedVariation ,
6363 }
64- s .mockExperimentService .On ("GetDecision" , s .testDecisionContext , testUserContext , s .options , s . reasons ).Return (expectedExperimentDecision , nil )
64+ s .mockExperimentService .On ("GetDecision" , s .testDecisionContext , testUserContext , s .options ).Return (expectedExperimentDecision , s . reasons , nil )
6565
6666 compositeExperimentService := & CompositeExperimentService {
6767 experimentServices : []ExperimentService {s .mockExperimentService , s .mockExperimentService2 },
6868 logger : logging .GetLogger ("sdkKey" , "ExperimentService" ),
6969 }
70- decision , err := compositeExperimentService .GetDecision (s .testDecisionContext , testUserContext , s .options , s . reasons )
70+ decision , _ , err := compositeExperimentService .GetDecision (s .testDecisionContext , testUserContext , s .options )
7171 s .Equal (expectedExperimentDecision , decision )
7272 s .NoError (err )
7373 s .mockExperimentService .AssertExpectations (s .T ())
@@ -83,18 +83,18 @@ func (s *CompositeExperimentTestSuite) TestGetDecisionFallthrough() {
8383
8484 expectedVariation := testExp1111 .Variations ["2222" ]
8585 expectedExperimentDecision := ExperimentDecision {}
86- s .mockExperimentService .On ("GetDecision" , s .testDecisionContext , testUserContext , s .options , s . reasons ).Return (expectedExperimentDecision , nil )
86+ s .mockExperimentService .On ("GetDecision" , s .testDecisionContext , testUserContext , s .options ).Return (expectedExperimentDecision , s . reasons , nil )
8787
8888 expectedExperimentDecision2 := ExperimentDecision {
8989 Variation : & expectedVariation ,
9090 }
91- s .mockExperimentService2 .On ("GetDecision" , s .testDecisionContext , testUserContext , s .options , s . reasons ).Return (expectedExperimentDecision2 , nil )
91+ s .mockExperimentService2 .On ("GetDecision" , s .testDecisionContext , testUserContext , s .options ).Return (expectedExperimentDecision2 , s . reasons , nil )
9292
9393 compositeExperimentService := & CompositeExperimentService {
9494 experimentServices : []ExperimentService {s .mockExperimentService , s .mockExperimentService2 },
9595 logger : logging .GetLogger ("sdkKey" , "CompositeExperimentService" ),
9696 }
97- decision , err := compositeExperimentService .GetDecision (s .testDecisionContext , testUserContext , s .options , s . reasons )
97+ decision , _ , err := compositeExperimentService .GetDecision (s .testDecisionContext , testUserContext , s .options )
9898
9999 s .NoError (err )
100100 s .Equal (expectedExperimentDecision2 , decision )
@@ -108,16 +108,16 @@ func (s *CompositeExperimentTestSuite) TestGetDecisionNoDecisionsMade() {
108108 ID : "test_user_1" ,
109109 }
110110 expectedExperimentDecision := ExperimentDecision {}
111- s .mockExperimentService .On ("GetDecision" , s .testDecisionContext , testUserContext , s .options , s . reasons ).Return (expectedExperimentDecision , nil )
111+ s .mockExperimentService .On ("GetDecision" , s .testDecisionContext , testUserContext , s .options ).Return (expectedExperimentDecision , s . reasons , nil )
112112
113113 expectedExperimentDecision2 := ExperimentDecision {}
114- s .mockExperimentService2 .On ("GetDecision" , s .testDecisionContext , testUserContext , s .options , s . reasons ).Return (expectedExperimentDecision2 , nil )
114+ s .mockExperimentService2 .On ("GetDecision" , s .testDecisionContext , testUserContext , s .options ).Return (expectedExperimentDecision2 , s . reasons , nil )
115115
116116 compositeExperimentService := & CompositeExperimentService {
117117 experimentServices : []ExperimentService {s .mockExperimentService , s .mockExperimentService2 },
118118 logger : logging .GetLogger ("sdkKey" , "CompositeExperimentService" ),
119119 }
120- decision , err := compositeExperimentService .GetDecision (s .testDecisionContext , testUserContext , s .options , s . reasons )
120+ decision , _ , err := compositeExperimentService .GetDecision (s .testDecisionContext , testUserContext , s .options )
121121
122122 s .NoError (err )
123123 s .Equal (expectedExperimentDecision2 , decision )
@@ -139,12 +139,12 @@ func (s *CompositeExperimentTestSuite) TestGetDecisionReturnsError() {
139139 shouldBeIgnoredDecision := ExperimentDecision {
140140 Variation : & testExp1114Var2225 ,
141141 }
142- s .mockExperimentService .On ("GetDecision" , testDecisionContext , testUserContext , s .options , s . reasons ).Return (shouldBeIgnoredDecision , errors .New ("Error making decision" ))
142+ s .mockExperimentService .On ("GetDecision" , testDecisionContext , testUserContext , s .options ).Return (shouldBeIgnoredDecision , s . reasons , errors .New ("Error making decision" ))
143143
144144 expectedDecision := ExperimentDecision {
145145 Variation : & testExp1114Var2226 ,
146146 }
147- s .mockExperimentService2 .On ("GetDecision" , testDecisionContext , testUserContext , s .options , s . reasons ).Return (expectedDecision , nil )
147+ s .mockExperimentService2 .On ("GetDecision" , testDecisionContext , testUserContext , s .options ).Return (expectedDecision , s . reasons , nil )
148148
149149 compositeExperimentService := & CompositeExperimentService {
150150 experimentServices : []ExperimentService {
@@ -153,7 +153,7 @@ func (s *CompositeExperimentTestSuite) TestGetDecisionReturnsError() {
153153 },
154154 logger : logging .GetLogger ("sdkKey" , "CompositeExperimentService" ),
155155 }
156- decision , err := compositeExperimentService .GetDecision (testDecisionContext , testUserContext , s .options , s . reasons )
156+ decision , _ , err := compositeExperimentService .GetDecision (testDecisionContext , testUserContext , s .options )
157157 s .Equal (expectedDecision , decision )
158158 s .NoError (err )
159159 s .mockExperimentService .AssertExpectations (s .T ())
0 commit comments