Skip to content

Commit

Permalink
chore: add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
DStrand1 committed Oct 19, 2021
1 parent 318d580 commit 5981516
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions cmd/influx_inspect/dumptsi/dumptsi_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package dumptsi_test

import (
"bytes"
"testing"

"github.com/influxdata/influxdb/cmd/influx_inspect/dumptsi"
"github.com/stretchr/testify/require"
)

func Test_DumpTSI_NoError(t *testing.T) {
cmd := dumptsi.NewCommand()
b := bytes.NewBufferString("")
cmd.Stdout = b
require.NoError(t, cmd.Run(
"--series-file", "./testdata/_series",
"./testdata/L0-00000001.tsl",
))
out := b.String()
require.Contains(t, out, "[LOG FILE] L0-00000001.tsl")
require.Contains(t, out, "Series:\t\t9")
require.Contains(t, out, "Measurements:\t6")
require.Contains(t, out, "Tag Keys:\t18")
require.Contains(t, out, "Tag Values:\t26")
}
Binary file added cmd/influx_inspect/dumptsi/testdata/L0-00000001.tsl
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 5981516

Please sign in to comment.