mirror of
https://github.com/gofiber/storage.git
synced 2025-10-05 16:48:25 +08:00
fix: valid get with list-up method
This commit is contained in:
@@ -2,7 +2,6 @@ package cloudflarekv
|
||||
|
||||
import (
|
||||
"context"
|
||||
"log"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
@@ -56,21 +55,17 @@ func Test_CloudflareKV_Get(t *testing.T) {
|
||||
|
||||
var (
|
||||
key = "john"
|
||||
val = "doe"
|
||||
val = []byte("doe")
|
||||
)
|
||||
|
||||
err := testStore.Set(key, []byte(val), 0)
|
||||
err := testStore.Set(key, val, 1000)
|
||||
|
||||
require.NoError(t, err)
|
||||
|
||||
result, error := testStore.api.ListWorkersKVKeys(context.Background(), cloudflare.AccountIdentifier(testStore.accountID), cloudflare.ListWorkersKVsParams{
|
||||
result, err := testStore.api.ListWorkersKVKeys(context.Background(), cloudflare.AccountIdentifier(testStore.accountID), cloudflare.ListWorkersKVsParams{
|
||||
NamespaceID: testStore.namespaceID,
|
||||
})
|
||||
|
||||
if error != nil {
|
||||
log.Printf("error")
|
||||
}
|
||||
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, key, result.Result[0].Name)
|
||||
|
||||
|
Reference in New Issue
Block a user