cosmos-sdk/orm/testing/ormtest/membackend.go
Aaron Craelius 37ae08d92a
feat(orm): ModuleDB JSON import/export/default/validate methods (#11101)
* feat(orm): ModuleDB JSON methods

* WIP

* WIP on JSON

* WIP

* WIP

* tests and docs

* revert

* tests and docs

* docs

* address review comments
2022-02-03 20:36:21 -08:00

19 lines
526 B
Go

// Package ormtest contains utilities for testing modules built with the ORM.
package ormtest
import (
"github.com/cosmos/cosmos-sdk/orm/internal/testkv"
"github.com/cosmos/cosmos-sdk/orm/model/ormtable"
)
// NewMemoryBackend returns a new ORM memory backend which can be used for
// testing purposes independent of any storage layer.
//
// Example:
// backend := ormtest.NewMemoryBackend()
// ctx := ormtable.WrapContextDefault()
// ...
func NewMemoryBackend() ormtable.Backend {
return testkv.NewSplitMemBackend()
}