File
Blob: spec/mocks/resolver.go
| 1 | package mocks |
| 2 | |
| 3 | import ( |
| 4 | "context" |
| 5 | |
| 6 | "github.com/stretchr/testify/mock" |
| 7 | ) |
| 8 | |
| 9 | type Resolver struct { |
| 10 | mock.Mock |
| 11 | } |
| 12 | |
| 13 | func (r *Resolver) LookupCNAME(ctx context.Context, host string) (string, error) { |
| 14 | args := r.Called(ctx, host) |
| 15 | c := args.String(0) |
| 16 | e := args.Error(1) |
| 17 | if e != nil { |
| 18 | return "", e |
| 19 | } |
| 20 | return c, nil |
| 21 | } |