Пример #1
0
func TestReportElastic(t *testing.T) {
	elWReporter, err := New()
	if err != nil {
		t.Error("create new elastic reporter", err)
	}
	inspector := linter.NewInspector(elWReporter)
	err = inspector.Inspect(iterators.NewGenerator("test number generator", 10000))
	if err != nil {
		t.Error("Should be no error")
	}
}
Пример #2
0
package linter

import (
	"github.com/lilakurse/data-linter/iterators"
	"github.com/lilakurse/data-linter/reporters/mem"
	"testing"
)

var (
	numGenerator = iterators.NewGenerator("test number generator", 100)
)

func TestInspect(t *testing.T) {
	reporter := mem.New()
	inspector := NewInspector(reporter)
	err := inspector.Inspect(numGenerator)
	if err != nil {
		t.Error("Should be no error")
	}
	reporter.PrintReport()
	//numIterator.Count
	// Need to check count of inspected docs, count of collected problems
}