diff --git a/internal/boomer/stats.go b/internal/boomer/stats.go index 5cee9973..0f19f595 100644 --- a/internal/boomer/stats.go +++ b/internal/boomer/stats.go @@ -148,7 +148,7 @@ func (s *requestStats) collectReportData() map[string]interface{} { "failed": s.transactionFailed, } data["stats"] = s.serializeStats() - data["stats_total"] = s.total.getReport() + data["stats_total"] = s.total.serialize() data["errors"] = s.serializeErrors() s.errors = make(map[string]*statsError) return data @@ -294,11 +294,6 @@ func (s *statsEntry) getStrippedReport() map[string]interface{} { return report } -func (s *statsEntry) getReport() map[string]interface{} { - report := s.serialize() - return report -} - type statsError struct { name string method string diff --git a/internal/scaffold/demo_test.go b/internal/scaffold/demo_test.go index 9f301c4a..be0b66f6 100644 --- a/internal/scaffold/demo_test.go +++ b/internal/scaffold/demo_test.go @@ -1,7 +1,6 @@ package scaffold import ( - "fmt" "os" "os/exec" "testing" @@ -43,35 +42,35 @@ func TestGenDemoTestCase(t *testing.T) { } } -func Example_demo() { +func TestExampleDemo(t *testing.T) { buildHashicorpPlugin() defer removeHashicorpPlugin() demoTestCase.Config.ToStruct().Path = "../../examples/debugtalk.bin" err := hrp.NewRunner(nil).Run(demoTestCase) // hrp.Run(demoTestCase) - fmt.Println(err) - // Output: - // + if err != nil { + t.Fail() + } } -func Example_jsonDemo() { +func TestJsonDemo(t *testing.T) { buildHashicorpPlugin() defer removeHashicorpPlugin() testCase := &hrp.TestCasePath{Path: demoTestCaseJSONPath} err := hrp.NewRunner(nil).Run(testCase) // hrp.Run(testCase) - fmt.Println(err) - // Output: - // + if err != nil { + t.Fail() + } } -func Example_yamlDemo() { +func TestYamlDemo(t *testing.T) { buildHashicorpPlugin() defer removeHashicorpPlugin() testCase := &hrp.TestCasePath{Path: demoTestCaseYAMLPath} err := hrp.NewRunner(nil).Run(testCase) // hrp.Run(testCase) - fmt.Println(err) - // Output: - // + if err != nil { + t.Fail() + } }