From d86cba239b0d23a38ed9309e03cb32a7bee0761a Mon Sep 17 00:00:00 2001 From: tnv1 Date: Wed, 27 Nov 2024 13:21:03 +0700 Subject: [PATCH] test: add test override config cache size --- .gitignore | 2 -- cmd/terrad/config_test.go | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 cmd/terrad/config_test.go diff --git a/.gitignore b/.gitignore index cc75835f4..4956a7057 100644 --- a/.gitignore +++ b/.gitignore @@ -52,5 +52,3 @@ dependency-graph.png *.aux *.out *.synctex.gz -cmd -/cmd/ diff --git a/cmd/terrad/config_test.go b/cmd/terrad/config_test.go new file mode 100644 index 000000000..0b5fd9a28 --- /dev/null +++ b/cmd/terrad/config_test.go @@ -0,0 +1,15 @@ +package main + +import ( + "testing" + + "github.com/stretchr/testify/require" +) + +func TestOverrideConfigCacheSize(t *testing.T) { + _, cfg := initAppConfig() + terraCfg, ok := cfg.(TerraAppConfig) + require.Equal(t, ok, true) + require.Equal(t, terraCfg.Config.IAVLCacheSize, uint64(DefaultIAVLCacheSize)) + require.Equal(t, terraCfg.Config.IAVLDisableFastNode, IavlDisablefastNodeDefault) +}