chore: check the key expired

Proposed by coderabbit
This commit is contained in:
Manuel de la Peña
2025-02-18 18:16:18 +01:00
parent 0c2d884898
commit c2e5b74f2a
2 changed files with 8 additions and 0 deletions

View File

@@ -119,6 +119,10 @@ func Test_MongoDB_Set_Expiration(t *testing.T) {
require.NoError(t, err)
time.Sleep(1100 * time.Millisecond)
result, err := testStore.Get(key)
require.NoError(t, err)
require.Zero(t, len(result), "Key should have expired")
}
func Test_MongoDB_Get_Expired(t *testing.T) {