MCPcopy Index your code
hub / github.com/assafmo/SQLiteQueryServer / TestMainEmptyQueryParam

Function TestMainEmptyQueryParam

main_test.go:466–479  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

464}
465
466func TestMainEmptyQueryParam(t *testing.T) {
467 log.SetOutput(&bytes.Buffer{})
468
469 err := cmd([]string{
470 "--db",
471 testDbPath,
472 })
473 if err == nil {
474 t.Fatal(`Should throw an error`)
475 }
476 if err == nil || !strings.Contains(err.Error(), "Must provide --query param") {
477 t.Fatalf(`Should throw a "Must provide --query param" error: %v`, err)
478 }
479}
480
481func TestMainPortOutOfRange(t *testing.T) {
482 log.SetOutput(&bytes.Buffer{})

Callers

nothing calls this directly

Calls 1

cmdFunction · 0.85

Tested by

no test coverage detected