Skip to content

Commit

Permalink
dnsforward: imp tests
Browse files Browse the repository at this point in the history
  • Loading branch information
schzhn committed Mar 21, 2023
1 parent b44f6d0 commit 04ac111
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/dnsforward/http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,15 +231,15 @@ func TestDNSForwardHTTP_handleSetConfig(t *testing.T) {
loadTestData(t, t.Name()+jsonExt, &data)

for _, tc := range testCases {
caseData, ok := data[tc.name]
require.True(t, ok, tc.name)

t.Run(tc.name, func(t *testing.T) {
t.Cleanup(func() {
s.conf = defaultConf
s.conf.FilteringConfig.EDNSClientSubnet = &EDNSClientSubnet{}
})

caseData, ok := data[tc.name]
require.True(t, ok)

rBody := io.NopCloser(bytes.NewReader(caseData.Req))
var r *http.Request
r, err = http.NewRequest(http.MethodPost, "http://example.com", rBody)
Expand Down

0 comments on commit 04ac111

Please sign in to comment.