Change DNS stubs in spec suite to raise exceptions if something attempts to perform a DNS query
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=198664) </details> <!--IssueSummary end--> Currently requests are silently ignored and stubbed but it is suggested that we instead raise an error so it's more obvious what is going on. Follows up from https://gitlab.com/gitlab-org/gitlab/merge_requests/22368
issue