Skip to content

Commit

Permalink
Partly fix #8581: add extra subdomains for cookie tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gsnedders committed Aug 13, 2018
1 parent 9d4128a commit ff4e72e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tools/serve/serve.py
Expand Up @@ -16,6 +16,7 @@
from six.moves import urllib
import uuid
from collections import defaultdict, OrderedDict
from itertools import chain, product
from multiprocessing import Process, Event

from localpaths import repo_root
Expand Down Expand Up @@ -700,6 +701,9 @@ def build_config(override_path=None, **kwargs):

return rv

def _make_subdomains_product(s, depth=3):
return set(u".".join(x) for x in chain(*(product(s, repeat=i) for i in range(1, depth+1))))

_subdomains = {u"www",
u"www1",
u"www2",
Expand All @@ -708,6 +712,10 @@ def build_config(override_path=None, **kwargs):

_not_subdomains = {u"nonexistent"}

_subdomains = _make_subdomains_product(_subdomains)

_not_subdomains = _make_subdomains_product(_not_subdomains)


class ConfigBuilder(config.ConfigBuilder):
"""serve config
Expand Down

0 comments on commit ff4e72e

Please sign in to comment.