mirror of
https://github.com/discourse/discourse.git
synced 2025-02-11 13:55:07 +00:00
Why this change? Google does not yet publish binaries for chrome and chromedriver for `linux/arm64`. In 484954ec4c5c585c16fb6e7c2a8d45bac49d6964, we attempted to add support for running system tests on `linux/arm64` by switching to Firefox but our system tests seem to make lots of assumptions about running on chromium based browsers so there are some tests that don't work in Firefox. This commit works around the lack of chrome and chromedriver binaries by doing the following: 1. Adds a `DISCOURSE_SYSTEM_TEST_CHROMIUM` ENV variable which when set to `1` will allow us to run system tests using a chromium binary. Chromium binaries for `linux/arm64` are available and since Chrome is Chromium based, all of our system tests "should pass" even when running against a Chromium binary. I don't expect this to be perfect but I expect it to be better than running against Firefox. This change buys us time until Chrome finally ships binaries for `linux/arm64`. 2. Adds a `DISCOURSE_SYSTEM_TEST_CHROMEDRIVER_PATH` ENV variable to allow the chromedriver path to be configured. We need this because the [electron project](https://github.com/electron/electron/releases) actually releases chromewebdriver for `linux/arm64` so someone running `linux/arm64` can download the necessary chromedriver from the project instead of relying on selenium-manager. This change is also important for us to support [discourse_test](https://github.com/discourse/discourse_docker/blob/main/image/discourse_test/Dockerfile) and [discourse_dev](https://github.com/discourse/discourse_docker/blob/main/image/discourse_dev/Dockerfile) images targeted at `linux/arm64`.