Skip to content

Commit dd9ca52

Browse files
committed
fix test
1 parent 3b23fce commit dd9ca52

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

acl_commands_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ var _ = Describe("ACL permissions", Label("NonRedisEnterprise"), func() {
306306

307307
// no perm for dropindex
308308
err = c.FTDropIndex(ctx, "txt").Err()
309-
Expect(err).ToNot(BeEmpty())
309+
Expect(err).To(HaveOccurred())
310310
Expect(err.Error()).To(ContainSubstring("NOPERM"))
311311

312312
// json set and get have perm
@@ -315,15 +315,15 @@ var _ = Describe("ACL permissions", Label("NonRedisEnterprise"), func() {
315315

316316
// no perm for json clear
317317
err = c.JSONClear(ctx, "foo", "$").Err()
318-
Expect(err).ToNot(BeEmpty())
318+
Expect(err).To(HaveOccurred())
319319
Expect(err.Error()).To(ContainSubstring("NOPERM"))
320320

321321
// perm for reserve
322322
Expect(c.BFReserve(ctx, "bloom", 0.01, 100).Err()).NotTo(HaveOccurred())
323323

324324
// no perm for info
325325
err = c.BFInfo(ctx, "bloom").Err()
326-
Expect(err).ToNot(BeEmpty())
326+
Expect(err).To(HaveOccurred())
327327
Expect(err.Error()).To(ContainSubstring("NOPERM"))
328328

329329
// perm for cf.reserve
@@ -338,7 +338,7 @@ var _ = Describe("ACL permissions", Label("NonRedisEnterprise"), func() {
338338
Expect(c.TSCreate(ctx, "tsts").Err()).NotTo(HaveOccurred())
339339
// noperm for ts.info
340340
err = c.TSInfo(ctx, "tsts").Err()
341-
Expect(err).ToNot(BeEmpty())
341+
Expect(err).To(HaveOccurred())
342342
Expect(err.Error()).To(ContainSubstring("NOPERM"))
343343

344344
Expect(client.FlushDB(ctx).Err()).NotTo(HaveOccurred())

0 commit comments

Comments
 (0)