test(dao-stringx): add test TestDao_GetRange

This commit is contained in:
bandl 2021-11-28 19:33:25 +08:00
parent cf4b24ea86
commit c0da22ef6f
1 changed files with 5 additions and 0 deletions

View File

@ -115,6 +115,11 @@ func TestDao_GetRange(t *testing.T) {
_, err = dao.GetRange(baseKey, 0, 7)
require.Error(t, err)
_, err = dao.Set(baseKey, "123456")
require.NoError(t, err)
resp, err = dao.GetRange(baseKey, 0, 3)
require.NoError(t, err)
require.Equal(t, resp.Result, "123")
}
func TestDao_GetSet(t *testing.T) {