Skip to content

Commit

Permalink
fix: delete lib2 before creating it again
Browse files Browse the repository at this point in the history
  • Loading branch information
SoulPancake committed Jun 29, 2024
1 parent 125ada1 commit 3c93fdd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions rueidiscompat/adapter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8944,6 +8944,7 @@ func testAdapterCache(resp3 bool) {
Expect(err).NotTo(HaveOccurred())
Expect(resultAdd).To(BeEquivalentTo("OK"))
opt.Replace = false
adapter.TFunctionDelete(ctx, libCodeWithConfig("lib2")).Result()
resultAdd, err = adapter.TFunctionLoadArgs(ctx, libCodeWithConfig("lib2"), opt).Result()
Expect(err).NotTo(HaveOccurred())
Expect(resultAdd).To(BeEquivalentTo("OK"))
Expand Down
8 changes: 8 additions & 0 deletions rueidiscompat/command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,14 @@ var _ = Describe("Commands", func() {
Expect(cursor).To(Equal(uint64(1)))
Expect(cmd.Err()).To(BeNil())
}
{
cmd := &ScanCmd{err: errors.New("invalid error")}
cmd.SetVal([]string{"1"}, 1)
keys, cursor := cmd.Val()
Expect(keys).To(Equal([]string{"1"}))
Expect(cursor).To(Equal(uint64(1)))
Expect(cmd.Err().Error()).To(Equal("invalid error"))
}
{
cmd := &ZSliceCmd{}
cmd.SetVal([]Z{{Score: 1}})
Expand Down

0 comments on commit 3c93fdd

Please sign in to comment.