Documentation
¶
Overview ¶
Package memorytest checks memory.Store implementations against the contract the built-in stores follow.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
Run runs the conformance tests against stores made by newStore, which must return an empty store independent of the others; it is called once per subtest and subtests run in parallel. The contract:
- Put rejects an entry without an ID and otherwise inserts or replaces the entry with its ID; Get and Delete of a missing entry return memory.ErrNotFound.
- Every field round-trips: embeddings bit for bit, timestamps to the nanosecond; later changes to entries put or returned are not stored.
- List returns the entries matching the filter (exact scope, all tags), oldest CreatedAt first, then by ID.
- IDs and scopes are arbitrary UTF-8 strings of up to 255 bytes, compared exactly: case and trailing spaces matter.
- A store that implements memory.ScopedDeleter deletes an entry only when its scope matches, atomically.
- Entries of a megabyte are stored, and concurrent use is safe.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.