Skip to content

Allow setting response code#22

Open
horkhe wants to merge 2 commits into
foxcpp:masterfrom
mailgun:maxim/develop
Open

Allow setting response code#22
horkhe wants to merge 2 commits into
foxcpp:masterfrom
mailgun:maxim/develop

Conversation

@horkhe
Copy link
Copy Markdown
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.

@horkhe
Copy link
Copy Markdown
Contributor Author

horkhe commented Apr 6, 2026

@foxcpp friendly reminder in case it slipped through the cracks

@horkhe
Copy link
Copy Markdown
Contributor Author

horkhe commented May 11, 2026

@foxcpp I have made an addition to the PR: Server.Reset() method now clears previously set rcodes.

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