chakkk309 commented on code in PR #3313:
URL: https://github.com/apache/kvrocks/pull/3313#discussion_r2649159919


##########
tests/gocase/unit/type/string/digest_test.go:
##########
@@ -0,0 +1,158 @@
+package string
+
+import (
+       "context"
+       "testing"
+
+       "github.com/stretchr/testify/require"
+
+       "github.com/apache/kvrocks/tests/gocase/util"
+)
+
+func TestDigest(t *testing.T) {
+       srv := util.StartServer(t, map[string]string{})
+       defer srv.Close()
+       ctx := context.Background()
+       rdb := srv.NewClient()
+       defer func() { require.NoError(t, rdb.Close()) }()
+
+       t.Run("DIGEST with existing string key", func(t *testing.T) {
+               require.NoError(t, rdb.Set(ctx, "key1", "Hello world", 0).Err())
+               
+               // DIGEST should return hex hash
+               digest := rdb.Do(ctx, "DIGEST", "key1").Val()

Review Comment:
   > Can use the `String` to avoid the typecast. The same as other places.
   
   Thanks for the suggestion, I will update other places.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to