update tests

This commit is contained in:
Fenny
2020-11-05 05:57:14 +01:00
parent 420f4834d2
commit 79f1f1609e
8 changed files with 91 additions and 1 deletions

View File

@@ -27,6 +27,19 @@ func Test_MYSQL_Set(t *testing.T) {
utils.AssertEqual(t, nil, err)
}
func Test_MYSQL_Set_Override(t *testing.T) {
var (
key = "john"
val = []byte("doe")
)
err := testStore.Set(key, val, 0)
utils.AssertEqual(t, nil, err)
err := testStore.Set(key, val, 0)
utils.AssertEqual(t, nil, err)
}
func Test_MYSQL_Get(t *testing.T) {
var (
key = "john"
@@ -66,7 +79,6 @@ func Test_MYSQL_Get_Expired(t *testing.T) {
func Test_MYSQL_Get_NotExist(t *testing.T) {
result, err := testStore.Get("notexist")
utils.AssertEqual(t, ErrNotExist, err)
utils.AssertEqual(t, true, len(result) == 0)