Skip to content

Commit f71e650

Browse files
committed
chore: update bok-choy hostname and revert the old logic to chose browser for karma
1 parent 942e713 commit f71e650

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

pavelib/utils/envs.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ class Env:
7777
PRINT_SETTINGS_LOG_FILE = GEN_LOG_DIR / "print_settings.log"
7878

7979
# Detect if in a Docker container, and if so which one
80-
DEVSTACK_SETTINGS = 'devstack'
80+
SERVER_HOST = os.environ.get('SERVER_HOSTNAME', '0.0.0.0')
81+
USING_DOCKER = SERVER_HOST != '0.0.0.0'
82+
DEVSTACK_SETTINGS = 'devstack_docker' if USING_DOCKER else 'devstack'
8183
TEST_SETTINGS = 'test'
8284

8385
# Mongo databases that will be dropped before/after the tests run
@@ -87,7 +89,11 @@ class Env:
8789
TEST_DIR = REPO_ROOT / ".testids"
8890

8991
# Configured browser to use for the js test suites
90-
KARMA_BROWSER = 'FirefoxNoUpdates'
92+
SELENIUM_BROWSER = os.environ.get('SELENIUM_BROWSER', 'firefox')
93+
if USING_DOCKER:
94+
KARMA_BROWSER = 'ChromeDocker' if SELENIUM_BROWSER == 'chrome' else 'FirefoxDocker'
95+
else:
96+
KARMA_BROWSER = 'FirefoxNoUpdates'
9197

9298
# Files used to run each of the js test suites
9399
# TODO: Store this as a dict. Order seems to matter for some

tox.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ setenv =
2626
PYTHONHASHSEED=0
2727
TOXENV={envname}
2828
passenv =
29+
SERVER_CMS_PORT
30+
SERVER_HOSTNAME
31+
SERVER_LMS_PORT
2932
DISABLE_COURSEENROLLMENT_HISTORY
3033
DISPLAY
3134
DJANGO_SETTINGS_MODULE

0 commit comments

Comments
 (0)