chore: expose thoth in lib (#911)
Imports a patch previously exclusive to Botstopper. Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
parent
26b6d8a91a
commit
9affd2edf4
17 changed files with 12 additions and 10 deletions
17
lib/thoth/thothmock/withthothmock.go
Normal file
17
lib/thoth/thothmock/withthothmock.go
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
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
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue