fauxfactory
fauxfactory copied to clipboard
[DONOTMERGE] generate_email uses production domains.
This fixes issue #26.
@Ichimonji10 is this what you wanted?
Coverage remained the same when pulling 57c3ab86aa977da7100126463c65c11466854970 on issue-26 into ee5df15ec29f05267401053926ced2cbbd73880a on master.
Naah, this isn't what I'm looking for. The changes in this commit are a mis-reading of the RFC — good try, though! I'll give a more thorough explanation tomorrow.
Ok, so RFC 2606 states that the following domains are reserved:
-
test
-
example
-
invalid
-
localhost
Notice that those are all top level domains. That's the really important part: they're top level. Thus, these domains all fall under the scope of RFC 2606:
-
omaciel.wordpress.example
-
bad-ssl-certs.super-unsafe-site.invalid
-
development-webserver.localhost
-
fourth.third.second.test
However, the following do not fall under the scope of RFC 2606:
-
example.biz
-
invalid.com
-
localhost.net
-
test.com
This PR places example
, invalid
, localhost
and test
in the SUBDOMAINS
list, which will produce domains of the second type. Those domains should go into TLDS
, so as to produce domains of the first type.
All that said, com
, net
and org
can be used as top-level domains. However, they can only be used as top-level domains if example
is used as a second-level domain. Thus, the following are all valid:
-
example.com
-
third.example.com
-
fourth.third.example.com
-
fourth.third.example.net
… and so on.