puppeteer_test: Set the system default locale to `en_US`.

This commit sets the system default locale to `en_US.UTF-8` before
running the tests.

This was necessary because when running tests with Firefox, it was
failing on some test verifies the results of locale-aware sorting.
This commit is contained in:
Riken Shah 2021-03-01 05:35:46 +00:00 committed by Tim Abbott
parent a6c1f02df0
commit fb8dc7732c
1 changed files with 4 additions and 0 deletions

View File

@ -15,6 +15,10 @@ ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# watch mode. # watch mode.
os.environ["PUPPETEER_TESTS"] = "1" os.environ["PUPPETEER_TESTS"] = "1"
# The locale can have impact how Firefox does locale-aware sorting,
# which we do verify in some tests.
os.environ["LC_ALL"] = "en_US.UTF-8"
os.environ["CHROMIUM_EXECUTABLE"] = os.path.join(ZULIP_PATH, "node_modules/.bin/chromium") os.environ["CHROMIUM_EXECUTABLE"] = os.path.join(ZULIP_PATH, "node_modules/.bin/chromium")
os.environ.pop("http_proxy", "") os.environ.pop("http_proxy", "")
os.environ.pop("https_proxy", "") os.environ.pop("https_proxy", "")