Skip to content

Allow setting response code#22

Open
horkhe wants to merge 1 commit intofoxcpp:masterfrom
mailgun:maxim/develop
Open

Allow setting response code#22
horkhe wants to merge 1 commit intofoxcpp:masterfrom
mailgun:maxim/develop

Conversation

@horkhe
Copy link
Contributor

@horkhe horkhe commented Feb 27, 2026

Functions mockdns.(*Server).SetResponseCode(name string, rcode int) and mockdns.(*Server).SetResponseCodeForType(name string, rrType uint16, rcode int) are added to override Response Code (rcode) that is returned by the server when queried for the name or name+type. That allows testing various server failure scenarios.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant