in reply to Re^8: Testing with Test::Mock::HTTP::Tiny
in thread Testing with Test::Mock::HTTP::Tiny
I've changed the domain to one that doesn't exist on t'interweb so I can be sure the test code is using the mocked data and not going off and fetching a fresh page.
Sooner or later, a troll will register the domain. Better either use a domain that you control, or use one of the domains reserved for purposes like this (see RFC2606):
Reserved Top-Level Domains (Quoting RFC2606):
Reserved Second-Level Domains (again quoting RFC2606):
RFC6761 updates RFC2606 with best practices.
If you fake a domain data, you should probably use the .test or .invalid TLDs. If you have no better idea, use something like bod-example-1.test, bod-example-2.test, and so on. Probably, you may want to name your domains to match your tests, e.g. working-host.invalid, wrong-cert.invalid, and so on.
Alexander
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^10: Testing with Test::Mock::HTTP::Tiny
by Bod (Parson) on Sep 30, 2023 at 00:05 UTC |