Update snapshot inspect formatter test

This commit is contained in:
Joel Watson 2020-11-05 10:40:02 -06:00
parent f93df8ce35
commit 6ed8d03fee
1 changed files with 11 additions and 3 deletions

View File

@ -13,6 +13,11 @@ func TestFormat(t *testing.T) {
Sum: 1,
Count: 2,
}}
mkv := []typeStats{{
Name: "msgKV",
Sum: 1,
Count: 2,
}}
info := OutputFormat{
Meta: &MetadataInfo{
ID: "one",
@ -22,8 +27,11 @@ func TestFormat(t *testing.T) {
Version: 1,
},
Stats: m,
StatsKV: mkv,
TotalSize: 1,
TotalSizeKV: 1,
}
detailed := false
formatters := map[string]Formatter{
"pretty": newPrettyFormatter(),
@ -33,7 +41,7 @@ func TestFormat(t *testing.T) {
for fmtName, formatter := range formatters {
t.Run(fmtName, func(t *testing.T) {
actual, err := formatter.Format(&info)
actual, err := formatter.Format(&info, detailed)
require.NoError(t, err)
gName := fmt.Sprintf("%s", fmtName)