fixing FTConfig dialect test

This commit is contained in:
ofekshenawa 2023-11-17 01:52:22 +02:00
parent 2547d1a0ce
commit aae444eb44
1 changed files with 5 additions and 2 deletions

View File

@ -1115,18 +1115,21 @@ var _ = Describe("RediSearch commands", Label("search"), func() {
})
It("should FTConfigSet and FTConfigGet dialect", Label("search", "ftconfigget", "ftconfigset"), func() {
res, err := client.FTConfigSet(ctx, "DEFAULT_DIALECT", "1").Result()
Expect(err).NotTo(HaveOccurred())
Expect(res).To(BeEquivalentTo("OK"))
defDialect, err := client.FTConfigGet(ctx, "DEFAULT_DIALECT").Result()
Expect(err).NotTo(HaveOccurred())
Expect(defDialect).To(BeEquivalentTo(map[string]interface{}{"DEFAULT_DIALECT": "1"}))
res, err := client.FTConfigSet(ctx, "DEFAULT_DIALECT", "2").Result()
res, err = client.FTConfigSet(ctx, "DEFAULT_DIALECT", "2").Result()
Expect(err).NotTo(HaveOccurred())
Expect(res).To(BeEquivalentTo("OK"))
defDialect, err = client.FTConfigGet(ctx, "DEFAULT_DIALECT").Result()
Expect(err).NotTo(HaveOccurred())
Expect(defDialect).To(BeEquivalentTo(map[string]interface{}{"DEFAULT_DIALECT": "2"}))
})
It("should FTCreate WithSuffixtrie", Label("search", "ftcreate", "ftinfo"), func() {