anubis/lib/thoth/thothmock/withthothmock.go
Xe Iaso 9affd2edf4
chore: expose thoth in lib (#911)
Imports a patch previously exclusive to Botstopper.

Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-07-25 10:58:30 -04:00

18 lines
295 B
Go

package thothmock
import (
"context"
"testing"
"github.com/TecharoHQ/anubis/lib/thoth"
)
func WithMockThoth(t *testing.T) context.Context {
t.Helper()
thothCli := &thoth.Client{}
thothCli.WithIPToASNService(MockIpToASNService())
ctx := thoth.With(t.Context(), thothCli)
return ctx
}