MCPcopy Create free account
hub / github.com/akash-network/node / setupTestSuite

Function setupTestSuite

x/audit/handler/handler_test.go:38–62  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

36}
37
38func setupTestSuite(t *testing.T) *testSuite {
39 suite := &testSuite{
40 t: t,
41 }
42
43 cfg := testutilmod.MakeTestEncodingConfig()
44 cdc := cfg.Codec
45
46 aKey := storetypes.NewTransientStoreKey(types.StoreKey)
47
48 db := dbm.NewMemDB()
49 suite.ms = store.NewCommitMultiStore(db, log.NewNopLogger(), storemetrics.NewNoOpMetrics())
50 suite.ms.MountStoreWithDB(aKey, storetypes.StoreTypeIAVL, db)
51
52 err := suite.ms.LoadLatestVersion()
53 require.NoError(t, err)
54
55 suite.ctx = sdk.NewContext(suite.ms, tmproto.Header{}, true, testutil.Logger(t))
56
57 suite.keeper = keeper.NewKeeper(cdc, aKey)
58
59 suite.handler = handler.NewHandler(suite.keeper)
60
61 return suite
62}
63
64func TestProviderBadMessageType(t *testing.T) {
65 suite := setupTestSuite(t)

Callers 6

TestProviderSignNewFunction · 0.70
TestProviderDeleteFullFunction · 0.70

Calls 3

NewKeeperFunction · 0.92
NewHandlerFunction · 0.92
LoggerMethod · 0.45

Tested by

no test coverage detected