MCPcopy
hub / github.com/google/mtail / TestNewRuntimeErrors

Function TestNewRuntimeErrors

internal/runtime/runtime_test.go:28–40  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

26}
27
28func TestNewRuntimeErrors(t *testing.T) {
29 store := metrics.NewStore()
30 lines := make(chan *logline.LogLine)
31 var wg sync.WaitGroup
32 _, err := New(lines, nil, "", store)
33 if err == nil {
34 t.Error("New(..., nil) expecting error, got nil")
35 }
36 _, err = New(lines, &wg, "", nil)
37 if err == nil {
38 t.Error("New(..., nil) expecting error, got nil")
39 }
40}
41
42func TestCompileAndRun(t *testing.T) {
43 testProgram := "/$/ {}\n"

Callers

nothing calls this directly

Calls 3

NewStoreFunction · 0.92
ErrorMethod · 0.65
NewFunction · 0.50

Tested by

no test coverage detected