Revert "chore: remove bok-choy settings"

This commit is contained in:
Robert Raposa
2023-10-31 15:27:44 -04:00
committed by GitHub
parent eec67f4799
commit 083ccbf09b
37 changed files with 2079 additions and 18 deletions

View File

@@ -9,4 +9,5 @@ overrides don't exist
import os
MONGO_PORT_NUM = int(os.environ.get('EDXAPP_TEST_MONGO_PORT', '27017'))
MONGO_HOST = os.environ.get('EDXAPP_TEST_MONGO_HOST', 'localhost')
MONGO_HOST = os.environ.get('EDXAPP_TEST_MONGO_HOST',
'edx.devstack.mongo' if 'BOK_CHOY_HOSTNAME' in os.environ else 'localhost')

View File

@@ -3,6 +3,7 @@ Tests for methods defined in mongo_utils.py
"""
import os
from unittest import TestCase
from uuid import uuid4
@@ -28,7 +29,7 @@ class MongoUtilsTests(TestCase):
"""
Test that read_preference parameter gets converted to a valid pymongo read preference.
"""
host = 'localhost'
host = 'edx.devstack.mongo' if 'BOK_CHOY_HOSTNAME' in os.environ else 'localhost'
db = 'test_read_preference_%s' % uuid4().hex
# Support for read_preference given in constant name form (ie. PRIMARY, SECONDARY_PREFERRED)
connection = connect_to_mongodb(db, host, read_preference=enum_name)

View File

@@ -15,6 +15,7 @@ the course, section, subsection, unit, etc.
import datetime
import json
import os
import shutil
import unittest
from tempfile import mkdtemp
@@ -936,7 +937,7 @@ class VideoBlockStudentViewDataTestCase(unittest.TestCase):
@patch.object(settings, 'CONTENTSTORE', create=True, new={
'ENGINE': 'xmodule.contentstore.mongo.MongoContentStore',
'DOC_STORE_CONFIG': {
'host': 'localhost',
'host': 'edx.devstack.mongo' if 'BOK_CHOY_HOSTNAME' in os.environ else 'localhost',
'db': 'test_xcontent_%s' % uuid4().hex,
},
# allow for additional options that can be keyed on a name, e.g. 'trashcan'