MCPcopy Index your code
hub / github.com/FunctionStream/function-stream / TestPebbleStateStore

Function TestPebbleStateStore

fs/statestore/pebble_test.go:27–40  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

25)
26
27func TestPebbleStateStore(t *testing.T) {
28 store, err := statestore.NewTmpPebbleStateStore()
29 assert.Nil(t, err)
30
31 _, err = store.GetState("key")
32 assert.ErrorIs(t, err, api.ErrNotFound)
33
34 err = store.PutState("key", []byte("value"))
35 assert.Nil(t, err)
36
37 value, err := store.GetState("key")
38 assert.Nil(t, err)
39 assert.Equal(t, "value", string(value))
40}

Callers

nothing calls this directly

Calls 3

NewTmpPebbleStateStoreFunction · 0.92
GetStateMethod · 0.65
PutStateMethod · 0.65

Tested by

no test coverage detected