mirror of
https://github.com/tendermint/tendermint.git
synced 2026-08-02 05:16:10 +00:00
* Updated mocks * add reactor tests * add v1 reactor tests * Fix fuzz test for priority mempool * e2e adapted to mempool v1; prio pool is default now * Reverted default mempool to be fifo * Changed buf version * Added priority mempool to ci testnet * Fixed linter * Updated makefile * Aligned makefile changes to v0.34.x * Added go install for proto * Add log message to warn about prioritized mempool bug Signed-off-by: Thane Thomson <connect@thanethomson.com> * Changelog message Co-authored-by: Jasmina Malicevic <jasmina.dustinac@gmail.com> Co-authored-by: Callum Waters <cmwaters19@gmail.com> Co-authored-by: Sam Kleinman <garen@tychoish.com> Co-authored-by: Thane Thomson <connect@thanethomson.com>
34 lines
717 B
Go
34 lines
717 B
Go
package v0_test
|
|
|
|
import (
|
|
"io/ioutil"
|
|
"os"
|
|
"path/filepath"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
mempoolv0 "github.com/tendermint/tendermint/test/fuzz/mempool/v0"
|
|
)
|
|
|
|
const testdataCasesDir = "testdata/cases"
|
|
|
|
func TestMempoolTestdataCases(t *testing.T) {
|
|
entries, err := os.ReadDir(testdataCasesDir)
|
|
require.NoError(t, err)
|
|
|
|
for _, e := range entries {
|
|
entry := e
|
|
t.Run(entry.Name(), func(t *testing.T) {
|
|
defer func() {
|
|
r := recover()
|
|
require.Nilf(t, r, "testdata/cases test panic")
|
|
}()
|
|
f, err := os.Open(filepath.Join(testdataCasesDir, entry.Name()))
|
|
require.NoError(t, err)
|
|
input, err := ioutil.ReadAll(f)
|
|
require.NoError(t, err)
|
|
mempoolv0.Fuzz(input)
|
|
})
|
|
}
|
|
}
|