2323 Lang : "en" ,
2424 }
2525 integrationEntityUpdateFields = Entity {
26- Name : "integration_entity_id" ,
26+ ID : "integration_entity_id" ,
2727 Lookups : []string {"keywords" },
2828 Doc : "integration_entity_doc_updated" ,
2929 }
@@ -168,33 +168,28 @@ func TestIntegrationSamples(t *testing.T) {
168168 // cleanup
169169 c .DeleteSamples ([]Sample {
170170 {
171- Text : "I want to fly SFO" ,
171+ Text : "I want to fly to SFO" ,
172172 },
173173 })
174174
175175 // Deletion takes time
176176 time .Sleep (time .Second * 5 )
177177
178178 // samples test
179- start := 17
180- end := 20
181- _ , validateErr := c .ValidateSamples ([]Sample {
179+ res , validateErr := c .ValidateSamples ([]Sample {
182180 {
183- Text : "I want to fly SFO" ,
181+ Text : "I want to fly to SFO" ,
184182 Entities : []SampleEntity {
185- {
186- Entity : "intent" ,
187- Value : "flight_request" ,
188- },
189183 {
190184 Entity : "wit$location" ,
191185 Value : "SFO" ,
192- Start : & start ,
193- End : & end ,
186+ Start : 17 ,
187+ End : 20 ,
194188 },
195189 },
196190 },
197191 })
192+
198193 if validateErr != nil {
199194 t .Fatalf ("expected nil error, got %v" , validateErr )
200195 }
@@ -214,7 +209,7 @@ func TestIntegrationSamples(t *testing.T) {
214209 // delete samples
215210 _ , delSamplesErr := c .DeleteSamples ([]Sample {
216211 {
217- Text : "I want to fly SFO" ,
212+ Text : "I want to fly to SFO" ,
218213 },
219214 })
220215 if delSamplesErr != nil {
0 commit comments