You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for test sdk.Context to be able to mount any number (and supported type - key, transientKey, memKey) of keys on the cms before creating and returning the test context.
However, it doesn't support mounting multiple store keys at once and the ability to mount MemoryStoreKeys on the cms.
It's likely no one had faced an issue with this as module's tend to have a single store key. However I ran into an issue when refactoring tests for the sdk v0.50 upgrade, as x/capability deals with mem store keys. See cosmos/ibc-go#4068 (comment)
Proposal
Add something like this as to not break the current usage in existing tests. Or rip the bandaid off and change the DefaultContext API.
Summary
Add support for test
sdk.Context
to be able to mount any number (and supported type - key, transientKey, memKey) of keys on thecms
before creating and returning the test context.Problem Definition
This is a super nice test helper for creating a
sdk.Context
with a custom store key - https://github.com/cosmos/cosmos-sdk/blob/main/testutil/context.go#L20.However, it doesn't support mounting multiple store keys at once and the ability to mount
MemoryStoreKey
s on thecms
.It's likely no one had faced an issue with this as module's tend to have a single store key. However I ran into an issue when refactoring tests for the sdk v0.50 upgrade, as
x/capability
deals with mem store keys. See cosmos/ibc-go#4068 (comment)Proposal
Add something like this as to not break the current usage in existing tests. Or rip the bandaid off and change the
DefaultContext
API.Usage looks something like:
The text was updated successfully, but these errors were encountered: