INNER CODE UNIT · Go

TestRegistryAPIServerPropagatesRouteRegistrationError

kimdre/doco-cd · cmd/doco-cd/apiserver_test.go:12

func TestRegistryAPIServerPropagatesRouteRegistrationError(t *testing.T) {
	t.Parallel()

	err := registryApiServer(&app.Config{}, nil, api.Mounts{}, logger.New(logger.LevelCritical))
	if err == nil {
		t.Fatal("registryApiServer succeeded with a nil API handler")
	}

	if !strings.Contains(err.Error(), "register API routes") {
		t.Fatalf("registryApiServer error = %q", err)
	}
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…