aboutsummaryrefslogtreecommitdiff
path: root/plugin/transfer/failed_write_test.go
blob: e60fd501bcabe0966a59a37ef64aecdcb7721a34 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package transfer

import (
	"context"
	"fmt"
	"testing"

	"github.com/coredns/coredns/plugin/test"

	"github.com/miekg/dns"
)

type badwriter struct {
	dns.ResponseWriter
}

func (w *badwriter) WriteMsg(_ *dns.Msg) error { return fmt.Errorf("failed to write msg") }

func TestWriteMessageFailed(t *testing.T) {
	transfer := newTestTransfer()
	ctx := context.TODO()
	w := &badwriter{ResponseWriter: &test.ResponseWriter{TCP: true}}
	m := &dns.Msg{}
	m.SetAxfr("example.org.")

	_, err := transfer.ServeDNS(ctx, w, m)
	if err == nil {
		t.Error("Expected error, got none")
	}
}
ed/move Unnamed repository; edit this file 'description' to name the repository.
aboutsummaryrefslogtreecommitdiff
path: root/test/bun.js/install/bun-link.test.ts (unfollow)
AgeCommit message (Expand)AuthorFilesLines
2023-02-13fix(FormData): make String explicit, thanks @dylan-conway (#2065)Gravatar Derrick Farris 1-1/+1
2023-02-13fix(FormData): add string literal operator (#2064)Gravatar Derrick Farris 1-2/+2
2023-02-13Add pretty printer for FormDataGravatar Jarred Sumner 5-1/+101
2023-02-13Add dynamic port assigning to Bun.serve (#2062)Gravatar Michał Warda 3-5/+40
2023-02-13feat(napi): add `napi_get_value_bigint_words` (#2061)Gravatar Derrick Farris 3-0/+44
2023-02-13Fixes https://github.com/oven-sh/bun/issues/1456Gravatar Jarred Sumner 8-1/+148