Skip to content

Commit

Permalink
Update empty check, value should be Nil
Browse files Browse the repository at this point in the history
  • Loading branch information
gaby committed Oct 30, 2023
1 parent 0b9f4ae commit 50bea20
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions redis/redis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func Test_Redis_Expiration(t *testing.T) {

keys, err := testStore.Keys()
require.NoError(t, err)
require.Zero(t, keys)
require.Nil(t, keys)
}

func Test_Redis_Get_NotExist(t *testing.T) {
Expand Down Expand Up @@ -117,7 +117,7 @@ func Test_Redis_Delete(t *testing.T) {

keys, err := testStore.Keys()
require.NoError(t, err)
require.Zero(t, keys)
require.Nil(t, keys)
}

func Test_Redis_Reset(t *testing.T) {
Expand Down Expand Up @@ -149,7 +149,7 @@ func Test_Redis_Reset(t *testing.T) {

keys, err = testStore.Keys()
require.NoError(t, err)
require.Zero(t, keys)
require.Nil(t, keys)
}

func Test_Redis_Close(t *testing.T) {
Expand Down Expand Up @@ -229,7 +229,7 @@ func Test_Redis_Initalize_WithURL_TLS(t *testing.T) {

keys, err := testStoreUrl.Keys()
require.NoError(t, err)
require.Zero(t, keys)
require.Nil(t, keys)

require.Nil(t, testStoreUrl.Close())
}
Expand Down Expand Up @@ -275,7 +275,7 @@ func Test_Redis_Initalize_WithURL_TLS_Verify(t *testing.T) {

keys, err := testStoreUrl.Keys()
require.NoError(t, err)
require.Zero(t, keys)
require.Nil(t, keys)

require.Nil(t, testStoreUrl.Close())
}
Expand All @@ -302,7 +302,7 @@ func Test_Redis_Initalize_With_Secure_URL(t *testing.T) {

keys, err := testStoreUrl.Keys()
require.NoError(t, err)
require.Zero(t, keys)
require.Nil(t, keys)

require.Nil(t, testStoreUrl.Close())
}
Expand Down Expand Up @@ -330,7 +330,7 @@ func Test_Redis_Universal_Addrs(t *testing.T) {

keys, err := testStoreUniversal.Keys()
require.NoError(t, err)
require.Zero(t, keys)
require.Nil(t, keys)

require.Nil(t, testStoreUniversal.Close())
}
Expand Down Expand Up @@ -360,7 +360,7 @@ func Test_Redis_Universal_With_URL_Undefined(t *testing.T) {

keys, err := testStoreUniversal.Keys()
require.NoError(t, err)
require.Zero(t, keys)
require.Nil(t, keys)

require.Nil(t, testStoreUniversal.Close())
}
Expand Down Expand Up @@ -390,7 +390,7 @@ func Test_Redis_Universal_With_URL_Defined(t *testing.T) {

keys, err := testStoreUniversal.Keys()
require.NoError(t, err)
require.Zero(t, keys)
require.Nil(t, keys)

require.Nil(t, testStoreUniversal.Close())
}
Expand Down Expand Up @@ -421,7 +421,7 @@ func Test_Redis_Universal_With_HostPort(t *testing.T) {

keys, err := testStoreUniversal.Keys()
require.NoError(t, err)
require.Zero(t, keys)
require.Nil(t, keys)

require.Nil(t, testStoreUniversal.Close())
}
Expand Down Expand Up @@ -453,7 +453,7 @@ func Test_Redis_Universal_With_HostPort_And_URL(t *testing.T) {

keys, err := testStoreUniversal.Keys()
require.NoError(t, err)
require.Zero(t, keys)
require.Nil(t, keys)

require.Nil(t, testStoreUniversal.Close())
}
Expand Down Expand Up @@ -487,7 +487,7 @@ func Test_Redis_Cluster(t *testing.T) {

keys, err := testStoreUniversal.Keys()
require.NoError(t, err)
require.Zero(t, keys)
require.Nil(t, keys)

require.Nil(t, testStoreUniversal.Close())
}
Expand Down

0 comments on commit 50bea20

Please sign in to comment.