From 6ed8d03feee6c6a058767bc601f759817caf4177 Mon Sep 17 00:00:00 2001 From: Joel Watson Date: Thu, 5 Nov 2020 10:40:02 -0600 Subject: [PATCH] Update snapshot inspect formatter test --- command/snapshot/inspect/formatter_test.go | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/command/snapshot/inspect/formatter_test.go b/command/snapshot/inspect/formatter_test.go index d74181ebb..ec02a21a2 100644 --- a/command/snapshot/inspect/formatter_test.go +++ b/command/snapshot/inspect/formatter_test.go @@ -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", @@ -21,9 +26,12 @@ func TestFormat(t *testing.T) { Term: 4, Version: 1, }, - Stats: m, - TotalSize: 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)