chore: remove bok choy settings
This commit is contained in:
14
.github/workflows/js-tests.yml
vendored
14
.github/workflows/js-tests.yml
vendored
@@ -30,13 +30,13 @@ jobs:
|
||||
- name: Setup npm
|
||||
run: npm i -g npm@8.5.x
|
||||
|
||||
- name: Install Firefox 61.0
|
||||
run: |
|
||||
sudo apt-get purge firefox
|
||||
wget "https://ftp.mozilla.org/pub/firefox/releases/61.0/linux-x86_64/en-US/firefox-61.0.tar.bz2"
|
||||
tar -xjf firefox-61.0.tar.bz2
|
||||
sudo mv firefox /opt/firefox
|
||||
sudo ln -s /opt/firefox/firefox /usr/bin/firefox
|
||||
# - name: Install Firefox 61.0
|
||||
# run: |
|
||||
# sudo apt-get purge firefox
|
||||
# wget "https://ftp.mozilla.org/pub/firefox/releases/61.0/linux-x86_64/en-US/firefox-61.0.tar.bz2"
|
||||
# tar -xjf firefox-61.0.tar.bz2
|
||||
# sudo mv firefox /opt/firefox
|
||||
# sudo ln -s /opt/firefox/firefox /usr/bin/firefox
|
||||
|
||||
- name: Install Required System Packages
|
||||
run: sudo apt-get update && sudo apt-get install libxmlsec1-dev ubuntu-restricted-extras xvfb
|
||||
|
||||
5
.github/workflows/static-assets-check.yml
vendored
5
.github/workflows/static-assets-check.yml
vendored
@@ -62,11 +62,6 @@ jobs:
|
||||
- name: Add node_modules bin to $Path
|
||||
run: echo $GITHUB_WORKSPACE/node_modules/.bin >> $GITHUB_PATH
|
||||
|
||||
- name: Run Static Assets Check
|
||||
env:
|
||||
LMS_CFG: lms/envs/bok_choy.yml
|
||||
CMS_CFG: cms/envs/bok_choy.yml
|
||||
|
||||
run: |
|
||||
paver update_assets lms
|
||||
paver update_assets cms
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -86,7 +86,6 @@ test_root/paver_logs/
|
||||
test_root/uploads/
|
||||
django-pyfs
|
||||
.tox/
|
||||
common/test/db_cache/bok_choy_*.yaml
|
||||
common/test/data/badges/*.png
|
||||
|
||||
### Installation artifacts
|
||||
|
||||
@@ -1,116 +0,0 @@
|
||||
{
|
||||
"AWS_ACCESS_KEY_ID": "",
|
||||
"AWS_SECRET_ACCESS_KEY": "",
|
||||
"CELERY_BROKER_PASSWORD": "celery",
|
||||
"CELERY_BROKER_USER": "celery",
|
||||
"CONTENTSTORE": {
|
||||
"DOC_STORE_CONFIG": {
|
||||
"collection": "modulestore",
|
||||
"db": "test",
|
||||
"host": [
|
||||
"localhost"
|
||||
],
|
||||
"port": 27017
|
||||
},
|
||||
"ENGINE": "xmodule.contentstore.mongo.MongoContentStore",
|
||||
"OPTIONS": {
|
||||
"db": "test",
|
||||
"host": [
|
||||
"localhost"
|
||||
],
|
||||
"port": 27017
|
||||
}
|
||||
},
|
||||
"DATABASES": {
|
||||
"default": {
|
||||
"ENGINE": "django.db.backends.mysql",
|
||||
"HOST": "localhost",
|
||||
"NAME": "edxtest",
|
||||
"PASSWORD": "",
|
||||
"PORT": "3306",
|
||||
"USER": "root"
|
||||
},
|
||||
"student_module_history": {
|
||||
"ENGINE": "django.db.backends.mysql",
|
||||
"HOST": "localhost",
|
||||
"NAME": "student_module_history_test",
|
||||
"PASSWORD": "",
|
||||
"PORT": "3306",
|
||||
"USER": "root"
|
||||
}
|
||||
},
|
||||
"DOC_STORE_CONFIG": {
|
||||
"collection": "modulestore",
|
||||
"db": "test",
|
||||
"host": [
|
||||
"localhost"
|
||||
],
|
||||
"port": 27017
|
||||
},
|
||||
"JWT_AUTH": {
|
||||
"JWT_SECRET_KEY": "super-secret-key",
|
||||
"JWT_PUBLIC_SIGNING_JWK_SET": "{\"keys\": [{\"kid\": \"BTZ9HA6K\", \"e\": \"AQAB\", \"kty\": \"RSA\", \"n\": \"o5cn3ljSRi6FaDEKTn0PS-oL9EFyv1pI7dRgffQLD1qf5D6sprmYfWWokSsrWig8u2y0HChSygR6Jn5KXBqQn6FpM0dDJLnWQDRXHLl3Ey1iPYgDSmOIsIGrV9ZyNCQwk03wAgWbfdBTig3QSDYD-sTNOs3pc4UD_PqAvU2nz_1SS2ZiOwOn5F6gulE1L0iE3KEUEvOIagfHNVhz0oxa_VRZILkzV-zr6R_TW1m97h4H8jXl_VJyQGyhMGGypuDrQ9_vaY_RLEulLCyY0INglHWQ7pckxBtI5q55-Vio2wgewe2_qYcGsnBGaDNbySAsvYcWRrqDiFyzrJYivodqTQ\"}]}"
|
||||
},
|
||||
"MODULESTORE": {
|
||||
"default": {
|
||||
"ENGINE": "xmodule.modulestore.mixed.MixedModuleStore",
|
||||
"OPTIONS": {
|
||||
"mappings": {},
|
||||
"stores": [
|
||||
{
|
||||
"NAME": "draft",
|
||||
"DOC_STORE_CONFIG": {
|
||||
"collection": "modulestore",
|
||||
"db": "test",
|
||||
"host": [
|
||||
"localhost"
|
||||
],
|
||||
"port": 27017
|
||||
},
|
||||
"ENGINE": "xmodule.modulestore.mongo.DraftMongoModuleStore",
|
||||
"OPTIONS": {
|
||||
"collection": "modulestore",
|
||||
"db": "test",
|
||||
"default_class": "xmodule.hidden_block.HiddenBlock",
|
||||
"fs_root": "** OVERRIDDEN **",
|
||||
"host": [
|
||||
"localhost"
|
||||
],
|
||||
"port": 27017,
|
||||
"render_template": "common.djangoapps.edxmako.shortcuts.render_to_string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"NAME": "xml",
|
||||
"ENGINE": "xmodule.modulestore.xml.XMLModuleStore",
|
||||
"OPTIONS": {
|
||||
"data_dir": "** OVERRIDDEN **",
|
||||
"default_class": "xmodule.hidden_block.HiddenBlock"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"DJFS": {
|
||||
"type": "s3fs",
|
||||
"bucket": "test",
|
||||
"prefix": "test",
|
||||
"aws_access_key_id": "test",
|
||||
"aws_secret_access_key": "test"
|
||||
},
|
||||
"SECRET_KEY": "",
|
||||
"XQUEUE_INTERFACE": {
|
||||
"basic_auth": [
|
||||
"edx",
|
||||
"edx"
|
||||
],
|
||||
"django_auth": {
|
||||
"password": "password",
|
||||
"username": "lms"
|
||||
},
|
||||
"url": "http://localhost:18040"
|
||||
},
|
||||
"ZENDESK_API_KEY": "",
|
||||
"ZENDESK_USER": ""
|
||||
}
|
||||
@@ -1,127 +0,0 @@
|
||||
{
|
||||
"BUGS_EMAIL": "bugs@example.com",
|
||||
"BULK_EMAIL_DEFAULT_FROM_EMAIL": "no-reply@example.com",
|
||||
"CACHES": {
|
||||
"celery": {
|
||||
"BACKEND": "django.core.cache.backends.memcached.PyMemcacheCache",
|
||||
"OPTIONS": {
|
||||
"no_delay": true,
|
||||
"ignore_exc": true,
|
||||
"use_pooling": true
|
||||
},
|
||||
"KEY_FUNCTION": "common.djangoapps.util.memcache.safe_key",
|
||||
"KEY_PREFIX": "integration_celery",
|
||||
"LOCATION": [
|
||||
"localhost:11211"
|
||||
]
|
||||
},
|
||||
"default": {
|
||||
"BACKEND": "django.core.cache.backends.memcached.PyMemcacheCache",
|
||||
"OPTIONS": {
|
||||
"no_delay": true,
|
||||
"ignore_exc": true,
|
||||
"use_pooling": true
|
||||
},
|
||||
"KEY_FUNCTION": "common.djangoapps.util.memcache.safe_key",
|
||||
"KEY_PREFIX": "sandbox_default",
|
||||
"LOCATION": [
|
||||
"localhost:11211"
|
||||
]
|
||||
},
|
||||
"general": {
|
||||
"BACKEND": "django.core.cache.backends.memcached.PyMemcacheCache",
|
||||
"OPTIONS": {
|
||||
"no_delay": true,
|
||||
"ignore_exc": true,
|
||||
"use_pooling": true
|
||||
},
|
||||
"KEY_FUNCTION": "common.djangoapps.util.memcache.safe_key",
|
||||
"KEY_PREFIX": "sandbox_general",
|
||||
"LOCATION": [
|
||||
"localhost:11211"
|
||||
]
|
||||
},
|
||||
"mongo_metadata_inheritance": {
|
||||
"BACKEND": "django.core.cache.backends.memcached.PyMemcacheCache",
|
||||
"OPTIONS": {
|
||||
"no_delay": true,
|
||||
"ignore_exc": true,
|
||||
"use_pooling": true
|
||||
},
|
||||
"KEY_FUNCTION": "common.djangoapps.util.memcache.safe_key",
|
||||
"KEY_PREFIX": "integration_mongo_metadata_inheritance",
|
||||
"LOCATION": [
|
||||
"localhost:11211"
|
||||
]
|
||||
},
|
||||
"staticfiles": {
|
||||
"BACKEND": "django.core.cache.backends.memcached.PyMemcacheCache",
|
||||
"OPTIONS": {
|
||||
"no_delay": true,
|
||||
"ignore_exc": true,
|
||||
"use_pooling": true
|
||||
},
|
||||
"KEY_FUNCTION": "common.djangoapps.util.memcache.safe_key",
|
||||
"KEY_PREFIX": "integration_static_files",
|
||||
"LOCATION": [
|
||||
"localhost:11211"
|
||||
]
|
||||
}
|
||||
},
|
||||
"CELERY_ALWAYS_EAGER": true,
|
||||
"CELERY_BROKER_HOSTNAME": "localhost",
|
||||
"CELERY_BROKER_TRANSPORT": "amqp",
|
||||
"CERT_QUEUE": "certificates",
|
||||
"CLEAR_REQUEST_CACHE_ON_TASK_COMPLETION": false,
|
||||
"CMS_BASE": "localhost:8031",
|
||||
"CODE_JAIL": {
|
||||
"limits": {
|
||||
"REALTIME": 3,
|
||||
"VMEM": 0
|
||||
}
|
||||
},
|
||||
"COMMENTS_SERVICE_KEY": "password",
|
||||
"COMMENTS_SERVICE_URL": "http://localhost:4567",
|
||||
"CONTACT_EMAIL": "info@example.com",
|
||||
"DEFAULT_FEEDBACK_EMAIL": "feedback@example.com",
|
||||
"DEFAULT_FROM_EMAIL": "registration@example.com",
|
||||
"EMAIL_BACKEND": "django.core.mail.backends.smtp.EmailBackend",
|
||||
"SOCIAL_SHARING_SETTINGS": {
|
||||
"CUSTOM_COURSE_URLS": true
|
||||
},
|
||||
"FEATURES": {
|
||||
"CERTIFICATES_HTML_VIEW": true,
|
||||
"ENABLE_DISCUSSION_SERVICE": true,
|
||||
"ENABLE_GRADE_DOWNLOADS": true,
|
||||
"ENTRANCE_EXAMS": true,
|
||||
"MILESTONES_APP": true,
|
||||
"PREVIEW_LMS_BASE": "preview.localhost:8003",
|
||||
"ENABLE_CONTENT_LIBRARIES": true,
|
||||
"ENABLE_SPECIAL_EXAMS": true,
|
||||
"SHOW_HEADER_LANGUAGE_SELECTOR": true,
|
||||
"ENABLE_EXTENDED_COURSE_DETAILS": true,
|
||||
"CUSTOM_COURSES_EDX": true
|
||||
},
|
||||
"FEEDBACK_SUBMISSION_EMAIL": "",
|
||||
"GITHUB_REPO_ROOT": "** OVERRIDDEN **",
|
||||
"GRADES_DOWNLOAD": {
|
||||
"BUCKET": "edx-grades",
|
||||
"ROOT_PATH": "/tmp/edx-s3/grades",
|
||||
"STORAGE_TYPE": "localfs"
|
||||
},
|
||||
"LMS_BASE": "localhost:8003",
|
||||
"LMS_ROOT_URL": "http://localhost:8003",
|
||||
"LOCAL_LOGLEVEL": "INFO",
|
||||
"LOGGING_ENV": "sandbox",
|
||||
"LOG_DIR": "** OVERRIDDEN **",
|
||||
"MEDIA_URL": "/media/",
|
||||
"MKTG_URL_LINK_MAP": {},
|
||||
"SERVER_EMAIL": "devops@example.com",
|
||||
"SESSION_COOKIE_DOMAIN": null,
|
||||
"SITE_NAME": "localhost",
|
||||
"STATIC_URL_BASE": "/static/",
|
||||
"SYSLOG_SERVER": "",
|
||||
"TECH_SUPPORT_EMAIL": "technical@example.com",
|
||||
"TIME_ZONE": "America/New_York",
|
||||
"WIKI_ENABLED": true,
|
||||
}
|
||||
@@ -1,184 +0,0 @@
|
||||
"""
|
||||
Settings for Bok Choy tests that are used when running Studio.
|
||||
|
||||
Bok Choy uses two different settings files:
|
||||
1. test_static_optimized is used when invoking collectstatic
|
||||
2. bok_choy is used when running the tests
|
||||
|
||||
Note: it isn't possible to have a single settings file, because Django doesn't
|
||||
support both generating static assets to a directory and also serving static
|
||||
from the same directory.
|
||||
"""
|
||||
|
||||
|
||||
# Silence noisy logs
|
||||
import logging
|
||||
import os
|
||||
|
||||
from django.utils.translation import gettext_lazy
|
||||
from path import Path as path
|
||||
|
||||
from openedx.core.release import RELEASE_LINE
|
||||
from xmodule.modulestore.modulestore_settings import update_module_store_settings # lint-amnesty, pylint: disable=wrong-import-order
|
||||
|
||||
########################## Prod-like settings ###################################
|
||||
# These should be as close as possible to the settings we use in production.
|
||||
# As in prod, we read in environment and auth variables from JSON files.
|
||||
# Unlike in prod, we use the JSON files stored in this repo.
|
||||
# This is a convenience for ensuring (a) that we can consistently find the files
|
||||
# and (b) that the files are the same in Jenkins as in local dev.
|
||||
os.environ['SERVICE_VARIANT'] = 'bok_choy_docker' if 'BOK_CHOY_HOSTNAME' in os.environ else 'bok_choy'
|
||||
CONFIG_ROOT = path(__file__).abspath().dirname()
|
||||
os.environ['STUDIO_CFG'] = str.format("{config_root}/{service_variant}.yml",
|
||||
config_root=CONFIG_ROOT,
|
||||
service_variant=os.environ['SERVICE_VARIANT'])
|
||||
os.environ['REVISION_CFG'] = f"{CONFIG_ROOT}/revisions.yml"
|
||||
|
||||
from .production import * # pylint: disable=wildcard-import, unused-wildcard-import, wrong-import-position
|
||||
|
||||
|
||||
######################### Testing overrides ####################################
|
||||
|
||||
# Redirect to the test_root folder within the repo
|
||||
TEST_ROOT = REPO_ROOT / "test_root"
|
||||
GITHUB_REPO_ROOT = (TEST_ROOT / "data").abspath()
|
||||
LOG_DIR = (TEST_ROOT / "log").abspath()
|
||||
DATA_DIR = TEST_ROOT / "data"
|
||||
|
||||
# Configure modulestore to use the test folder within the repo
|
||||
update_module_store_settings(
|
||||
MODULESTORE,
|
||||
module_store_options={
|
||||
'fs_root': (TEST_ROOT / "data").abspath(),
|
||||
},
|
||||
xml_store_options={
|
||||
'data_dir': (TEST_ROOT / "data").abspath(),
|
||||
},
|
||||
default_store=os.environ.get('DEFAULT_STORE', 'draft'),
|
||||
)
|
||||
|
||||
# Needed to enable licensing on video blocks
|
||||
XBLOCK_SETTINGS.update({'VideoBlock': {'licensing_enabled': True}})
|
||||
|
||||
# Capture the console log via template includes, until webdriver supports log capture again
|
||||
CAPTURE_CONSOLE_LOG = True
|
||||
|
||||
PLATFORM_NAME = gettext_lazy("édX")
|
||||
PLATFORM_DESCRIPTION = gettext_lazy("Open édX Platform")
|
||||
STUDIO_NAME = gettext_lazy("Your Platform 𝓢𝓽𝓾𝓭𝓲𝓸")
|
||||
STUDIO_SHORT_NAME = gettext_lazy("𝓢𝓽𝓾𝓭𝓲𝓸")
|
||||
|
||||
############################ STATIC FILES #############################
|
||||
|
||||
# Enable debug so that static assets are served by Django
|
||||
DEBUG = True
|
||||
|
||||
# Serve static files at /static directly from the staticfiles directory under test root
|
||||
# Note: optimized files for testing are generated with settings from test_static_optimized
|
||||
STATIC_URL = "/static/"
|
||||
STATICFILES_FINDERS = [
|
||||
'django.contrib.staticfiles.finders.FileSystemFinder',
|
||||
]
|
||||
STATICFILES_DIRS = [
|
||||
(TEST_ROOT / "staticfiles" / "cms").abspath(),
|
||||
]
|
||||
|
||||
DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
|
||||
MEDIA_ROOT = TEST_ROOT / "uploads"
|
||||
|
||||
WEBPACK_LOADER['DEFAULT']['STATS_FILE'] = TEST_ROOT / "staticfiles" / "cms" / "webpack-stats.json"
|
||||
|
||||
LOG_OVERRIDES = [
|
||||
('common.djangoapps.track.middleware', logging.CRITICAL),
|
||||
('edx.discussion', logging.CRITICAL),
|
||||
]
|
||||
for log_name, log_level in LOG_OVERRIDES:
|
||||
logging.getLogger(log_name).setLevel(log_level)
|
||||
|
||||
# Use the auto_auth workflow for creating users and logging them in
|
||||
FEATURES['AUTOMATIC_AUTH_FOR_TESTING'] = True
|
||||
FEATURES['RESTRICT_AUTOMATIC_AUTH'] = False
|
||||
|
||||
# Enable milestones app
|
||||
FEATURES['MILESTONES_APP'] = True
|
||||
|
||||
# Enable pre-requisite course
|
||||
FEATURES['ENABLE_PREREQUISITE_COURSES'] = True
|
||||
|
||||
# Enable student notes
|
||||
FEATURES['ENABLE_EDXNOTES'] = True
|
||||
|
||||
# Enable teams feature
|
||||
FEATURES['ENABLE_TEAMS'] = True
|
||||
|
||||
# Enable custom content licensing
|
||||
FEATURES['LICENSING'] = True
|
||||
|
||||
FEATURES['ENABLE_MOBILE_REST_API'] = True # Enable video bumper in Studio
|
||||
FEATURES['ENABLE_VIDEO_BUMPER'] = True # Enable video bumper in Studio settings
|
||||
|
||||
FEATURES['ENABLE_ENROLLMENT_TRACK_USER_PARTITION'] = True
|
||||
|
||||
# Whether archived courses (courses with end dates in the past) should be
|
||||
# shown in Studio in a separate list.
|
||||
FEATURES['ENABLE_SEPARATE_ARCHIVED_COURSES'] = True
|
||||
|
||||
# Enable support for OpenBadges accomplishments
|
||||
FEATURES['ENABLE_OPENBADGES'] = True
|
||||
|
||||
# Enable partner support link in Studio footer
|
||||
PARTNER_SUPPORT_EMAIL = 'partner-support@example.com'
|
||||
|
||||
########################### Entrance Exams #################################
|
||||
FEATURES['ENTRANCE_EXAMS'] = True
|
||||
|
||||
FEATURES['ENABLE_SPECIAL_EXAMS'] = True
|
||||
|
||||
# Point the URL used to test YouTube availability to our stub YouTube server
|
||||
YOUTUBE_PORT = 9080
|
||||
YOUTUBE['TEST_TIMEOUT'] = 5000
|
||||
YOUTUBE_HOSTNAME = os.environ.get('BOK_CHOY_HOSTNAME', '127.0.0.1')
|
||||
YOUTUBE['API'] = f"http://{YOUTUBE_HOSTNAME}:{YOUTUBE_PORT}/get_youtube_api/"
|
||||
YOUTUBE['METADATA_URL'] = f"http://{YOUTUBE_HOSTNAME}:{YOUTUBE_PORT}/test_youtube/"
|
||||
|
||||
FEATURES['ENABLE_COURSEWARE_INDEX'] = True
|
||||
FEATURES['ENABLE_LIBRARY_INDEX'] = True
|
||||
FEATURES['ENABLE_CONTENT_LIBRARY_INDEX'] = False
|
||||
|
||||
ORGANIZATIONS_AUTOCREATE = False
|
||||
|
||||
SEARCH_ENGINE = "search.tests.mock_search_engine.MockSearchEngine"
|
||||
# Path at which to store the mock index
|
||||
MOCK_SEARCH_BACKING_FILE = (
|
||||
TEST_ROOT / "index_file.dat"
|
||||
).abspath()
|
||||
|
||||
# this secret key should be the same as lms/envs/bok_choy.py's
|
||||
SECRET_KEY = "very_secret_bok_choy_key"
|
||||
|
||||
LMS_ROOT_URL = "http://localhost:8003"
|
||||
if RELEASE_LINE == "master":
|
||||
# On master, acceptance tests use edX books, not the default Open edX books.
|
||||
HELP_TOKENS_BOOKS = {
|
||||
'learner': 'https://edx.readthedocs.io/projects/edx-guide-for-students',
|
||||
'course_author': 'https://edx.readthedocs.io/projects/edx-partner-course-staff',
|
||||
}
|
||||
|
||||
########################## VIDEO TRANSCRIPTS STORAGE ############################
|
||||
VIDEO_TRANSCRIPTS_SETTINGS = dict(
|
||||
VIDEO_TRANSCRIPTS_MAX_BYTES=3 * 1024 * 1024, # 3 MB
|
||||
STORAGE_KWARGS=dict(
|
||||
location=MEDIA_ROOT,
|
||||
base_url=MEDIA_URL,
|
||||
),
|
||||
DIRECTORY_PREFIX='video-transcripts/',
|
||||
)
|
||||
|
||||
INSTALLED_APPS.append('openedx.testing.coverage_context_listener')
|
||||
|
||||
#####################################################################
|
||||
# Lastly, see if the developer has any local overrides.
|
||||
try:
|
||||
from .private import * # pylint: disable=wildcard-import
|
||||
except ImportError:
|
||||
pass
|
||||
@@ -1,150 +0,0 @@
|
||||
# ingested bok_choy.env.json
|
||||
# ingested bok_choy.auth.json
|
||||
AWS_ACCESS_KEY_ID: ''
|
||||
AWS_SECRET_ACCESS_KEY: ''
|
||||
BUGS_EMAIL: bugs@example.com
|
||||
BULK_EMAIL_DEFAULT_FROM_EMAIL: no-reply@example.com
|
||||
CACHES:
|
||||
celery:
|
||||
BACKEND: django.core.cache.backends.memcached.PyMemcacheCache
|
||||
OPTIONS:
|
||||
ignore_exc: true
|
||||
no_delay: true
|
||||
use_pooling: true
|
||||
KEY_FUNCTION: common.djangoapps.util.memcache.safe_key
|
||||
KEY_PREFIX: integration_celery
|
||||
LOCATION: ['localhost:11211']
|
||||
default:
|
||||
BACKEND: django.core.cache.backends.memcached.PyMemcacheCache
|
||||
OPTIONS:
|
||||
ignore_exc: true
|
||||
no_delay: true
|
||||
use_pooling: true
|
||||
KEY_FUNCTION: common.djangoapps.util.memcache.safe_key
|
||||
KEY_PREFIX: sandbox_default
|
||||
LOCATION: ['localhost:11211']
|
||||
general:
|
||||
BACKEND: django.core.cache.backends.memcached.PyMemcacheCache
|
||||
OPTIONS:
|
||||
ignore_exc: true
|
||||
no_delay: true
|
||||
use_pooling: true
|
||||
KEY_FUNCTION: common.djangoapps.util.memcache.safe_key
|
||||
KEY_PREFIX: sandbox_general
|
||||
LOCATION: ['localhost:11211']
|
||||
mongo_metadata_inheritance:
|
||||
BACKEND: django.core.cache.backends.memcached.PyMemcacheCache
|
||||
OPTIONS:
|
||||
ignore_exc: true
|
||||
no_delay: true
|
||||
use_pooling: true
|
||||
KEY_FUNCTION: common.djangoapps.util.memcache.safe_key
|
||||
KEY_PREFIX: integration_mongo_metadata_inheritance
|
||||
LOCATION: ['localhost:11211']
|
||||
staticfiles:
|
||||
BACKEND: django.core.cache.backends.memcached.PyMemcacheCache
|
||||
OPTIONS:
|
||||
ignore_exc: true
|
||||
no_delay: true
|
||||
use_pooling: true
|
||||
KEY_FUNCTION: common.djangoapps.util.memcache.safe_key
|
||||
KEY_PREFIX: integration_static_files
|
||||
LOCATION: ['localhost:11211']
|
||||
CELERY_ALWAYS_EAGER: true
|
||||
CELERY_BROKER_HOSTNAME: localhost
|
||||
CELERY_BROKER_PASSWORD: celery
|
||||
CELERY_BROKER_TRANSPORT: amqp
|
||||
CELERY_BROKER_USER: celery
|
||||
CLEAR_REQUEST_CACHE_ON_TASK_COMPLETION: false
|
||||
CERT_QUEUE: certificates
|
||||
CMS_BASE: localhost:8031
|
||||
CODE_JAIL:
|
||||
limits: {REALTIME: 3, VMEM: 0}
|
||||
COMMENTS_SERVICE_KEY: password
|
||||
COMMENTS_SERVICE_URL: http://localhost:4567
|
||||
CONTACT_EMAIL: info@example.com
|
||||
CONTENTSTORE:
|
||||
DOC_STORE_CONFIG:
|
||||
collection: modulestore
|
||||
db: test
|
||||
host: [localhost]
|
||||
port: 27017
|
||||
ENGINE: xmodule.contentstore.mongo.MongoContentStore
|
||||
OPTIONS:
|
||||
db: test
|
||||
host: [localhost]
|
||||
port: 27017
|
||||
DATABASES:
|
||||
default: {ENGINE: django.db.backends.mysql, HOST: localhost, NAME: edxtest, PASSWORD: '',
|
||||
PORT: '3306', USER: root}
|
||||
student_module_history: {ENGINE: django.db.backends.mysql, HOST: localhost, NAME: student_module_history_test,
|
||||
PASSWORD: '', PORT: '3306', USER: root}
|
||||
DEFAULT_FEEDBACK_EMAIL: feedback@example.com
|
||||
DEFAULT_FROM_EMAIL: registration@example.com
|
||||
DJFS: {aws_access_key_id: test, aws_secret_access_key: test, bucket: test, prefix: test,
|
||||
type: s3fs}
|
||||
DOC_STORE_CONFIG:
|
||||
collection: modulestore
|
||||
db: test
|
||||
host: [localhost]
|
||||
port: 27017
|
||||
EMAIL_BACKEND: django.core.mail.backends.smtp.EmailBackend
|
||||
FEATURES: {CERTIFICATES_HTML_VIEW: true, CUSTOM_COURSES_EDX: true,
|
||||
ENABLE_CONTENT_LIBRARIES: true, ENABLE_DISCUSSION_SERVICE: true, ENABLE_EXTENDED_COURSE_DETAILS: true,
|
||||
ENABLE_GRADE_DOWNLOADS: true, ENABLE_SPECIAL_EXAMS: true, ENTRANCE_EXAMS: true,
|
||||
MILESTONES_APP: true, PREVIEW_LMS_BASE: 'preview.localhost:8003', SHOW_HEADER_LANGUAGE_SELECTOR: true}
|
||||
GITHUB_REPO_ROOT: '** OVERRIDDEN **'
|
||||
GRADES_DOWNLOAD: {BUCKET: edx-grades, ROOT_PATH: /tmp/edx-s3/grades, STORAGE_TYPE: localfs}
|
||||
JWT_AUTH: {JWT_PUBLIC_SIGNING_JWK_SET: '{"keys": [{"kid":
|
||||
"BTZ9HA6K", "e": "AQAB", "kty": "RSA", "n": "o5cn3ljSRi6FaDEKTn0PS-oL9EFyv1pI7dRgffQLD1qf5D6sprmYfWWokSsrWig8u2y0HChSygR6Jn5KXBqQn6FpM0dDJLnWQDRXHLl3Ey1iPYgDSmOIsIGrV9ZyNCQwk03wAgWbfdBTig3QSDYD-sTNOs3pc4UD_PqAvU2nz_1SS2ZiOwOn5F6gulE1L0iE3KEUEvOIagfHNVhz0oxa_VRZILkzV-zr6R_TW1m97h4H8jXl_VJyQGyhMGGypuDrQ9_vaY_RLEulLCyY0INglHWQ7pckxBtI5q55-Vio2wgewe2_qYcGsnBGaDNbySAsvYcWRrqDiFyzrJYivodqTQ"}]}',
|
||||
JWT_SECRET_KEY: super-secret-key}
|
||||
LMS_BASE: localhost:8003
|
||||
LMS_ROOT_URL: http://localhost:8003
|
||||
LOCAL_LOGLEVEL: INFO
|
||||
LOGGING_ENV: sandbox
|
||||
LOG_DIR: '** OVERRIDDEN **'
|
||||
MEDIA_URL: /media/
|
||||
MKTG_URL_LINK_MAP: {}
|
||||
MODULESTORE:
|
||||
default:
|
||||
ENGINE: xmodule.modulestore.mixed.MixedModuleStore
|
||||
OPTIONS:
|
||||
mappings: {}
|
||||
stores:
|
||||
- DOC_STORE_CONFIG:
|
||||
collection: modulestore
|
||||
db: test
|
||||
host: [localhost]
|
||||
port: 27017
|
||||
ENGINE: xmodule.modulestore.mongo.DraftMongoModuleStore
|
||||
NAME: draft
|
||||
OPTIONS:
|
||||
collection: modulestore
|
||||
db: test
|
||||
default_class: xmodule.hidden_block.HiddenBlock
|
||||
fs_root: '** OVERRIDDEN **'
|
||||
host: [localhost]
|
||||
port: 27017
|
||||
render_template: common.djangoapps.edxmako.shortcuts.render_to_string
|
||||
- ENGINE: xmodule.modulestore.xml.XMLModuleStore
|
||||
NAME: xml
|
||||
OPTIONS: {data_dir: '** OVERRIDDEN **', default_class: xmodule.hidden_block.HiddenBlock}
|
||||
# We need to test different scenarios, following setting effectively disbale rate limiting
|
||||
PASSWORD_RESET_IP_RATE: '1/s'
|
||||
PASSWORD_RESET_EMAIL_RATE: '1/s'
|
||||
SECRET_KEY: ''
|
||||
SERVER_EMAIL: devops@example.com
|
||||
SESSION_COOKIE_DOMAIN: null
|
||||
SITE_NAME: localhost
|
||||
SOCIAL_SHARING_SETTINGS: {CUSTOM_COURSE_URLS: true}
|
||||
STATIC_URL_BASE: /static/
|
||||
SYSLOG_SERVER: ''
|
||||
TECH_SUPPORT_EMAIL: technical@example.com
|
||||
TIME_ZONE: America/New_York
|
||||
WIKI_ENABLED: true
|
||||
XQUEUE_INTERFACE:
|
||||
basic_auth: [edx, edx]
|
||||
django_auth: {password: password, username: lms}
|
||||
url: http://localhost:18040
|
||||
ZENDESK_API_KEY: ''
|
||||
ZENDESK_USER: ''
|
||||
@@ -1,116 +0,0 @@
|
||||
{
|
||||
"AWS_ACCESS_KEY_ID": "",
|
||||
"AWS_SECRET_ACCESS_KEY": "",
|
||||
"CELERY_BROKER_PASSWORD": "celery",
|
||||
"CELERY_BROKER_USER": "celery",
|
||||
"CONTENTSTORE": {
|
||||
"DOC_STORE_CONFIG": {
|
||||
"collection": "modulestore",
|
||||
"db": "test",
|
||||
"host": [
|
||||
"edx.devstack.mongo"
|
||||
],
|
||||
"port": 27017
|
||||
},
|
||||
"ENGINE": "xmodule.contentstore.mongo.MongoContentStore",
|
||||
"OPTIONS": {
|
||||
"db": "test",
|
||||
"host": [
|
||||
"edx.devstack.mongo"
|
||||
],
|
||||
"port": 27017
|
||||
}
|
||||
},
|
||||
"DATABASES": {
|
||||
"default": {
|
||||
"ENGINE": "django.db.backends.mysql",
|
||||
"HOST": "edx.devstack.mysql57",
|
||||
"NAME": "edxtest",
|
||||
"PASSWORD": "",
|
||||
"PORT": "3306",
|
||||
"USER": "root"
|
||||
},
|
||||
"student_module_history": {
|
||||
"ENGINE": "django.db.backends.mysql",
|
||||
"HOST": "edx.devstack.mysql57",
|
||||
"NAME": "student_module_history_test",
|
||||
"PASSWORD": "",
|
||||
"PORT": "3306",
|
||||
"USER": "root"
|
||||
}
|
||||
},
|
||||
"DOC_STORE_CONFIG": {
|
||||
"collection": "modulestore",
|
||||
"db": "test",
|
||||
"host": [
|
||||
"edx.devstack.mongo"
|
||||
],
|
||||
"port": 27017
|
||||
},
|
||||
"JWT_AUTH": {
|
||||
"JWT_SECRET_KEY": "super-secret-key",
|
||||
"JWT_PUBLIC_SIGNING_JWK_SET": "{\"keys\": [{\"kid\": \"BTZ9HA6K\", \"e\": \"AQAB\", \"kty\": \"RSA\", \"n\": \"o5cn3ljSRi6FaDEKTn0PS-oL9EFyv1pI7dRgffQLD1qf5D6sprmYfWWokSsrWig8u2y0HChSygR6Jn5KXBqQn6FpM0dDJLnWQDRXHLl3Ey1iPYgDSmOIsIGrV9ZyNCQwk03wAgWbfdBTig3QSDYD-sTNOs3pc4UD_PqAvU2nz_1SS2ZiOwOn5F6gulE1L0iE3KEUEvOIagfHNVhz0oxa_VRZILkzV-zr6R_TW1m97h4H8jXl_VJyQGyhMGGypuDrQ9_vaY_RLEulLCyY0INglHWQ7pckxBtI5q55-Vio2wgewe2_qYcGsnBGaDNbySAsvYcWRrqDiFyzrJYivodqTQ\"}]}"
|
||||
},
|
||||
"MODULESTORE": {
|
||||
"default": {
|
||||
"ENGINE": "xmodule.modulestore.mixed.MixedModuleStore",
|
||||
"OPTIONS": {
|
||||
"mappings": {},
|
||||
"stores": [
|
||||
{
|
||||
"NAME": "draft",
|
||||
"DOC_STORE_CONFIG": {
|
||||
"collection": "modulestore",
|
||||
"db": "test",
|
||||
"host": [
|
||||
"edx.devstack.mongo"
|
||||
],
|
||||
"port": 27017
|
||||
},
|
||||
"ENGINE": "xmodule.modulestore.mongo.DraftMongoModuleStore",
|
||||
"OPTIONS": {
|
||||
"collection": "modulestore",
|
||||
"db": "test",
|
||||
"default_class": "xmodule.hidden_block.HiddenBlock",
|
||||
"fs_root": "** OVERRIDDEN **",
|
||||
"host": [
|
||||
"edx.devstack.mongo"
|
||||
],
|
||||
"port": 27017,
|
||||
"render_template": "common.djangoapps.edxmako.shortcuts.render_to_string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"NAME": "xml",
|
||||
"ENGINE": "xmodule.modulestore.xml.XMLModuleStore",
|
||||
"OPTIONS": {
|
||||
"data_dir": "** OVERRIDDEN **",
|
||||
"default_class": "xmodule.hidden_block.HiddenBlock"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"DJFS": {
|
||||
"type": "s3fs",
|
||||
"bucket": "test",
|
||||
"prefix": "test",
|
||||
"aws_access_key_id": "test",
|
||||
"aws_secret_access_key": "test"
|
||||
},
|
||||
"SECRET_KEY": "",
|
||||
"XQUEUE_INTERFACE": {
|
||||
"basic_auth": [
|
||||
"edx",
|
||||
"edx"
|
||||
],
|
||||
"django_auth": {
|
||||
"password": "password",
|
||||
"username": "lms"
|
||||
},
|
||||
"url": "http://localhost:18040"
|
||||
},
|
||||
"ZENDESK_API_KEY": "",
|
||||
"ZENDESK_USER": ""
|
||||
}
|
||||
@@ -1,126 +0,0 @@
|
||||
{
|
||||
"BUGS_EMAIL": "bugs@example.com",
|
||||
"BULK_EMAIL_DEFAULT_FROM_EMAIL": "no-reply@example.com",
|
||||
"CACHES": {
|
||||
"celery": {
|
||||
"BACKEND": "django.core.cache.backends.memcached.PyMemcacheCache",
|
||||
"OPTIONS": {
|
||||
"no_delay": true,
|
||||
"ignore_exc": true,
|
||||
"use_pooling": true
|
||||
},
|
||||
"KEY_FUNCTION": "common.djangoapps.util.memcache.safe_key",
|
||||
"KEY_PREFIX": "integration_celery",
|
||||
"LOCATION": [
|
||||
"edx.devstack.memcached:11211"
|
||||
]
|
||||
},
|
||||
"default": {
|
||||
"BACKEND": "django.core.cache.backends.memcached.PyMemcacheCache",
|
||||
"OPTIONS": {
|
||||
"no_delay": true,
|
||||
"ignore_exc": true,
|
||||
"use_pooling": true
|
||||
},
|
||||
"KEY_FUNCTION": "common.djangoapps.util.memcache.safe_key",
|
||||
"KEY_PREFIX": "sandbox_default",
|
||||
"LOCATION": [
|
||||
"edx.devstack.memcached:11211"
|
||||
]
|
||||
},
|
||||
"general": {
|
||||
"BACKEND": "django.core.cache.backends.memcached.PyMemcacheCache",
|
||||
"OPTIONS": {
|
||||
"no_delay": true,
|
||||
"ignore_exc": true,
|
||||
"use_pooling": true
|
||||
},
|
||||
"KEY_FUNCTION": "common.djangoapps.util.memcache.safe_key",
|
||||
"KEY_PREFIX": "sandbox_general",
|
||||
"LOCATION": [
|
||||
"edx.devstack.memcached:11211"
|
||||
]
|
||||
},
|
||||
"mongo_metadata_inheritance": {
|
||||
"BACKEND": "django.core.cache.backends.memcached.PyMemcacheCache",
|
||||
"OPTIONS": {
|
||||
"no_delay": true,
|
||||
"ignore_exc": true,
|
||||
"use_pooling": true
|
||||
},
|
||||
"KEY_FUNCTION": "common.djangoapps.util.memcache.safe_key",
|
||||
"KEY_PREFIX": "integration_mongo_metadata_inheritance",
|
||||
"LOCATION": [
|
||||
"edx.devstack.memcached:11211"
|
||||
]
|
||||
},
|
||||
"staticfiles": {
|
||||
"BACKEND": "django.core.cache.backends.memcached.PyMemcacheCache",
|
||||
"OPTIONS": {
|
||||
"no_delay": true,
|
||||
"ignore_exc": true,
|
||||
"use_pooling": true
|
||||
},
|
||||
"KEY_FUNCTION": "common.djangoapps.util.memcache.safe_key",
|
||||
"KEY_PREFIX": "integration_static_files",
|
||||
"LOCATION": [
|
||||
"edx.devstack.memcached:11211"
|
||||
]
|
||||
}
|
||||
},
|
||||
"CELERY_ALWAYS_EAGER": true,
|
||||
"CLEAR_REQUEST_CACHE_ON_TASK_COMPLETION": false,
|
||||
"CELERY_BROKER_HOSTNAME": "localhost",
|
||||
"CELERY_BROKER_TRANSPORT": "amqp",
|
||||
"CERT_QUEUE": "certificates",
|
||||
"CMS_BASE": "** OVERRIDDEN **",
|
||||
"CODE_JAIL": {
|
||||
"limits": {
|
||||
"REALTIME": 3,
|
||||
"VMEM": 0
|
||||
}
|
||||
},
|
||||
"COMMENTS_SERVICE_KEY": "password",
|
||||
"COMMENTS_SERVICE_URL": "http://edx.devstack.studio:4567",
|
||||
"CONTACT_EMAIL": "info@example.com",
|
||||
"DEFAULT_FEEDBACK_EMAIL": "feedback@example.com",
|
||||
"DEFAULT_FROM_EMAIL": "registration@example.com",
|
||||
"EMAIL_BACKEND": "django.core.mail.backends.smtp.EmailBackend",
|
||||
"SOCIAL_SHARING_SETTINGS": {
|
||||
"CUSTOM_COURSE_URLS": true
|
||||
},
|
||||
"FEATURES": {
|
||||
"CERTIFICATES_HTML_VIEW": true,
|
||||
"ENABLE_DISCUSSION_SERVICE": true,
|
||||
"ENABLE_GRADE_DOWNLOADS": true,
|
||||
"ENTRANCE_EXAMS": true,
|
||||
"MILESTONES_APP": true,
|
||||
"PREVIEW_LMS_BASE": "preview.localhost:8003",
|
||||
"ENABLE_CONTENT_LIBRARIES": true,
|
||||
"ENABLE_SPECIAL_EXAMS": true,
|
||||
"SHOW_HEADER_LANGUAGE_SELECTOR": true,
|
||||
"ENABLE_EXTENDED_COURSE_DETAILS": true,
|
||||
"CUSTOM_COURSES_EDX": true
|
||||
},
|
||||
"GITHUB_REPO_ROOT": "** OVERRIDDEN **",
|
||||
"GRADES_DOWNLOAD": {
|
||||
"BUCKET": "edx-grades",
|
||||
"ROOT_PATH": "/tmp/edx-s3/grades",
|
||||
"STORAGE_TYPE": "localfs"
|
||||
},
|
||||
"LMS_BASE": "** OVERRIDDEN **",
|
||||
"LMS_ROOT_URL": "** OVERRIDDEN **",
|
||||
"LOCAL_LOGLEVEL": "INFO",
|
||||
"LOGGING_ENV": "sandbox",
|
||||
"LOG_DIR": "** OVERRIDDEN **",
|
||||
"MEDIA_URL": "/media/",
|
||||
"MKTG_URL_LINK_MAP": {},
|
||||
"SERVER_EMAIL": "devops@example.com",
|
||||
"SESSION_COOKIE_DOMAIN": null,
|
||||
"SITE_NAME": "localhost",
|
||||
"STATIC_URL_BASE": "/static/",
|
||||
"SYSLOG_SERVER": "",
|
||||
"TECH_SUPPORT_EMAIL": "technical@example.com",
|
||||
"TIME_ZONE": "America/New_York",
|
||||
"WIKI_ENABLED": true,
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
"""
|
||||
Settings for Bok Choy tests that are used when running Studio in Docker-based devstack.
|
||||
"""
|
||||
|
||||
# noinspection PyUnresolvedReferences
|
||||
from .bok_choy import * # pylint: disable=wildcard-import
|
||||
|
||||
CMS_BASE = '{}:{}'.format(os.environ['BOK_CHOY_HOSTNAME'], os.environ.get('BOK_CHOY_CMS_PORT', 8031))
|
||||
LMS_BASE = '{}:{}'.format(os.environ['BOK_CHOY_HOSTNAME'], os.environ.get('BOK_CHOY_LMS_PORT', 8003))
|
||||
LMS_ROOT_URL = f'http://{LMS_BASE}'
|
||||
LOGIN_REDIRECT_WHITELIST = [CMS_BASE]
|
||||
|
||||
COMMENTS_SERVICE_URL = 'http://{}:4567'.format(os.environ['BOK_CHOY_HOSTNAME'])
|
||||
EDXNOTES_PUBLIC_API = 'http://{}:8042/api/v1'.format(os.environ['BOK_CHOY_HOSTNAME'])
|
||||
|
||||
# Docker does not support the syslog socket at /dev/log. Rely on the console.
|
||||
LOGGING['handlers']['local'] = LOGGING['handlers']['tracking'] = {
|
||||
'class': 'logging.NullHandler',
|
||||
}
|
||||
|
||||
LOGGING['loggers']['tracking']['handlers'] = ['console']
|
||||
|
||||
# Point the URL used to test YouTube availability to our stub YouTube server
|
||||
BOK_CHOY_HOST = os.environ['BOK_CHOY_HOSTNAME']
|
||||
YOUTUBE['API'] = f"http://{BOK_CHOY_HOST}:{YOUTUBE_PORT}/get_youtube_api/"
|
||||
YOUTUBE['METADATA_URL'] = f"http://{BOK_CHOY_HOST}:{YOUTUBE_PORT}/test_youtube/"
|
||||
@@ -1,147 +0,0 @@
|
||||
# ingested bok_choy_docker.env.json
|
||||
# ingested bok_choy_docker.auth.json
|
||||
AWS_ACCESS_KEY_ID: ''
|
||||
AWS_SECRET_ACCESS_KEY: ''
|
||||
BUGS_EMAIL: bugs@example.com
|
||||
BULK_EMAIL_DEFAULT_FROM_EMAIL: no-reply@example.com
|
||||
CACHES:
|
||||
celery:
|
||||
BACKEND: django.core.cache.backends.memcached.PyMemcacheCache
|
||||
OPTIONS:
|
||||
no_delay: true
|
||||
ignore_exc: true
|
||||
use_pooling: true
|
||||
KEY_FUNCTION: common.djangoapps.util.memcache.safe_key
|
||||
KEY_PREFIX: integration_celery
|
||||
LOCATION: ['edx.devstack.memcached:11211']
|
||||
default:
|
||||
BACKEND: django.core.cache.backends.memcached.PyMemcacheCache
|
||||
OPTIONS:
|
||||
no_delay: true
|
||||
ignore_exc: true
|
||||
use_pooling: true
|
||||
KEY_FUNCTION: common.djangoapps.util.memcache.safe_key
|
||||
KEY_PREFIX: sandbox_default
|
||||
LOCATION: ['edx.devstack.memcached:11211']
|
||||
general:
|
||||
BACKEND: django.core.cache.backends.memcached.PyMemcacheCache
|
||||
OPTIONS:
|
||||
no_delay: true
|
||||
ignore_exc: true
|
||||
use_pooling: true
|
||||
KEY_FUNCTION: common.djangoapps.util.memcache.safe_key
|
||||
KEY_PREFIX: sandbox_general
|
||||
LOCATION: ['edx.devstack.memcached:11211']
|
||||
mongo_metadata_inheritance:
|
||||
BACKEND: django.core.cache.backends.memcached.PyMemcacheCache
|
||||
OPTIONS:
|
||||
no_delay: true
|
||||
ignore_exc: true
|
||||
use_pooling: true
|
||||
KEY_FUNCTION: common.djangoapps.util.memcache.safe_key
|
||||
KEY_PREFIX: integration_mongo_metadata_inheritance
|
||||
LOCATION: ['edx.devstack.memcached:11211']
|
||||
staticfiles:
|
||||
BACKEND: django.core.cache.backends.memcached.PyMemcacheCache
|
||||
OPTIONS:
|
||||
no_delay: true
|
||||
ignore_exc: true
|
||||
use_pooling: true
|
||||
KEY_FUNCTION: common.djangoapps.util.memcache.safe_key
|
||||
KEY_PREFIX: integration_static_files
|
||||
LOCATION: ['edx.devstack.memcached:11211']
|
||||
CELERY_ALWAYS_EAGER: true
|
||||
CELERY_BROKER_HOSTNAME: localhost
|
||||
CELERY_BROKER_PASSWORD: celery
|
||||
CELERY_BROKER_TRANSPORT: amqp
|
||||
CELERY_BROKER_USER: celery
|
||||
CERT_QUEUE: certificates
|
||||
CLEAR_REQUEST_CACHE_ON_TASK_COMPLETION: false
|
||||
CMS_BASE: '** OVERRIDDEN **'
|
||||
CODE_JAIL:
|
||||
limits: {REALTIME: 3, VMEM: 0}
|
||||
COMMENTS_SERVICE_KEY: password
|
||||
COMMENTS_SERVICE_URL: http://edx.devstack.studio:4567
|
||||
CONTACT_EMAIL: info@example.com
|
||||
CONTENTSTORE:
|
||||
DOC_STORE_CONFIG:
|
||||
collection: modulestore
|
||||
db: test
|
||||
host: [edx.devstack.mongo]
|
||||
port: 27017
|
||||
ENGINE: xmodule.contentstore.mongo.MongoContentStore
|
||||
OPTIONS:
|
||||
db: test
|
||||
host: [edx.devstack.mongo]
|
||||
port: 27017
|
||||
DATABASES:
|
||||
default: {ENGINE: django.db.backends.mysql, HOST: edx.devstack.mysql57, NAME: edxtest,
|
||||
PASSWORD: '', PORT: '3306', USER: root}
|
||||
student_module_history: {ENGINE: django.db.backends.mysql, HOST: edx.devstack.mysql57,
|
||||
NAME: student_module_history_test, PASSWORD: '', PORT: '3306', USER: root}
|
||||
DEFAULT_FEEDBACK_EMAIL: feedback@example.com
|
||||
DEFAULT_FROM_EMAIL: registration@example.com
|
||||
DJFS: {aws_access_key_id: test, aws_secret_access_key: test, bucket: test, prefix: test,
|
||||
type: s3fs}
|
||||
DOC_STORE_CONFIG:
|
||||
collection: modulestore
|
||||
db: test
|
||||
host: [edx.devstack.mongo]
|
||||
port: 27017
|
||||
EMAIL_BACKEND: django.core.mail.backends.smtp.EmailBackend
|
||||
FEATURES: {CERTIFICATES_HTML_VIEW: true, CUSTOM_COURSES_EDX: true,
|
||||
ENABLE_CONTENT_LIBRARIES: true, ENABLE_DISCUSSION_SERVICE: true, ENABLE_EXTENDED_COURSE_DETAILS: true,
|
||||
ENABLE_GRADE_DOWNLOADS: true, ENABLE_SPECIAL_EXAMS: true, ENTRANCE_EXAMS: true,
|
||||
MILESTONES_APP: true, PREVIEW_LMS_BASE: 'preview.localhost:8003', SHOW_HEADER_LANGUAGE_SELECTOR: true}
|
||||
GITHUB_REPO_ROOT: '** OVERRIDDEN **'
|
||||
GRADES_DOWNLOAD: {BUCKET: edx-grades, ROOT_PATH: /tmp/edx-s3/grades, STORAGE_TYPE: localfs}
|
||||
JWT_AUTH: {JWT_PUBLIC_SIGNING_JWK_SET: '{"keys": [{"kid":
|
||||
"BTZ9HA6K", "e": "AQAB", "kty": "RSA", "n": "o5cn3ljSRi6FaDEKTn0PS-oL9EFyv1pI7dRgffQLD1qf5D6sprmYfWWokSsrWig8u2y0HChSygR6Jn5KXBqQn6FpM0dDJLnWQDRXHLl3Ey1iPYgDSmOIsIGrV9ZyNCQwk03wAgWbfdBTig3QSDYD-sTNOs3pc4UD_PqAvU2nz_1SS2ZiOwOn5F6gulE1L0iE3KEUEvOIagfHNVhz0oxa_VRZILkzV-zr6R_TW1m97h4H8jXl_VJyQGyhMGGypuDrQ9_vaY_RLEulLCyY0INglHWQ7pckxBtI5q55-Vio2wgewe2_qYcGsnBGaDNbySAsvYcWRrqDiFyzrJYivodqTQ"}]}',
|
||||
JWT_SECRET_KEY: super-secret-key}
|
||||
LMS_BASE: '** OVERRIDDEN **'
|
||||
LMS_ROOT_URL: '** OVERRIDDEN **'
|
||||
LOCAL_LOGLEVEL: INFO
|
||||
LOGGING_ENV: sandbox
|
||||
LOG_DIR: '** OVERRIDDEN **'
|
||||
MEDIA_URL: /media/
|
||||
MKTG_URL_LINK_MAP: {}
|
||||
MODULESTORE:
|
||||
default:
|
||||
ENGINE: xmodule.modulestore.mixed.MixedModuleStore
|
||||
OPTIONS:
|
||||
mappings: {}
|
||||
stores:
|
||||
- DOC_STORE_CONFIG:
|
||||
collection: modulestore
|
||||
db: test
|
||||
host: [edx.devstack.mongo]
|
||||
port: 27017
|
||||
ENGINE: xmodule.modulestore.mongo.DraftMongoModuleStore
|
||||
NAME: draft
|
||||
OPTIONS:
|
||||
collection: modulestore
|
||||
db: test
|
||||
default_class: xmodule.hidden_block.HiddenBlock
|
||||
fs_root: '** OVERRIDDEN **'
|
||||
host: [edx.devstack.mongo]
|
||||
port: 27017
|
||||
render_template: common.djangoapps.edxmako.shortcuts.render_to_string
|
||||
- ENGINE: xmodule.modulestore.xml.XMLModuleStore
|
||||
NAME: xml
|
||||
OPTIONS: {data_dir: '** OVERRIDDEN **', default_class: xmodule.hidden_block.HiddenBlock}
|
||||
SECRET_KEY: ''
|
||||
SERVER_EMAIL: devops@example.com
|
||||
SESSION_COOKIE_DOMAIN: null
|
||||
SITE_NAME: localhost
|
||||
SOCIAL_SHARING_SETTINGS: {CUSTOM_COURSE_URLS: true}
|
||||
STATIC_URL_BASE: /static/
|
||||
SYSLOG_SERVER: ''
|
||||
TECH_SUPPORT_EMAIL: technical@example.com
|
||||
TIME_ZONE: America/New_York
|
||||
WIKI_ENABLED: true
|
||||
XQUEUE_INTERFACE:
|
||||
basic_auth: [edx, edx]
|
||||
django_auth: {password: password, username: lms}
|
||||
url: http://localhost:18040
|
||||
ZENDESK_API_KEY: ''
|
||||
ZENDESK_USER: ''
|
||||
@@ -78,7 +78,7 @@ class StubLtiHandler(StubHttpRequestHandler):
|
||||
'callback_url': self.post_dict.get('lis_outcome_service_url').replace('https', 'http'),
|
||||
'sourcedId': self.post_dict.get('lis_result_sourcedid')
|
||||
}
|
||||
host = os.environ.get('BOK_CHOY_HOSTNAME', self.server.server_address[0])
|
||||
host = os.environ.get(self.server.server_address[0])
|
||||
submit_url = f'//{host}:{self.server.server_address[1]}'
|
||||
content = self._create_content(status_message, submit_url)
|
||||
self.send_response(200, content)
|
||||
@@ -296,7 +296,7 @@ class StubLtiHandler(StubHttpRequestHandler):
|
||||
|
||||
"""
|
||||
client_secret = str(self.server.config.get('client_secret', self.DEFAULT_CLIENT_SECRET))
|
||||
host = os.environ.get('BOK_CHOY_HOSTNAME', '127.0.0.1')
|
||||
host = os.environ.get('127.0.0.1')
|
||||
port = self.server.server_address[1]
|
||||
lti_base = self.DEFAULT_LTI_ADDRESS.format(host=host, port=port)
|
||||
lti_endpoint = self.server.config.get('lti_endpoint', self.DEFAULT_LTI_ENDPOINT)
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
/* eslint-env node */
|
||||
|
||||
'use strict';
|
||||
|
||||
// By default, fixtures are loaded from spec/javascripts/fixtures but in karma everything gets served from /base
|
||||
jasmine.getFixtures().fixturesPath = '/base/';
|
||||
|
||||
// https://github.com/edx/js-test-tool/blob/master/js_test_tool/templates/jasmine_test_runner.html#L10
|
||||
// Stub out modal dialog alerts, which will prevent
|
||||
// us from accessing the test results in the DOM
|
||||
window.confirm = function() { return true; };
|
||||
window.alert = function() { };
|
||||
@@ -1,29 +0,0 @@
|
||||
/* This file overrides ExceptionFormatter of jasmine before it's initialization in karma-jasmine's
|
||||
boot.js. It's important because ExceptionFormatter returns a constructor function. Once the method has been
|
||||
initialized we can't override the ExceptionFormatter as Jasmine then uses the stored reference to the function */
|
||||
(function() {
|
||||
/* globals jasmineRequire */
|
||||
|
||||
'use strict';
|
||||
|
||||
var OldExceptionFormatter = jasmineRequire.ExceptionFormatter(),
|
||||
oldExceptionFormatter = new OldExceptionFormatter(),
|
||||
MAX_STACK_TRACE_LINES = 10;
|
||||
|
||||
jasmineRequire.ExceptionFormatter = function() {
|
||||
function ExceptionFormatter() {
|
||||
this.message = oldExceptionFormatter.message;
|
||||
this.stack = function(error) {
|
||||
var errorMsg = null;
|
||||
|
||||
if (error) {
|
||||
errorMsg = error.stack.split('\n').slice(0, MAX_STACK_TRACE_LINES).join('\n');
|
||||
}
|
||||
|
||||
return errorMsg;
|
||||
};
|
||||
}
|
||||
|
||||
return ExceptionFormatter;
|
||||
};
|
||||
}());
|
||||
@@ -1,467 +0,0 @@
|
||||
// Common settings and helpers for setting up Karma config.
|
||||
//
|
||||
// To run all the tests in a suite and print results to the console:
|
||||
//
|
||||
// karma start <karma_config_for_suite_path>
|
||||
// E.g. karma start lms/static/karma_lms.conf.js
|
||||
//
|
||||
//
|
||||
// To run the tests for debugging: Debugging can be done in any browser
|
||||
// but Chrome's developer console debugging experience is best.
|
||||
//
|
||||
// karma start <karma_config_for_suite_path> --browsers=BROWSER --single-run=false
|
||||
//
|
||||
//
|
||||
// To run the tests with coverage and junit reports:
|
||||
//
|
||||
// karma start <karma_config_for_suite_path> --browsers=BROWSER
|
||||
// --coverage --junitreportpath=<xunit_report_path> --coveragereportpath=<report_path>
|
||||
//
|
||||
// where `BROWSER` could be Chrome or Firefox.
|
||||
//
|
||||
//
|
||||
// Troubleshooting tips:
|
||||
//
|
||||
// If you get an error like: "TypeError: __cov_KBCc7ZI4xZm8W2BC5NQLDg.s is undefined",
|
||||
// that means the patterns in sourceFiles and specFiles are matching the same file.
|
||||
// This causes Istanbul, which is used for tracking coverage to instrument the file
|
||||
// multiple times.
|
||||
//
|
||||
//
|
||||
// If you see the error: "EMFILE, too many open files" that means the files pattern
|
||||
// that has been added is matching too many files. The glob library used by Karma
|
||||
// does not use graceful-fs and tries to read files simultaneously.
|
||||
//
|
||||
|
||||
/* eslint-env node */
|
||||
/* globals process */
|
||||
|
||||
'use strict';
|
||||
|
||||
var path = require('path');
|
||||
var _ = require('underscore');
|
||||
|
||||
var appRoot = path.join(__dirname, '../../../../');
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
var webdriver = require('selenium-webdriver');
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
var firefox = require('selenium-webdriver/firefox');
|
||||
|
||||
var webpackConfig = require(path.join(appRoot, 'webpack.dev.config.js'));
|
||||
|
||||
// The following crazy bit is to work around the webpack.optimize.CommonsChunkPlugin
|
||||
// plugin. The problem is that it it factors out the code that defines webpackJsonp
|
||||
// and puts in in the commons JS, which Karma doesn't know to load first. This is a
|
||||
// workaround recommended in the karma-webpack bug report that basically just removes
|
||||
// the plugin for the purposes of Karma testing (the plugin is meant to be an
|
||||
// optimization only).
|
||||
// https://github.com/webpack-contrib/karma-webpack/issues/24#issuecomment-257613167
|
||||
//
|
||||
// This should be fixed in v3 of karma-webpack
|
||||
var commonsChunkPluginIndex = webpackConfig[0].plugins.findIndex(function(plugin) { return plugin.chunkNames; });
|
||||
|
||||
// Files which are needed by all lms/cms suites.
|
||||
var commonFiles = {
|
||||
libraryFiles: [
|
||||
{pattern: 'common/js/vendor/**/*.js'},
|
||||
{pattern: 'edx-ui-toolkit/js/**/*.js'},
|
||||
{pattern: 'xmodule_js/common_static/common/js/**/!(*spec).js'},
|
||||
{pattern: 'xmodule_js/common_static/js/**/!(*spec).js'},
|
||||
{pattern: 'xmodule_js/src/**/*.js'}
|
||||
],
|
||||
|
||||
sourceFiles: [
|
||||
{pattern: 'common/js/!(spec_helpers)/**/!(*spec).js'}
|
||||
],
|
||||
|
||||
specFiles: [
|
||||
{pattern: 'common/js/spec_helpers/**/*.js'}
|
||||
],
|
||||
|
||||
fixtureFiles: [
|
||||
{pattern: 'common/templates/**/*.underscore'}
|
||||
]
|
||||
};
|
||||
|
||||
webpackConfig[0].plugins.splice(commonsChunkPluginIndex, 1);
|
||||
|
||||
delete webpackConfig[0].entry;
|
||||
|
||||
/**
|
||||
* Customize the name attribute in xml testcase element
|
||||
* @param {Object} browser
|
||||
* @param {Object} result
|
||||
* @return {String}
|
||||
*/
|
||||
function junitNameFormatter(browser, result) {
|
||||
return result.suite[0] + ': ' + result.description;
|
||||
}
|
||||
|
||||
/**
|
||||
* Customize the classname attribute in xml testcase element
|
||||
* @param {Object} browser
|
||||
* @return {String}
|
||||
*/
|
||||
function junitClassNameFormatter(browser) {
|
||||
return 'Javascript.' + browser.name.split(' ')[0];
|
||||
}
|
||||
|
||||
/**
|
||||
* Return array containing default and user supplied reporters
|
||||
* @param {Object} config
|
||||
* @return {Array}
|
||||
*/
|
||||
function reporters(config) {
|
||||
var defaultReporters = ['spec', 'junit', 'kjhtml'];
|
||||
if (config.coverage) {
|
||||
defaultReporters.push('coverage');
|
||||
}
|
||||
return defaultReporters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Split a filepath into basepath and filename
|
||||
* @param {String} filepath
|
||||
* @return {Object}
|
||||
*/
|
||||
function getBasepathAndFilename(filepath) {
|
||||
var file, dir;
|
||||
|
||||
if (!filepath) {
|
||||
// these will configure the reporters to create report files relative to this karma config file
|
||||
return {
|
||||
dir: undefined,
|
||||
file: undefined
|
||||
};
|
||||
}
|
||||
file = filepath.replace(/^.*[\\/]/, '');
|
||||
dir = filepath.replace(file, '');
|
||||
|
||||
return {
|
||||
dir: dir,
|
||||
file: file
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Return coverage reporter settings
|
||||
* @param {String} config
|
||||
* @return {Object}
|
||||
*/
|
||||
function coverageSettings(config) {
|
||||
var pth = getBasepathAndFilename(config.coveragereportpath);
|
||||
return {
|
||||
dir: pth.dir,
|
||||
subdir: '.',
|
||||
includeAllSources: true,
|
||||
reporters: [
|
||||
{type: 'cobertura', file: pth.file},
|
||||
{type: 'text-summary'}
|
||||
]
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Return junit reporter settings
|
||||
* @param {String} config
|
||||
* @return {Object}
|
||||
*/
|
||||
function junitSettings(config) {
|
||||
var pth = getBasepathAndFilename(config.junitreportpath);
|
||||
return {
|
||||
outputDir: pth.dir,
|
||||
outputFile: pth.file,
|
||||
suite: 'javascript',
|
||||
useBrowserName: false,
|
||||
nameFormatter: junitNameFormatter,
|
||||
classNameFormatter: junitClassNameFormatter
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Return absolute path for files in common and xmodule_js symlink dirs.
|
||||
* @param {String} appRoot
|
||||
* @param {String} pattern
|
||||
* @return {String}
|
||||
*/
|
||||
// I'd like to fix the no-shadow violation on the next line, but it would break this shared conf's API.
|
||||
function defaultNormalizeFunc(appRoot, pattern) { // eslint-disable-line no-shadow
|
||||
var pat = pattern;
|
||||
if (pat.match(/^common\/js/)) {
|
||||
pat = path.join(appRoot, '/common/static/' + pat);
|
||||
} else if (pat.match(/^xmodule_js\/common_static/)) {
|
||||
pat = path.join(appRoot, '/common/static/'
|
||||
+ pat.replace(/^xmodule_js\/common_static\//, ''));
|
||||
}
|
||||
return pat;
|
||||
}
|
||||
|
||||
function normalizePathsForCoverage(files, normalizeFunc, preprocessors) {
|
||||
var normalizeFn = normalizeFunc || defaultNormalizeFunc,
|
||||
normalizedFile,
|
||||
filesForCoverage = {};
|
||||
|
||||
files.forEach(function(file) {
|
||||
if (!file.ignoreCoverage) {
|
||||
normalizedFile = normalizeFn(appRoot, file.pattern);
|
||||
if (preprocessors && preprocessors.hasOwnProperty(normalizedFile)) {
|
||||
filesForCoverage[normalizedFile] = ['coverage'].concat(preprocessors[normalizedFile]);
|
||||
} else {
|
||||
filesForCoverage[normalizedFile] = ['coverage'];
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return filesForCoverage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets defaults for each file pattern.
|
||||
* RequireJS files are excluded by default.
|
||||
* Webpack files are included by default.
|
||||
* @param {Object} files
|
||||
* @return {Object}
|
||||
*/
|
||||
function setDefaults(files) {
|
||||
return files.map(function(f) {
|
||||
var file = _.isObject(f) ? f : {pattern: f};
|
||||
if (!file.included && !file.webpack) {
|
||||
file.included = false;
|
||||
}
|
||||
return file;
|
||||
});
|
||||
}
|
||||
|
||||
function getBaseConfig(config, useRequireJs) {
|
||||
var getFrameworkFiles = function() {
|
||||
var files = [
|
||||
'common/static/common/js/vendor/jquery.js',
|
||||
'node_modules/jasmine-core/lib/jasmine-core/jasmine.js',
|
||||
'common/static/common/js/jasmine_stack_trace.js',
|
||||
'node_modules/karma-jasmine/lib/boot.js',
|
||||
'node_modules/karma-jasmine/lib/adapter.js',
|
||||
'node_modules/jasmine-jquery/lib/jasmine-jquery.js',
|
||||
'node_modules/popper.js/dist/umd/popper.js',
|
||||
'node_modules/bootstrap/dist/js/bootstrap.js',
|
||||
'node_modules/underscore/underscore.js',
|
||||
'node_modules/backbone/backbone.js',
|
||||
'common/static/js/test/i18n.js'
|
||||
];
|
||||
|
||||
if (useRequireJs) {
|
||||
files = files.concat([
|
||||
'node_modules/requirejs/require.js',
|
||||
'node_modules/karma-requirejs/lib/adapter.js'
|
||||
]);
|
||||
}
|
||||
|
||||
return files;
|
||||
};
|
||||
|
||||
// Manually prepends the framework files to the karma files array
|
||||
// bypassing the karma's framework config. This is necessary if you want
|
||||
// to add a library or framework that isn't a karma plugin. e.g. we add jasmine-jquery
|
||||
// which isn't a karma plugin. Though a karma framework for jasmine-jquery is available
|
||||
// but it's not actively maintained. In future we also wanna add jQuery at the top when
|
||||
// we upgrade to jQuery 2
|
||||
var initFrameworks = function(files) {
|
||||
getFrameworkFiles().reverse().forEach(function(f) {
|
||||
files.unshift({
|
||||
pattern: path.join(appRoot, f),
|
||||
included: true,
|
||||
served: true,
|
||||
watch: false
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
var hostname = 'localhost';
|
||||
var port = 9876;
|
||||
var customPlugin = {
|
||||
'framework:custom': ['factory', initFrameworks]
|
||||
};
|
||||
|
||||
if (process.env.hasOwnProperty('BOK_CHOY_HOSTNAME')) {
|
||||
hostname = process.env.BOK_CHOY_HOSTNAME;
|
||||
if (hostname === 'edx.devstack.lms') {
|
||||
port = 19876;
|
||||
} else {
|
||||
port = 19877;
|
||||
}
|
||||
}
|
||||
|
||||
initFrameworks.$inject = ['config.files'];
|
||||
|
||||
return {
|
||||
// base path that will be used to resolve all patterns (eg. files, exclude)
|
||||
basePath: '',
|
||||
|
||||
// frameworks to use
|
||||
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
|
||||
frameworks: ['custom'],
|
||||
|
||||
plugins: [
|
||||
'karma-jasmine',
|
||||
'karma-jasmine-html-reporter',
|
||||
'karma-requirejs',
|
||||
'karma-junit-reporter',
|
||||
'karma-coverage',
|
||||
'karma-chrome-launcher',
|
||||
'karma-firefox-launcher',
|
||||
'karma-spec-reporter',
|
||||
'karma-selenium-webdriver-launcher',
|
||||
'karma-webpack',
|
||||
'karma-sourcemap-loader',
|
||||
customPlugin
|
||||
],
|
||||
|
||||
// list of files to exclude
|
||||
exclude: [],
|
||||
|
||||
// karma-reporter
|
||||
reporters: reporters(config),
|
||||
|
||||
// Spec Reporter configuration
|
||||
specReporter: {
|
||||
maxLogLines: 5,
|
||||
showSpecTiming: true
|
||||
},
|
||||
|
||||
coverageReporter: coverageSettings(config),
|
||||
|
||||
junitReporter: junitSettings(config),
|
||||
|
||||
// web server hostname and port
|
||||
hostname: hostname,
|
||||
port: port,
|
||||
|
||||
// enable / disable colors in the output (reporters and logs)
|
||||
colors: true,
|
||||
|
||||
// level of logging
|
||||
/* possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN
|
||||
|| config.LOG_INFO || config.LOG_DEBUG */
|
||||
logLevel: config.LOG_INFO,
|
||||
|
||||
// enable / disable watching file and executing tests whenever any file changes
|
||||
autoWatch: false,
|
||||
|
||||
// start these browsers
|
||||
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
|
||||
browsers: ['FirefoxNoUpdates'],
|
||||
|
||||
customLaunchers: {
|
||||
// Firefox configuration that doesn't perform auto-updates
|
||||
FirefoxNoUpdates: {
|
||||
base: 'Firefox',
|
||||
prefs: {
|
||||
'app.update.auto': false,
|
||||
'app.update.enabled': false
|
||||
}
|
||||
},
|
||||
ChromeDocker: {
|
||||
base: 'SeleniumWebdriver',
|
||||
browserName: 'chrome',
|
||||
getDriver: function() {
|
||||
return new webdriver.Builder()
|
||||
.forBrowser('chrome')
|
||||
.usingServer('http://edx.devstack.chrome:4444/wd/hub')
|
||||
.build();
|
||||
}
|
||||
},
|
||||
FirefoxDocker: {
|
||||
base: 'SeleniumWebdriver',
|
||||
browserName: 'firefox',
|
||||
getDriver: function() {
|
||||
var options = new firefox.Options(),
|
||||
profile = new firefox.Profile();
|
||||
profile.setPreference('focusmanager.testmode', true);
|
||||
options.setProfile(profile);
|
||||
return new webdriver.Builder()
|
||||
.forBrowser('firefox')
|
||||
.usingServer('http://edx.devstack.firefox:4444/wd/hub')
|
||||
.setFirefoxOptions(options)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// Continuous Integration mode
|
||||
// if true, Karma captures browsers, runs the tests and exits
|
||||
singleRun: config.singleRun,
|
||||
|
||||
// Concurrency level
|
||||
// how many browser should be started simultaneous
|
||||
concurrency: Infinity,
|
||||
|
||||
browserNoActivityTimeout: 50000,
|
||||
|
||||
client: {
|
||||
captureConsole: false
|
||||
},
|
||||
|
||||
webpack: webpackConfig[0],
|
||||
|
||||
webpackMiddleware: {
|
||||
watchOptions: {
|
||||
poll: true
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function configure(config, options) {
|
||||
var useRequireJs = options.useRequireJs === undefined ? true : options.useRequireJs,
|
||||
baseConfig = getBaseConfig(config, useRequireJs),
|
||||
files, filesForCoverage, preprocessors;
|
||||
|
||||
if (options.includeCommonFiles) {
|
||||
_.forEach(['libraryFiles', 'sourceFiles', 'specFiles', 'fixtureFiles'], function(collectionName) {
|
||||
options[collectionName] = _.flatten([commonFiles[collectionName], options[collectionName]]);
|
||||
});
|
||||
}
|
||||
|
||||
files = _.flatten(
|
||||
_.map(
|
||||
['libraryFilesToInclude', 'libraryFiles', 'sourceFiles', 'specFiles', 'fixtureFiles', 'runFiles'],
|
||||
function(collectionName) { return options[collectionName] || []; }
|
||||
)
|
||||
);
|
||||
|
||||
files.unshift(
|
||||
{pattern: path.join(appRoot, 'common/static/common/js/jasmine.common.conf.js'), included: true}
|
||||
);
|
||||
|
||||
if (useRequireJs) {
|
||||
files.unshift({pattern: 'common/js/utils/require-serial.js', included: true});
|
||||
}
|
||||
|
||||
// Karma sets included=true by default.
|
||||
// We set it to false by default because RequireJS should be used instead.
|
||||
files = setDefaults(files);
|
||||
|
||||
filesForCoverage = _.flatten(
|
||||
_.map(
|
||||
['sourceFiles', 'specFiles'],
|
||||
function(collectionName) { return options[collectionName]; }
|
||||
)
|
||||
);
|
||||
|
||||
// If we give symlink paths to Istanbul, coverage for each path gets tracked
|
||||
// separately. So we pass absolute paths to the karma-coverage preprocessor.
|
||||
preprocessors = _.extend(
|
||||
{},
|
||||
options.preprocessors,
|
||||
normalizePathsForCoverage(filesForCoverage, options.normalizePathsForCoverageFunc, options.preprocessors)
|
||||
);
|
||||
|
||||
config.set(_.extend(baseConfig, {
|
||||
files: files,
|
||||
preprocessors: preprocessors
|
||||
}));
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
configure: configure,
|
||||
appRoot: appRoot
|
||||
};
|
||||
@@ -58,8 +58,6 @@ and for all environments to use __init__.py to load their settings.
|
||||
|
||||
The following files should be obviated by this change:
|
||||
|
||||
* bok_choy_docker.py
|
||||
* bok_choy.py
|
||||
* devstack_docker.py
|
||||
* devstack_optimized.py
|
||||
* devstack.py
|
||||
|
||||
@@ -1,154 +0,0 @@
|
||||
"""
|
||||
Settings for Bok Choy tests that are used when running LMS.
|
||||
|
||||
Bok Choy uses two different settings files:
|
||||
1. test_static_optimized is used when invoking collectstatic
|
||||
2. bok_choy is used when running the tests
|
||||
|
||||
Note: it isn't possible to have a single settings file, because Django doesn't
|
||||
support both generating static assets to a directory and also serving static
|
||||
from the same directory.
|
||||
"""
|
||||
|
||||
|
||||
# Silence noisy logs
|
||||
import logging
|
||||
import os
|
||||
from tempfile import mkdtemp
|
||||
|
||||
from django.utils.translation import gettext_lazy
|
||||
from path import Path as path
|
||||
|
||||
from openedx.core.release import RELEASE_LINE
|
||||
from xmodule.modulestore.modulestore_settings import update_module_store_settings # lint-amnesty, pylint: disable=wrong-import-order
|
||||
|
||||
CONFIG_ROOT = path(__file__).abspath().dirname()
|
||||
TEST_ROOT = CONFIG_ROOT.dirname().dirname() / "test_root"
|
||||
|
||||
########################## Prod-like settings ###################################
|
||||
# These should be as close as possible to the settings we use in production.
|
||||
# As in prod, we read in environment and auth variables from JSON files.
|
||||
# Unlike in prod, we use the JSON files stored in this repo.
|
||||
# This is a convenience for ensuring (a) that we can consistently find the files
|
||||
# and (b) that the files are the same in Jenkins as in local dev.
|
||||
os.environ['SERVICE_VARIANT'] = 'bok_choy_docker' if 'BOK_CHOY_HOSTNAME' in os.environ else 'bok_choy'
|
||||
os.environ['LMS_CFG'] = str.format("{config_root}/{service_variant}.yml",
|
||||
config_root=CONFIG_ROOT, service_variant=os.environ['SERVICE_VARIANT'])
|
||||
os.environ['REVISION_CFG'] = f"{CONFIG_ROOT}/revisions.yml"
|
||||
|
||||
from .production import * # pylint: disable=wildcard-import, unused-wildcard-import, wrong-import-position
|
||||
|
||||
|
||||
######################### Testing overrides ####################################
|
||||
|
||||
# Redirect to the test_root folder within the repo
|
||||
GITHUB_REPO_ROOT = (TEST_ROOT / "data").abspath()
|
||||
LOG_DIR = (TEST_ROOT / "log").abspath()
|
||||
|
||||
# Configure modulestore to use the test folder within the repo
|
||||
update_module_store_settings(
|
||||
MODULESTORE,
|
||||
module_store_options={
|
||||
'fs_root': (TEST_ROOT / "data").abspath(),
|
||||
},
|
||||
xml_store_options={
|
||||
'data_dir': (TEST_ROOT / "data").abspath(),
|
||||
},
|
||||
default_store=os.environ.get('DEFAULT_STORE', 'draft'),
|
||||
)
|
||||
|
||||
PLATFORM_NAME = gettext_lazy("édX")
|
||||
PLATFORM_DESCRIPTION = gettext_lazy("Open édX Platform")
|
||||
|
||||
############################ STATIC FILES #############################
|
||||
|
||||
# Serve static files at /static directly from the staticfiles directory under test root
|
||||
# Note: optimized files for testing are generated with settings from test_static_optimized
|
||||
STATIC_URL = "/static/"
|
||||
STATICFILES_FINDERS = ['django.contrib.staticfiles.finders.FileSystemFinder']
|
||||
STATICFILES_DIRS = [
|
||||
(TEST_ROOT / "staticfiles" / "lms").abspath(),
|
||||
]
|
||||
|
||||
DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
|
||||
MEDIA_ROOT = TEST_ROOT / "uploads"
|
||||
|
||||
# Webpack loader must use webpack output setting
|
||||
WEBPACK_LOADER['DEFAULT']['STATS_FILE'] = TEST_ROOT / "staticfiles" / "lms" / "webpack-stats.json"
|
||||
|
||||
# Don't use compression during tests
|
||||
PIPELINE['JS_COMPRESSOR'] = None
|
||||
|
||||
###################### Grades ######################
|
||||
GRADES_DOWNLOAD = {
|
||||
'STORAGE_TYPE': 'localfs',
|
||||
'BUCKET': 'edx-grades',
|
||||
'ROOT_PATH': os.path.join(mkdtemp(), 'edx-s3', 'grades'),
|
||||
}
|
||||
|
||||
|
||||
LOG_OVERRIDES = [
|
||||
('track.middleware', logging.CRITICAL),
|
||||
('common.djangoapps.edxmako.shortcuts', logging.ERROR),
|
||||
('edx.discussion', logging.CRITICAL),
|
||||
]
|
||||
for log_name, log_level in LOG_OVERRIDES:
|
||||
logging.getLogger(log_name).setLevel(log_level)
|
||||
|
||||
|
||||
YOUTUBE_HOSTNAME = os.environ.get('BOK_CHOY_HOSTNAME', '127.0.0.1')
|
||||
# Point the URL used to test YouTube availability to our stub YouTube server
|
||||
YOUTUBE_PORT = 9080
|
||||
YOUTUBE['TEST_TIMEOUT'] = 5000
|
||||
YOUTUBE['API'] = f"http://{YOUTUBE_HOSTNAME}:{YOUTUBE_PORT}/get_youtube_api/"
|
||||
YOUTUBE['METADATA_URL'] = f"http://{YOUTUBE_HOSTNAME}:{YOUTUBE_PORT}/test_youtube/"
|
||||
|
||||
############################# SECURITY SETTINGS ################################
|
||||
# Default to advanced security in common.py, so tests can reset here to use
|
||||
# a simpler security model
|
||||
|
||||
# Path at which to store the mock index
|
||||
MOCK_SEARCH_BACKING_FILE = (
|
||||
TEST_ROOT / "index_file.dat"
|
||||
).abspath()
|
||||
|
||||
# Verify student settings
|
||||
VERIFY_STUDENT["SOFTWARE_SECURE"] = {
|
||||
"API_ACCESS_KEY": "BBBBBBBBBBBBBBBBBBBB",
|
||||
"API_SECRET_KEY": "CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC",
|
||||
}
|
||||
|
||||
# Set dummy values for profile image settings.
|
||||
PROFILE_IMAGE_BACKEND = {
|
||||
'class': 'openedx.core.storage.OverwriteStorage',
|
||||
'options': {
|
||||
'location': os.path.join(MEDIA_ROOT, 'profile-images/'),
|
||||
'base_url': os.path.join(MEDIA_URL, 'profile-images/'),
|
||||
},
|
||||
}
|
||||
|
||||
LMS_ROOT_URL = "http://localhost:{}".format(os.environ.get('BOK_CHOY_LMS_PORT', 8003))
|
||||
CMS_BASE = "localhost:{}".format(os.environ.get('BOK_CHOY_CMS_PORT', 8031))
|
||||
LOGIN_REDIRECT_WHITELIST = [CMS_BASE]
|
||||
|
||||
INSTALLED_APPS.append('openedx.testing.coverage_context_listener')
|
||||
|
||||
if RELEASE_LINE == "master":
|
||||
# On master, acceptance tests use edX books, not the default Open edX books.
|
||||
HELP_TOKENS_BOOKS = {
|
||||
'learner': 'https://edx.readthedocs.io/projects/edx-guide-for-students',
|
||||
'course_author': 'https://edx.readthedocs.io/projects/edx-partner-course-staff',
|
||||
}
|
||||
|
||||
# API access management
|
||||
API_ACCESS_MANAGER_EMAIL = 'api-access@example.com'
|
||||
API_ACCESS_FROM_EMAIL = 'api-requests@example.com'
|
||||
API_DOCUMENTATION_URL = 'https://course-catalog-api-guide.readthedocs.io/en/latest/'
|
||||
AUTH_DOCUMENTATION_URL = 'https://course-catalog-api-guide.readthedocs.io/en/latest/authentication/index.html'
|
||||
|
||||
#####################################################################
|
||||
# Lastly, see if the developer has any local overrides.
|
||||
try:
|
||||
from .private import * # pylint: disable=wildcard-import
|
||||
except ImportError:
|
||||
pass
|
||||
@@ -1,274 +0,0 @@
|
||||
# ingested edx-platform/lms/envs/bok_choy.auth.json
|
||||
# ingested edx-platform/lms/envs/bok_choy.env.json
|
||||
ACTIVATION_EMAIL_SUPPORT_LINK: https://support.example.com/activation-email-help.html
|
||||
ANALYTICS_DASHBOARD_URL: ''
|
||||
AWS_ACCESS_KEY_ID: ''
|
||||
AWS_SECRET_ACCESS_KEY: ''
|
||||
BUGS_EMAIL: bugs@example.com
|
||||
BULK_EMAIL_DEFAULT_FROM_EMAIL: no-reply@example.com
|
||||
BADGING_BACKEND: 'lms.djangoapps.badges.backends.tests.dummy_backend.DummyBackend'
|
||||
BLOCK_STRUCTURES_SETTINGS:
|
||||
# We have CELERY_ALWAYS_EAGER set to True, so there's no asynchronous
|
||||
# code running and the celery routing is unimportant.
|
||||
# It does not make sense to retry.
|
||||
TASK_MAX_RETRIES: 0
|
||||
# course publish task delay is irrelevant is because the task is run synchronously
|
||||
COURSE_PUBLISH_TASK_DELAY: 0
|
||||
# retry delay is irrelevent because we never retry
|
||||
TASK_DEFAULT_RETRY_DELAY: 0
|
||||
|
||||
CACHES:
|
||||
celery:
|
||||
BACKEND: django.core.cache.backends.memcached.PyMemcacheCache
|
||||
OPTIONS:
|
||||
no_delay: true
|
||||
ignore_exc: true
|
||||
use_pooling: true
|
||||
KEY_FUNCTION: common.djangoapps.util.memcache.safe_key
|
||||
KEY_PREFIX: integration_celery
|
||||
LOCATION: ['localhost:11211']
|
||||
default:
|
||||
BACKEND: django.core.cache.backends.memcached.PyMemcacheCache
|
||||
OPTIONS:
|
||||
no_delay: true
|
||||
ignore_exc: true
|
||||
use_pooling: true
|
||||
KEY_FUNCTION: common.djangoapps.util.memcache.safe_key
|
||||
KEY_PREFIX: sandbox_default
|
||||
LOCATION: ['localhost:11211']
|
||||
general:
|
||||
BACKEND: django.core.cache.backends.memcached.PyMemcacheCache
|
||||
OPTIONS:
|
||||
no_delay: true
|
||||
ignore_exc: true
|
||||
use_pooling: true
|
||||
KEY_FUNCTION: common.djangoapps.util.memcache.safe_key
|
||||
KEY_PREFIX: sandbox_general
|
||||
LOCATION: ['localhost:11211']
|
||||
mongo_metadata_inheritance:
|
||||
BACKEND: django.core.cache.backends.memcached.PyMemcacheCache
|
||||
OPTIONS:
|
||||
no_delay: true
|
||||
ignore_exc: true
|
||||
use_pooling: true
|
||||
KEY_FUNCTION: common.djangoapps.util.memcache.safe_key
|
||||
KEY_PREFIX: integration_mongo_metadata_inheritance
|
||||
LOCATION: ['localhost:11211']
|
||||
staticfiles:
|
||||
BACKEND: django.core.cache.backends.memcached.PyMemcacheCache
|
||||
OPTIONS:
|
||||
no_delay: true
|
||||
ignore_exc: true
|
||||
use_pooling: true
|
||||
KEY_FUNCTION: common.djangoapps.util.memcache.safe_key
|
||||
KEY_PREFIX: integration_static_files
|
||||
LOCATION: ['localhost:11211']
|
||||
|
||||
# Capture the console log via template includes, until webdriver supports log capture again
|
||||
CAPTURE_CONSOLE_LOG: True
|
||||
|
||||
CELERY_BROKER_HOSTNAME: localhost
|
||||
CELERY_BROKER_PASSWORD: celery
|
||||
CELERY_BROKER_TRANSPORT: amqp
|
||||
CELERY_BROKER_USER: celery
|
||||
CELERY_ALWAYS_EAGER: True
|
||||
CELERY_RESULT_BACKEND: 'django-cache'
|
||||
CLEAR_REQUEST_CACHE_ON_TASK_COMPLETION: False
|
||||
|
||||
CERT_QUEUE: certificates
|
||||
CMS_BASE: localhost:8031
|
||||
CODE_JAIL:
|
||||
limits: {REALTIME: 3, VMEM: 0}
|
||||
COMMENTS_SERVICE_KEY: password
|
||||
COMMENTS_SERVICE_URL: http://localhost:4567
|
||||
COMPLETION_BY_VIEWING_DELAY_MS: 1000
|
||||
CONTACT_EMAIL: info@example.com
|
||||
CONTENTSTORE:
|
||||
DOC_STORE_CONFIG:
|
||||
collection: modulestore
|
||||
db: test
|
||||
host: [localhost]
|
||||
port: 27017
|
||||
ENGINE: xmodule.contentstore.mongo.MongoContentStore
|
||||
OPTIONS:
|
||||
db: test
|
||||
host: [localhost]
|
||||
port: 27017
|
||||
DATABASES:
|
||||
default: {ENGINE: django.db.backends.mysql, HOST: localhost, NAME: edxtest, PASSWORD: '',
|
||||
PORT: '3306', USER: root}
|
||||
student_module_history: {ENGINE: django.db.backends.mysql, HOST: localhost, NAME: student_module_history_test,
|
||||
PASSWORD: '', PORT: '3306', USER: root}
|
||||
DEFAULT_FEEDBACK_EMAIL: feedback@example.com
|
||||
DEFAULT_FROM_EMAIL: registration@example.com
|
||||
|
||||
# Enable debug so that static assets are served by Django
|
||||
DEBUG: True
|
||||
DJFS: {aws_access_key_id: test, aws_secret_access_key: test, bucket: test, prefix: test,
|
||||
type: s3fs}
|
||||
DOC_STORE_CONFIG:
|
||||
collection: modulestore
|
||||
db: test
|
||||
host: [localhost]
|
||||
port: 27017
|
||||
# Configure the LMS to use our stub eCommerce implementation
|
||||
ECOMMERCE_API_URL: 'http://localhost:8043/api/v2/'
|
||||
# Configure the LMS to use our stub EdxNotes implementation
|
||||
EDXNOTES_PUBLIC_API: 'http://localhost:8042/api/v1'
|
||||
EDXNOTES_INTERNAL_API: 'http://localhost:8042/api/v1'
|
||||
|
||||
EDXNOTES_CONNECT_TIMEOUT: 10 # time in seconds
|
||||
EDXNOTES_READ_TIMEOUT: 10 # time in seconds
|
||||
|
||||
NOTES_DISABLED_TABS: []
|
||||
|
||||
EMAIL_BACKEND: django.core.mail.backends.dummy.EmailBackend
|
||||
EVENT_TRACKING_BACKENDS:
|
||||
mongo:
|
||||
ENGINE: eventtracking.backends.mongodb.MongoBackend
|
||||
OPTIONS: {collection: events, database: test}
|
||||
FEATURES:
|
||||
ALLOW_AUTOMATED_SIGNUPS: true
|
||||
AUTOMATIC_AUTH_FOR_TESTING: true
|
||||
AUTOMATIC_VERIFY_STUDENT_IDENTITY_FOR_TESTING: true
|
||||
CERTIFICATES_HTML_VIEW: true
|
||||
CERTIFICATES_INSTRUCTOR_GENERATION: true
|
||||
CUSTOM_COURSES_EDX: true,
|
||||
ENABLE_COURSE_DISCOVERY: true
|
||||
ENABLE_DISCUSSION_SERVICE: true
|
||||
ENABLE_GRADE_DOWNLOADS: true
|
||||
ENABLE_SPECIAL_EXAMS: true
|
||||
ENABLE_THIRD_PARTY_AUTH: true
|
||||
ENABLE_VERIFIED_CERTIFICATES: true
|
||||
EXPOSE_CACHE_PROGRAMS_ENDPOINT: true
|
||||
MODE_CREATION_FOR_TESTING: true
|
||||
PREVIEW_LMS_BASE: 'preview.localhost:8003'
|
||||
RESTRICT_AUTOMATIC_AUTH: false
|
||||
SHOW_HEADER_LANGUAGE_SELECTOR: true
|
||||
ENABLE_MAX_FAILED_LOGIN_ATTEMPTS: False
|
||||
SQUELCH_PII_IN_LOGS: False
|
||||
PREVENT_CONCURRENT_LOGINS: False
|
||||
ENABLE_MOBILE_REST_API: True # Show video bumper in LMS
|
||||
ENABLE_VIDEO_BUMPER: True # Show video bumper in LMS
|
||||
SHOW_BUMPER_PERIODICITY: 1
|
||||
# Enable courseware search for tests
|
||||
ENABLE_COURSEWARE_SEARCH: True
|
||||
# Enable dashboard search for tests
|
||||
ENABLE_DASHBOARD_SEARCH: True
|
||||
# discussion home panel, which includes a subscription on/off setting for discussion digest emails.
|
||||
ENABLE_DISCUSSION_HOME_PANEL: True
|
||||
# Enable support for OpenBadges accomplishments
|
||||
ENABLE_OPENBADGES: True
|
||||
ENABLE_LTI_PROVIDER: True
|
||||
# Enable milestones app
|
||||
MILESTONES_APP: True
|
||||
# Enable oauth authentication, which we test.
|
||||
ENABLE_OAUTH2_PROVIDER: True
|
||||
OAUTH_ENFORCE_SECURE: False
|
||||
ENABLE_PREREQUISITE_COURSES: True
|
||||
ENABLE_COURSE_DISCOVERY: True
|
||||
ENABLE_EDXNOTES: True
|
||||
ENABLE_TEAMS: True
|
||||
LICENSING: True
|
||||
# Use the auto_auth workflow for creating users and logging them in
|
||||
AUTOMATIC_AUTH_FOR_TESTING: True
|
||||
RESTRICT_AUTOMATIC_AUTH: False
|
||||
# Open up endpoint for faking Software Secure responses
|
||||
ENABLE_SOFTWARE_SECURE_FAKE: True
|
||||
# Disable instructor dash buttons for downloading course data when enrollment exceeds this number
|
||||
MAX_ENROLLMENT_INSTR_BUTTONS: 4
|
||||
ENABLE_ENROLLMENT_TRACK_USER_PARTITION: True
|
||||
ENTRANCE_EXAMS: True
|
||||
ENABLE_SPECIAL_EXAMS: True
|
||||
|
||||
|
||||
GITHUB_REPO_ROOT: '** OVERRIDDEN **'
|
||||
JWT_AUTH: {JWT_PRIVATE_SIGNING_JWK: '{"e": "AQAB", "d": "HIiV7KNjcdhVbpn3KT-I9n3JPf5YbGXsCIedmPqDH1d4QhBofuAqZ9zebQuxkRUpmqtYMv0Zi6ECSUqH387GYQF_XvFUFcjQRPycISd8TH0DAKaDpGr-AYNshnKiEtQpINhcP44I1AYNPCwyoxXA1fGTtmkKChsuWea7o8kytwU5xSejvh5-jiqu2SF4GEl0BEXIAPZsgbzoPIWNxgO4_RzNnWs6nJZeszcaDD0CyezVSuH9QcI6g5QFzAC_YuykSsaaFJhZ05DocBsLczShJ9Omf6PnK9xlm26I84xrEh_7x4fVmNBg3xWTLh8qOnHqGko93A1diLRCrKHOvnpvgQ",
|
||||
"n": "o5cn3ljSRi6FaDEKTn0PS-oL9EFyv1pI7dRgffQLD1qf5D6sprmYfWWokSsrWig8u2y0HChSygR6Jn5KXBqQn6FpM0dDJLnWQDRXHLl3Ey1iPYgDSmOIsIGrV9ZyNCQwk03wAgWbfdBTig3QSDYD-sTNOs3pc4UD_PqAvU2nz_1SS2ZiOwOn5F6gulE1L0iE3KEUEvOIagfHNVhz0oxa_VRZILkzV-zr6R_TW1m97h4H8jXl_VJyQGyhMGGypuDrQ9_vaY_RLEulLCyY0INglHWQ7pckxBtI5q55-Vio2wgewe2_qYcGsnBGaDNbySAsvYcWRrqDiFyzrJYivodqTQ",
|
||||
"q": "3T3DEtBUka7hLGdIsDlC96Uadx_q_E4Vb1cxx_4Ss_wGp1Loz3N3ZngGyInsKlmbBgLo1Ykd6T9TRvRNEWEtFSOcm2INIBoVoXk7W5RuPa8Cgq2tjQj9ziGQ08JMejrPlj3Q1wmALJr5VTfvSYBu0WkljhKNCy1KB6fCby0C9WE",
|
||||
"p": "vUqzWPZnDG4IXyo-k5F0bHV0BNL_pVhQoLW7eyFHnw74IOEfSbdsMspNcPSFIrtgPsn7981qv3lN_staZ6JflKfHayjB_lvltHyZxfl0dvruShZOx1N6ykEo7YrAskC_qxUyrIvqmJ64zPW3jkuOYrFs7Ykj3zFx3Zq1H5568G0",
|
||||
"kid": "BTZ9HA6K", "kty": "RSA"}', JWT_PUBLIC_SIGNING_JWK_SET: '{"keys": [{"kid":
|
||||
"BTZ9HA6K", "e": "AQAB", "kty": "RSA", "n": "o5cn3ljSRi6FaDEKTn0PS-oL9EFyv1pI7dRgffQLD1qf5D6sprmYfWWokSsrWig8u2y0HChSygR6Jn5KXBqQn6FpM0dDJLnWQDRXHLl3Ey1iPYgDSmOIsIGrV9ZyNCQwk03wAgWbfdBTig3QSDYD-sTNOs3pc4UD_PqAvU2nz_1SS2ZiOwOn5F6gulE1L0iE3KEUEvOIagfHNVhz0oxa_VRZILkzV-zr6R_TW1m97h4H8jXl_VJyQGyhMGGypuDrQ9_vaY_RLEulLCyY0INglHWQ7pckxBtI5q55-Vio2wgewe2_qYcGsnBGaDNbySAsvYcWRrqDiFyzrJYivodqTQ"}]}',
|
||||
JWT_SECRET_KEY: super-secret-key}
|
||||
LMS_BASE: localhost:8003
|
||||
LMS_ROOT_URL: http://localhost:8003
|
||||
LOCAL_LOGLEVEL: INFO
|
||||
LOGGING_ENV: sandbox
|
||||
LOG_DIR: '** OVERRIDDEN **'
|
||||
MEDIA_URL: /media/
|
||||
MKTG_URL_LINK_MAP: {ABOUT: about, BLOG: blog, CAREERS: careers, CONTACT: contact,
|
||||
COURSES: courses, DONATE: donate, HELP_CENTER: help-center, HONOR: honor, NEWS: news,
|
||||
PRESS: press, PRIVACY: privacy, ROOT: root, SITEMAP.XML: sitemap_xml, TOS: tos,
|
||||
WHAT_IS_VERIFIED_CERT: verified-certificate}
|
||||
MODULESTORE:
|
||||
default:
|
||||
ENGINE: xmodule.modulestore.mixed.MixedModuleStore
|
||||
OPTIONS:
|
||||
mappings: {}
|
||||
stores:
|
||||
- DOC_STORE_CONFIG:
|
||||
collection: modulestore
|
||||
db: test
|
||||
host: [localhost]
|
||||
port: 27017
|
||||
ENGINE: xmodule.modulestore.mongo.DraftMongoModuleStore
|
||||
NAME: draft
|
||||
OPTIONS:
|
||||
collection: modulestore
|
||||
db: test
|
||||
default_class: xmodule.hidden_block.HiddenBlock
|
||||
fs_root: '** OVERRIDDEN **'
|
||||
host: [localhost]
|
||||
port: 27017
|
||||
render_template: common.djangoapps.edxmako.shortcuts.render_to_string
|
||||
- ENGINE: xmodule.modulestore.xml.XMLModuleStore
|
||||
NAME: xml
|
||||
OPTIONS: {data_dir: '** OVERRIDDEN **', default_class: xmodule.hidden_block.HiddenBlock}
|
||||
# We need to test different scenarios, following setting effectively disbale rate limiting
|
||||
PASSWORD_RESET_IP_RATE: '1/s'
|
||||
PASSWORD_RESET_EMAIL_RATE: '1/s'
|
||||
PASSWORD_RESET_SUPPORT_LINK: https://support.example.com/password-reset-help.html
|
||||
REGISTRATION_EXTENSION_FORM: openedx.core.djangoapps.user_api.tests.test_helpers.TestCaseForm
|
||||
REGISTRATION_EXTRA_FIELDS: {city: hidden, country: required, gender: optional, goals: optional,
|
||||
honor_code: required, level_of_education: optional, mailing_address: optional, terms_of_service: hidden,
|
||||
year_of_birth: optional}
|
||||
# Use MockSearchEngine as the search engine for test scenario
|
||||
SEARCH_ENGINE: "search.tests.mock_search_engine.MockSearchEngine"
|
||||
# this secret key should be the same as cms/envs/bok_choy.py's
|
||||
SECRET_KEY: "very_secret_bok_choy_key"
|
||||
|
||||
SERVER_EMAIL: devops@example.com
|
||||
SESSION_COOKIE_DOMAIN: null
|
||||
SITE_NAME: localhost:8003
|
||||
SOCIAL_SHARING_SETTINGS: {CERTIFICATE_FACEBOOK: true, CERTIFICATE_FACEBOOK_TEXT: 'Testing
|
||||
facebook feature:', CUSTOM_COURSE_URLS: true, DASHBOARD_FACEBOOK: true, DASHBOARD_TWITTER: true,
|
||||
DASHBOARD_TWITTER_TEXT: 'Testing feature:'}
|
||||
STATIC_URL_BASE: /static/
|
||||
SUPPORT_SITE_LINK: https://support.example.com
|
||||
SYSLOG_SERVER: ''
|
||||
TECH_SUPPORT_EMAIL: technical@example.com
|
||||
THIRD_PARTY_AUTH_BACKENDS: [social_core.backends.google.GoogleOAuth2, social_core.backends.linkedin.LinkedinOAuth2,
|
||||
social_core.backends.facebook.FacebookOAuth2, common.djangoapps.third_party_auth.dummy.DummyBackend,
|
||||
common.djangoapps.third_party_auth.saml.SAMLAuthBackend]
|
||||
THIRD_PARTY_AUTH:
|
||||
Google:
|
||||
SOCIAL_AUTH_GOOGLE_OAUTH2_KEY": "test"
|
||||
SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET": "test"
|
||||
Facebook:
|
||||
SOCIAL_AUTH_FACEBOOK_KEY": "test"
|
||||
SOCIAL_AUTH_FACEBOOK_SECRET": "test"
|
||||
TIME_ZONE: America/New_York
|
||||
TRACKING_BACKENDS:
|
||||
mongo:
|
||||
ENGINE: common.djangoapps.track.backends.mongodb.MongoBackend
|
||||
OPTIONS: {collection: events, database: test}
|
||||
WIKI_ENABLED: true
|
||||
WAFFLE_OVERRIDE: True
|
||||
XQUEUE_INTERFACE:
|
||||
basic_auth: [edx, edx]
|
||||
django_auth: {password: password, username: lms}
|
||||
# Configure the LMS to use our stub XQueue implementation
|
||||
url: 'http://localhost:8040'
|
||||
|
||||
ZENDESK_API_KEY: ''
|
||||
ZENDESK_USER: ''
|
||||
@@ -1,27 +0,0 @@
|
||||
"""
|
||||
Settings for Bok Choy tests that are used when running Studio in Docker-based devstack.
|
||||
"""
|
||||
|
||||
# noinspection PyUnresolvedReferences
|
||||
from .bok_choy import * # pylint: disable=wildcard-import
|
||||
|
||||
CMS_BASE = '{}:{}'.format(os.environ['BOK_CHOY_HOSTNAME'], os.environ.get('BOK_CHOY_CMS_PORT', 8031))
|
||||
LMS_BASE = '{}:{}'.format(os.environ['BOK_CHOY_HOSTNAME'], os.environ.get('BOK_CHOY_LMS_PORT', 8003))
|
||||
LMS_ROOT_URL = f'http://{LMS_BASE}'
|
||||
LOGIN_REDIRECT_WHITELIST = [CMS_BASE]
|
||||
SITE_NAME = LMS_BASE
|
||||
|
||||
COMMENTS_SERVICE_URL = 'http://{}:4567'.format(os.environ['BOK_CHOY_HOSTNAME'])
|
||||
EDXNOTES_PUBLIC_API = 'http://{}:8042/api/v1'.format(os.environ['BOK_CHOY_HOSTNAME'])
|
||||
|
||||
# Docker does not support the syslog socket at /dev/log. Rely on the console.
|
||||
LOGGING['handlers']['local'] = LOGGING['handlers']['tracking'] = {
|
||||
'class': 'logging.NullHandler',
|
||||
}
|
||||
|
||||
LOGGING['loggers']['tracking']['handlers'] = ['console']
|
||||
|
||||
# Point the URL used to test YouTube availability to our stub YouTube server
|
||||
BOK_CHOY_HOST = os.environ['BOK_CHOY_HOSTNAME']
|
||||
YOUTUBE['API'] = f"http://{BOK_CHOY_HOST}:{YOUTUBE_PORT}/get_youtube_api/"
|
||||
YOUTUBE['METADATA_URL'] = f"http://{BOK_CHOY_HOST}:{YOUTUBE_PORT}/test_youtube/"
|
||||
@@ -1,183 +0,0 @@
|
||||
# ingested edx-platform/lms/envs/bok_choy_docker.auth.json
|
||||
# ingested edx-platform/lms/envs/bok_choy_docker.env.json
|
||||
ACTIVATION_EMAIL_SUPPORT_LINK: https://support.example.com/activation-email-help.html
|
||||
ANALYTICS_DASHBOARD_URL: ''
|
||||
AWS_ACCESS_KEY_ID: ''
|
||||
AWS_SECRET_ACCESS_KEY: ''
|
||||
BUGS_EMAIL: bugs@example.com
|
||||
BULK_EMAIL_DEFAULT_FROM_EMAIL: no-reply@example.com
|
||||
CACHES:
|
||||
celery:
|
||||
BACKEND: django.core.cache.backends.memcached.PyMemcacheCache
|
||||
KEY_FUNCTION: common.djangoapps.util.memcache.safe_key
|
||||
KEY_PREFIX: integration_celery
|
||||
LOCATION: ['edx.devstack.memcached:11211']
|
||||
OPTIONS:
|
||||
no_delay: true
|
||||
ignore_exc: true
|
||||
use_pooling: true
|
||||
default:
|
||||
BACKEND: django.core.cache.backends.memcached.PyMemcacheCache
|
||||
KEY_FUNCTION: common.djangoapps.util.memcache.safe_key
|
||||
KEY_PREFIX: sandbox_default
|
||||
LOCATION: ['edx.devstack.memcached:11211']
|
||||
OPTIONS:
|
||||
no_delay: true
|
||||
ignore_exc: true
|
||||
use_pooling: true
|
||||
general:
|
||||
BACKEND: django.core.cache.backends.memcached.PyMemcacheCache
|
||||
KEY_FUNCTION: common.djangoapps.util.memcache.safe_key
|
||||
KEY_PREFIX: sandbox_general
|
||||
LOCATION: ['edx.devstack.memcached:11211']
|
||||
OPTIONS:
|
||||
no_delay: true
|
||||
ignore_exc: true
|
||||
use_pooling: true
|
||||
mongo_metadata_inheritance:
|
||||
BACKEND: django.core.cache.backends.memcached.PyMemcacheCache
|
||||
KEY_FUNCTION: common.djangoapps.util.memcache.safe_key
|
||||
KEY_PREFIX: integration_mongo_metadata_inheritance
|
||||
LOCATION: ['edx.devstack.memcached:11211']
|
||||
OPTIONS:
|
||||
no_delay: true
|
||||
ignore_exc: true
|
||||
use_pooling: true
|
||||
staticfiles:
|
||||
BACKEND: django.core.cache.backends.memcached.PyMemcacheCache
|
||||
KEY_FUNCTION: common.djangoapps.util.memcache.safe_key
|
||||
KEY_PREFIX: integration_static_files
|
||||
LOCATION: ['edx.devstack.memcached:11211']
|
||||
OPTIONS:
|
||||
no_delay: true
|
||||
ignore_exc: true
|
||||
use_pooling: true
|
||||
CELERY_BROKER_HOSTNAME: localhost
|
||||
CELERY_BROKER_PASSWORD: celery
|
||||
CELERY_BROKER_TRANSPORT: amqp
|
||||
CELERY_BROKER_USER: celery
|
||||
CERT_QUEUE: certificates
|
||||
CMS_BASE: '** OVERRIDDEN **'
|
||||
CODE_JAIL:
|
||||
limits: {REALTIME: 3, VMEM: 0}
|
||||
COMMENTS_SERVICE_KEY: password
|
||||
COMMENTS_SERVICE_URL: http://edx.devstack.lms:4567
|
||||
CONTACT_EMAIL: info@example.com
|
||||
CONTENTSTORE:
|
||||
DOC_STORE_CONFIG:
|
||||
collection: modulestore
|
||||
db: test
|
||||
host: [edx.devstack.mongo]
|
||||
port: 27017
|
||||
ENGINE: xmodule.contentstore.mongo.MongoContentStore
|
||||
OPTIONS:
|
||||
db: test
|
||||
host: [edx.devstack.mongo]
|
||||
port: 27017
|
||||
DATABASES:
|
||||
default: {ENGINE: django.db.backends.mysql, HOST: edx.devstack.mysql57, NAME: edxtest,
|
||||
PASSWORD: '', PORT: '3306', USER: root}
|
||||
student_module_history: {ENGINE: django.db.backends.mysql, HOST: edx.devstack.mysql57,
|
||||
NAME: student_module_history_test, PASSWORD: '', PORT: '3306', USER: root}
|
||||
DEFAULT_FEEDBACK_EMAIL: feedback@example.com
|
||||
DEFAULT_FROM_EMAIL: registration@example.com
|
||||
DJFS: {aws_access_key_id: test, aws_secret_access_key: test, bucket: test, prefix: test,
|
||||
type: s3fs}
|
||||
DOC_STORE_CONFIG:
|
||||
collection: modulestore
|
||||
db: test
|
||||
host: [edx.devstack.mongo]
|
||||
port: 27017
|
||||
EMAIL_BACKEND: django.core.mail.backends.dummy.EmailBackend
|
||||
EVENT_TRACKING_BACKENDS:
|
||||
mongo:
|
||||
ENGINE: eventtracking.backends.mongodb.MongoBackend
|
||||
OPTIONS:
|
||||
collection: events
|
||||
database: test
|
||||
host: [edx.devstack.mongo]
|
||||
port: 27017
|
||||
FEATURES: {ALLOW_AUTOMATED_SIGNUPS: true, AUTOMATIC_AUTH_FOR_TESTING: true,
|
||||
AUTOMATIC_VERIFY_STUDENT_IDENTITY_FOR_TESTING: true, CERTIFICATES_HTML_VIEW: true,
|
||||
CERTIFICATES_INSTRUCTOR_GENERATION: true, CUSTOM_COURSES_EDX: true,
|
||||
ENABLE_COURSE_DISCOVERY: true, ENABLE_DISCUSSION_SERVICE: true, ENABLE_GRADE_DOWNLOADS: true,
|
||||
ENABLE_SPECIAL_EXAMS: true, ENABLE_THIRD_PARTY_AUTH: true,
|
||||
ENABLE_VERIFIED_CERTIFICATES: true, EXPOSE_CACHE_PROGRAMS_ENDPOINT: true, MODE_CREATION_FOR_TESTING: true,
|
||||
PREVIEW_LMS_BASE: 'preview.localhost:8003', RESTRICT_AUTOMATIC_AUTH: false, SHOW_HEADER_LANGUAGE_SELECTOR: true}
|
||||
GITHUB_REPO_ROOT: '** OVERRIDDEN **'
|
||||
JWT_AUTH: {JWT_PRIVATE_SIGNING_JWK: '{"e": "AQAB", "d": "HIiV7KNjcdhVbpn3KT-I9n3JPf5YbGXsCIedmPqDH1d4QhBofuAqZ9zebQuxkRUpmqtYMv0Zi6ECSUqH387GYQF_XvFUFcjQRPycISd8TH0DAKaDpGr-AYNshnKiEtQpINhcP44I1AYNPCwyoxXA1fGTtmkKChsuWea7o8kytwU5xSejvh5-jiqu2SF4GEl0BEXIAPZsgbzoPIWNxgO4_RzNnWs6nJZeszcaDD0CyezVSuH9QcI6g5QFzAC_YuykSsaaFJhZ05DocBsLczShJ9Omf6PnK9xlm26I84xrEh_7x4fVmNBg3xWTLh8qOnHqGko93A1diLRCrKHOvnpvgQ",
|
||||
"n": "o5cn3ljSRi6FaDEKTn0PS-oL9EFyv1pI7dRgffQLD1qf5D6sprmYfWWokSsrWig8u2y0HChSygR6Jn5KXBqQn6FpM0dDJLnWQDRXHLl3Ey1iPYgDSmOIsIGrV9ZyNCQwk03wAgWbfdBTig3QSDYD-sTNOs3pc4UD_PqAvU2nz_1SS2ZiOwOn5F6gulE1L0iE3KEUEvOIagfHNVhz0oxa_VRZILkzV-zr6R_TW1m97h4H8jXl_VJyQGyhMGGypuDrQ9_vaY_RLEulLCyY0INglHWQ7pckxBtI5q55-Vio2wgewe2_qYcGsnBGaDNbySAsvYcWRrqDiFyzrJYivodqTQ",
|
||||
"q": "3T3DEtBUka7hLGdIsDlC96Uadx_q_E4Vb1cxx_4Ss_wGp1Loz3N3ZngGyInsKlmbBgLo1Ykd6T9TRvRNEWEtFSOcm2INIBoVoXk7W5RuPa8Cgq2tjQj9ziGQ08JMejrPlj3Q1wmALJr5VTfvSYBu0WkljhKNCy1KB6fCby0C9WE",
|
||||
"p": "vUqzWPZnDG4IXyo-k5F0bHV0BNL_pVhQoLW7eyFHnw74IOEfSbdsMspNcPSFIrtgPsn7981qv3lN_staZ6JflKfHayjB_lvltHyZxfl0dvruShZOx1N6ykEo7YrAskC_qxUyrIvqmJ64zPW3jkuOYrFs7Ykj3zFx3Zq1H5568G0",
|
||||
"kid": "BTZ9HA6K", "kty": "RSA"}', JWT_PUBLIC_SIGNING_JWK_SET: '{"keys": [{"kid":
|
||||
"BTZ9HA6K", "e": "AQAB", "kty": "RSA", "n": "o5cn3ljSRi6FaDEKTn0PS-oL9EFyv1pI7dRgffQLD1qf5D6sprmYfWWokSsrWig8u2y0HChSygR6Jn5KXBqQn6FpM0dDJLnWQDRXHLl3Ey1iPYgDSmOIsIGrV9ZyNCQwk03wAgWbfdBTig3QSDYD-sTNOs3pc4UD_PqAvU2nz_1SS2ZiOwOn5F6gulE1L0iE3KEUEvOIagfHNVhz0oxa_VRZILkzV-zr6R_TW1m97h4H8jXl_VJyQGyhMGGypuDrQ9_vaY_RLEulLCyY0INglHWQ7pckxBtI5q55-Vio2wgewe2_qYcGsnBGaDNbySAsvYcWRrqDiFyzrJYivodqTQ"}]}',
|
||||
JWT_SECRET_KEY: super-secret-key}
|
||||
LMS_BASE: http://edx.devstack.lms:18003
|
||||
LMS_ROOT_URL: http://edx.devstack.lms:18003
|
||||
LOCAL_LOGLEVEL: INFO
|
||||
LOGGING_ENV: sandbox
|
||||
LOG_DIR: '** OVERRIDDEN **'
|
||||
MEDIA_URL: /media/
|
||||
MKTG_URL_LINK_MAP: {ABOUT: about, BLOG: blog, CAREERS: careers, CONTACT: contact,
|
||||
COURSES: courses, DONATE: donate, HELP_CENTER: help-center, HONOR: honor, NEWS: news,
|
||||
PRESS: press, PRIVACY: privacy, ROOT: root, SITEMAP.XML: sitemap_xml, TOS: tos,
|
||||
WHAT_IS_VERIFIED_CERT: verified-certificate}
|
||||
MODULESTORE:
|
||||
default:
|
||||
ENGINE: xmodule.modulestore.mixed.MixedModuleStore
|
||||
OPTIONS:
|
||||
mappings: {}
|
||||
stores:
|
||||
- DOC_STORE_CONFIG:
|
||||
collection: modulestore
|
||||
db: test
|
||||
host: [edx.devstack.mongo]
|
||||
port: 27017
|
||||
ENGINE: xmodule.modulestore.mongo.DraftMongoModuleStore
|
||||
NAME: draft
|
||||
OPTIONS:
|
||||
collection: modulestore
|
||||
db: test
|
||||
default_class: xmodule.hidden_block.HiddenBlock
|
||||
fs_root: '** OVERRIDDEN **'
|
||||
host: [edx.devstack.mongo]
|
||||
port: 27017
|
||||
render_template: common.djangoapps.edxmako.shortcuts.render_to_string
|
||||
- ENGINE: xmodule.modulestore.xml.XMLModuleStore
|
||||
NAME: xml
|
||||
OPTIONS: {data_dir: '** OVERRIDDEN **', default_class: xmodule.hidden_block.HiddenBlock}
|
||||
PASSWORD_RESET_SUPPORT_LINK: https://support.example.com/password-reset-help.html
|
||||
REGISTRATION_EXTENSION_FORM: openedx.core.djangoapps.user_api.tests.test_helpers.TestCaseForm
|
||||
REGISTRATION_EXTRA_FIELDS: {city: hidden, country: required, gender: optional, goals: optional,
|
||||
honor_code: required, level_of_education: optional, mailing_address: optional, terms_of_service: hidden,
|
||||
year_of_birth: optional}
|
||||
SECRET_KEY: 'bokchoy_docker_secret_key'
|
||||
SERVER_EMAIL: devops@example.com
|
||||
SESSION_COOKIE_DOMAIN: null
|
||||
SITE_NAME: localhost:8003
|
||||
SOCIAL_SHARING_SETTINGS: {CERTIFICATE_FACEBOOK: true, CERTIFICATE_FACEBOOK_TEXT: 'Testing
|
||||
facebook feature:', CUSTOM_COURSE_URLS: true, DASHBOARD_FACEBOOK: true, DASHBOARD_TWITTER: true,
|
||||
DASHBOARD_TWITTER_TEXT: 'Testing feature:'}
|
||||
STATIC_URL_BASE: /static/
|
||||
SUPPORT_SITE_LINK: https://support.example.com
|
||||
SYSLOG_SERVER: ''
|
||||
TECH_SUPPORT_EMAIL: technical@example.com
|
||||
THIRD_PARTY_AUTH_BACKENDS: [social_core.backends.google.GoogleOAuth2, social_core.backends.linkedin.LinkedinOAuth2,
|
||||
social_core.backends.facebook.FacebookOAuth2, common.djangoapps.third_party_auth.dummy.DummyBackend,
|
||||
common.djangoapps.third_party_auth.saml.SAMLAuthBackend]
|
||||
TIME_ZONE: America/New_York
|
||||
TRACKING_BACKENDS:
|
||||
mongo:
|
||||
ENGINE: common.djangoapps.track.backends.mongodb.MongoBackend
|
||||
OPTIONS:
|
||||
collection: events
|
||||
database: test
|
||||
host: [edx.devstack.mongo]
|
||||
port: 27017
|
||||
WIKI_ENABLED: true
|
||||
XQUEUE_INTERFACE:
|
||||
basic_auth: [edx, edx]
|
||||
django_auth: {password: password, username: lms}
|
||||
url: '** OVERRIDDEN **'
|
||||
ZENDESK_API_KEY: ''
|
||||
ZENDESK_USER: ''
|
||||
@@ -1,30 +0,0 @@
|
||||
"""
|
||||
Django management command to update the loaded test fixtures as necessary for
|
||||
the current test environment. Currently just sets an appropriate domain for
|
||||
each Site fixture.
|
||||
"""
|
||||
|
||||
|
||||
import os
|
||||
|
||||
from django.contrib.sites.models import Site
|
||||
from django.core.management.base import BaseCommand
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
"""
|
||||
update_fixtures management command
|
||||
"""
|
||||
|
||||
help = "Update fixtures to match the current test environment."
|
||||
|
||||
def handle(self, *args, **options):
|
||||
if 'BOK_CHOY_HOSTNAME' in os.environ:
|
||||
# Fix the Site fixture domains so third party auth tests work correctly
|
||||
host = os.environ['BOK_CHOY_HOSTNAME']
|
||||
cms_port = os.environ['BOK_CHOY_CMS_PORT']
|
||||
lms_port = os.environ['BOK_CHOY_LMS_PORT']
|
||||
cms_domain = f'{host}:{cms_port}'
|
||||
Site.objects.filter(name='cms').update(domain=cms_domain)
|
||||
lms_domain = f'{host}:{lms_port}'
|
||||
Site.objects.filter(name='lms').update(domain=lms_domain)
|
||||
@@ -1,42 +0,0 @@
|
||||
""" # lint-amnesty, pylint: disable=django-not-configured
|
||||
Tests of the update_fixtures management command for bok-choy test database
|
||||
initialization.
|
||||
"""
|
||||
|
||||
|
||||
import os
|
||||
|
||||
import pytest
|
||||
from django.contrib.sites.models import Site
|
||||
from django.core.management import call_command
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def sites(db): # lint-amnesty, pylint: disable=unused-argument
|
||||
Site.objects.create(name='cms', domain='localhost:8031')
|
||||
Site.objects.create(name='lms', domain='localhost:8003')
|
||||
|
||||
|
||||
def test_localhost(db, monkeypatch, sites): # lint-amnesty, pylint: disable=redefined-outer-name, unused-argument
|
||||
monkeypatch.delitem(os.environ, 'BOK_CHOY_HOSTNAME', raising=False)
|
||||
call_command('update_fixtures')
|
||||
assert Site.objects.get(name='cms').domain == 'localhost:8031'
|
||||
assert Site.objects.get(name='lms').domain == 'localhost:8003'
|
||||
|
||||
|
||||
def test_devstack_cms(db, monkeypatch, sites): # lint-amnesty, pylint: disable=redefined-outer-name, unused-argument
|
||||
monkeypatch.setitem(os.environ, 'BOK_CHOY_HOSTNAME', 'edx.devstack.cms')
|
||||
monkeypatch.setitem(os.environ, 'BOK_CHOY_CMS_PORT', '18031')
|
||||
monkeypatch.setitem(os.environ, 'BOK_CHOY_LMS_PORT', '18003')
|
||||
call_command('update_fixtures')
|
||||
assert Site.objects.get(name='cms').domain == 'edx.devstack.cms:18031'
|
||||
assert Site.objects.get(name='lms').domain == 'edx.devstack.cms:18003'
|
||||
|
||||
|
||||
def test_devstack_lms(db, monkeypatch, sites): # lint-amnesty, pylint: disable=redefined-outer-name, unused-argument
|
||||
monkeypatch.setitem(os.environ, 'BOK_CHOY_HOSTNAME', 'edx.devstack.lms')
|
||||
monkeypatch.setitem(os.environ, 'BOK_CHOY_CMS_PORT', '18031')
|
||||
monkeypatch.setitem(os.environ, 'BOK_CHOY_LMS_PORT', '18003')
|
||||
call_command('update_fixtures')
|
||||
assert Site.objects.get(name='cms').domain == 'edx.devstack.lms:18031'
|
||||
assert Site.objects.get(name='lms').domain == 'edx.devstack.lms:18003'
|
||||
@@ -228,8 +228,7 @@ class TestProblemTypeAccess(SharedModuleStoreTestCase, MasqueradeMixin): # pyli
|
||||
graded=False,
|
||||
)
|
||||
cls.graded_score_weight_blocks[(graded, has_score, weight)] = block
|
||||
|
||||
host = os.environ.get('BOK_CHOY_HOSTNAME', '127.0.0.1')
|
||||
host = os.environ.get('127.0.0.1')
|
||||
metadata_lti_xblock = {
|
||||
'lti_id': 'correct_lti_id',
|
||||
'launch_url': 'http://{}:{}/{}'.format(host, '8765', 'correct_lti_endpoint'),
|
||||
|
||||
@@ -3,9 +3,9 @@ A pytest plugin that reports test contexts to coverage running in another proces
|
||||
"""
|
||||
|
||||
import pytest
|
||||
import requests
|
||||
# import requests
|
||||
|
||||
from pavelib.utils.envs import Env
|
||||
# from pavelib.utils.envs import Env
|
||||
|
||||
|
||||
class RemoteContextPlugin:
|
||||
@@ -25,16 +25,17 @@ class RemoteContextPlugin:
|
||||
def pytest_runtest_call(self, item):
|
||||
self.doit(item, "call")
|
||||
|
||||
def doit(self, item, when): # lint-amnesty, pylint: disable=missing-function-docstring
|
||||
if self.active:
|
||||
for cfg in Env.BOK_CHOY_SERVERS.values():
|
||||
result = requests.post(
|
||||
'http://{host}:{port}/coverage_context/update_context'.format(**cfg),
|
||||
{
|
||||
'context': f"{item.nodeid}|{when}",
|
||||
}
|
||||
)
|
||||
assert result.status_code == 204
|
||||
# commented for testing
|
||||
# def doit(self, item, when): # lint-amnesty, pylint: disable=missing-function-docstring
|
||||
# if self.active:
|
||||
# for cfg in Env.BOK_CHOY_SERVERS.values():
|
||||
# result = requests.post(
|
||||
# 'http://{host}:{port}/coverage_context/update_context'.format(**cfg),
|
||||
# {
|
||||
# 'context': f"{item.nodeid}|{when}",
|
||||
# }
|
||||
# )
|
||||
# assert result.status_code == 204
|
||||
|
||||
|
||||
@pytest.hookimpl(tryfirst=True)
|
||||
|
||||
@@ -61,18 +61,6 @@ class Env:
|
||||
# Python unittest dirs
|
||||
PYTHON_COVERAGERC = REPO_ROOT / ".coveragerc"
|
||||
|
||||
# Bok_choy dirs
|
||||
BOK_CHOY_DIR = REPO_ROOT / "common" / "test" / "acceptance"
|
||||
BOK_CHOY_LOG_DIR = GEN_LOG_DIR
|
||||
BOK_CHOY_REPORT_DIR = REPORT_DIR / "bok_choy"
|
||||
BOK_CHOY_A11Y_REPORT_DIR = REPORT_DIR / "a11y"
|
||||
BOK_CHOY_COVERAGERC = BOK_CHOY_DIR / ".coveragerc"
|
||||
BOK_CHOY_A11Y_COVERAGERC = BOK_CHOY_DIR / ".a11ycoveragerc"
|
||||
BOK_CHOY_A11Y_CUSTOM_RULES_FILE = (
|
||||
REPO_ROOT / "node_modules" / "edx-custom-a11y-rules" /
|
||||
"lib" / "custom_a11y_rules.js"
|
||||
)
|
||||
|
||||
# Which Python version should be used in xdist workers?
|
||||
PYTHON_VERSION = os.environ.get("PYTHON_VERSION", "2.7")
|
||||
|
||||
@@ -82,95 +70,18 @@ class Env:
|
||||
# build steps. For local development/testing, this shouldn't be needed.
|
||||
if os.environ.get("SHARD", None):
|
||||
shard_str = "shard_{}".format(os.environ.get("SHARD"))
|
||||
BOK_CHOY_REPORT_DIR = BOK_CHOY_REPORT_DIR / shard_str
|
||||
BOK_CHOY_LOG_DIR = BOK_CHOY_LOG_DIR / shard_str
|
||||
|
||||
# The stubs package is currently located in the Django app called "terrain"
|
||||
# from when they were used by both the bok-choy and lettuce (deprecated) acceptance tests
|
||||
BOK_CHOY_STUB_DIR = REPO_ROOT / "common" / "djangoapps" / "terrain"
|
||||
|
||||
# Directory that videos are served from
|
||||
VIDEO_SOURCE_DIR = REPO_ROOT / "test_root" / "data" / "video"
|
||||
|
||||
PRINT_SETTINGS_LOG_FILE = BOK_CHOY_LOG_DIR / "print_settings.log"
|
||||
PRINT_SETTINGS_LOG_FILE = GEN_LOG_DIR / "print_settings.log"
|
||||
|
||||
# Detect if in a Docker container, and if so which one
|
||||
SERVER_HOST = os.environ.get('BOK_CHOY_HOSTNAME', '0.0.0.0')
|
||||
SERVER_HOST = os.environ.get('0.0.0.0')
|
||||
USING_DOCKER = SERVER_HOST != '0.0.0.0'
|
||||
SETTINGS = 'bok_choy_docker' if USING_DOCKER else 'bok_choy'
|
||||
DEVSTACK_SETTINGS = 'devstack_docker' if USING_DOCKER else 'devstack'
|
||||
TEST_SETTINGS = 'test'
|
||||
|
||||
BOK_CHOY_SERVERS = {
|
||||
'lms': {
|
||||
'host': SERVER_HOST,
|
||||
'port': os.environ.get('BOK_CHOY_LMS_PORT', '8003'),
|
||||
'log': BOK_CHOY_LOG_DIR / "bok_choy_lms.log"
|
||||
},
|
||||
'cms': {
|
||||
'host': SERVER_HOST,
|
||||
'port': os.environ.get('BOK_CHOY_CMS_PORT', '8031'),
|
||||
'log': BOK_CHOY_LOG_DIR / "bok_choy_studio.log"
|
||||
}
|
||||
}
|
||||
|
||||
BOK_CHOY_STUBS = {
|
||||
|
||||
'xqueue': {
|
||||
'port': 8040,
|
||||
'log': BOK_CHOY_LOG_DIR / "bok_choy_xqueue.log",
|
||||
'config': 'register_submission_url=http://0.0.0.0:8041/test/register_submission',
|
||||
},
|
||||
|
||||
'ora': {
|
||||
'port': 8041,
|
||||
'log': BOK_CHOY_LOG_DIR / "bok_choy_ora.log",
|
||||
'config': '',
|
||||
},
|
||||
|
||||
'comments': {
|
||||
'port': 4567,
|
||||
'log': BOK_CHOY_LOG_DIR / "bok_choy_comments.log",
|
||||
},
|
||||
|
||||
'video': {
|
||||
'port': 8777,
|
||||
'log': BOK_CHOY_LOG_DIR / "bok_choy_video_sources.log",
|
||||
'config': f"root_dir={VIDEO_SOURCE_DIR}",
|
||||
},
|
||||
|
||||
'youtube': {
|
||||
'port': 9080,
|
||||
'log': BOK_CHOY_LOG_DIR / "bok_choy_youtube.log",
|
||||
},
|
||||
|
||||
'edxnotes': {
|
||||
'port': 8042,
|
||||
'log': BOK_CHOY_LOG_DIR / "bok_choy_edxnotes.log",
|
||||
},
|
||||
|
||||
'ecommerce': {
|
||||
'port': 8043,
|
||||
'log': BOK_CHOY_LOG_DIR / "bok_choy_ecommerce.log",
|
||||
},
|
||||
|
||||
'catalog': {
|
||||
'port': 8091,
|
||||
'log': BOK_CHOY_LOG_DIR / "bok_choy_catalog.log",
|
||||
},
|
||||
|
||||
'lti': {
|
||||
'port': 8765,
|
||||
'log': BOK_CHOY_LOG_DIR / "bok_choy_lti.log",
|
||||
},
|
||||
}
|
||||
|
||||
# Mongo databases that will be dropped before/after the tests run
|
||||
MONGO_HOST = 'edx.devstack.mongo' if USING_DOCKER else 'localhost'
|
||||
BOK_CHOY_MONGO_DATABASE = "test"
|
||||
BOK_CHOY_CACHE_HOST = 'edx.devstack.memcached' if USING_DOCKER else '0.0.0.0'
|
||||
BOK_CHOY_CACHE = memcache.Client([f'{BOK_CHOY_CACHE_HOST}:11211'], debug=0)
|
||||
|
||||
# Test Ids Directory
|
||||
TEST_DIR = REPO_ROOT / ".testids"
|
||||
|
||||
|
||||
@@ -138,8 +138,6 @@ bleach[css]==6.0.0
|
||||
# ora2
|
||||
# xblock-drag-and-drop-v2
|
||||
# xblock-poll
|
||||
bok-choy==2.0.2
|
||||
# via -r requirements/edx/testing.txt
|
||||
boto==2.39.0
|
||||
# via
|
||||
# -c requirements/edx/../constraints.txt
|
||||
@@ -1122,7 +1120,6 @@ lazy==1.6
|
||||
# -r requirements/edx/doc.txt
|
||||
# -r requirements/edx/testing.txt
|
||||
# acid-xblock
|
||||
# bok-choy
|
||||
# lti-consumer-xblock
|
||||
# ora2
|
||||
# xblock
|
||||
@@ -1809,10 +1806,6 @@ scipy==1.7.3
|
||||
# -r requirements/edx/testing.txt
|
||||
# chem
|
||||
# openedx-calc
|
||||
selenium==3.141.0
|
||||
# via
|
||||
# -r requirements/edx/testing.txt
|
||||
# bok-choy
|
||||
semantic-version==2.10.0
|
||||
# via
|
||||
# -r requirements/edx/doc.txt
|
||||
@@ -2121,7 +2114,6 @@ urllib3==1.26.16
|
||||
# pact-python
|
||||
# py2neo
|
||||
# requests
|
||||
# selenium
|
||||
# snowflake-connector-python
|
||||
user-util==1.0.0
|
||||
# via
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
-r coverage.txt # Utilities for calculating test coverage
|
||||
|
||||
beautifulsoup4 # Library for extracting data from HTML and XML files
|
||||
bok-choy # Framework for browser automation tests, based on selenium
|
||||
code-annotations # Perform code annotation checking, such as for PII annotations
|
||||
cssselect # Used to extract HTML fragments via CSS selectors in 2 test cases and pyquery
|
||||
ddt # Run a test case multiple times with different input; used in many, many of our tests
|
||||
@@ -41,7 +40,6 @@ pytest-json-report # Output json formatted warnings after running pytest
|
||||
pytest-metadata==1.8.0 # To prevent 'make upgrade' failure, dependency of pytest-json-report
|
||||
pytest-randomly # pytest plugin to randomly order tests
|
||||
pytest-xdist[psutil] # Parallel execution of tests on multiple CPU cores or hosts
|
||||
selenium # Browser automation library, used for acceptance tests
|
||||
singledispatch # Backport of functools.singledispatch from Python 3.4+, used in tests of XBlock rendering
|
||||
testfixtures # Provides a LogCapture utility used by several tests
|
||||
tox # virtualenv management for tests
|
||||
|
||||
@@ -104,8 +104,6 @@ bleach[css]==6.0.0
|
||||
# ora2
|
||||
# xblock-drag-and-drop-v2
|
||||
# xblock-poll
|
||||
bok-choy==2.0.2
|
||||
# via -r requirements/edx/testing.in
|
||||
boto==2.39.0
|
||||
# via
|
||||
# -c requirements/edx/../constraints.txt
|
||||
@@ -856,7 +854,6 @@ lazy==1.6
|
||||
# via
|
||||
# -r requirements/edx/base.txt
|
||||
# acid-xblock
|
||||
# bok-choy
|
||||
# lti-consumer-xblock
|
||||
# ora2
|
||||
# xblock
|
||||
@@ -1373,10 +1370,6 @@ scipy==1.7.3
|
||||
# -r requirements/edx/base.txt
|
||||
# chem
|
||||
# openedx-calc
|
||||
selenium==3.141.0
|
||||
# via
|
||||
# -r requirements/edx/testing.in
|
||||
# bok-choy
|
||||
semantic-version==2.10.0
|
||||
# via
|
||||
# -r requirements/edx/base.txt
|
||||
@@ -1568,7 +1561,6 @@ urllib3==1.26.16
|
||||
# pact-python
|
||||
# py2neo
|
||||
# requests
|
||||
# selenium
|
||||
# snowflake-connector-python
|
||||
user-util==1.0.0
|
||||
# via -r requirements/edx/base.txt
|
||||
|
||||
@@ -1,140 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
############################################################################
|
||||
#
|
||||
# reset-test-db.sh
|
||||
#
|
||||
# Resets the MySQL test database for the bok-choy acceptance tests.
|
||||
#
|
||||
# If it finds a cached schema and migration history, it will start
|
||||
# from the cached version to speed up migrations.
|
||||
#
|
||||
# If no cached database exists, it will create one. This can be
|
||||
# checked into the repo to speed up future tests.
|
||||
#
|
||||
# Note that we do NOT want to re-use the cache between test runs!
|
||||
# A newer commit could introduce migrations that do not exist
|
||||
# in other commits, which could cause migrations to fail in the other
|
||||
# commits.
|
||||
#
|
||||
# For this reason, we always use a cache that was committed to master
|
||||
# at the time the branch was created.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
# Fail fast
|
||||
set -e
|
||||
|
||||
DB_CACHE_DIR="common/test/db_cache"
|
||||
|
||||
if [[ -z "$BOK_CHOY_HOSTNAME" ]]; then
|
||||
MYSQL_HOST=""
|
||||
SETTINGS="bok_choy"
|
||||
else
|
||||
MYSQL_HOST="--host=edx.devstack.mysql57"
|
||||
SETTINGS="bok_choy_docker"
|
||||
fi
|
||||
|
||||
for i in "$@"; do
|
||||
case $i in
|
||||
-r|--rebuild_cache)
|
||||
REBUILD_CACHE=true
|
||||
;;
|
||||
-m|--migrations)
|
||||
APPLY_MIGRATIONS=true
|
||||
;;
|
||||
-c|--calculate_migrations)
|
||||
CALCULATE_MIGRATIONS=true
|
||||
;;
|
||||
-u|--use-existing-db)
|
||||
USE_EXISTING_DB=true
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
declare -A databases
|
||||
declare -a database_order
|
||||
databases=(["default"]="edxtest" ["student_module_history"]="student_module_history_test")
|
||||
database_order=("default" "student_module_history")
|
||||
|
||||
calculate_migrations() {
|
||||
echo "Calculating migrations for fingerprinting."
|
||||
output_file="common/test/db_cache/bok_choy_${db}_migrations.yaml"
|
||||
# Redirect stdout to /dev/null because the script will print
|
||||
# out all migrations to both stdout and the output file.
|
||||
./manage.py lms --settings "$SETTINGS" show_unapplied_migrations --database "$db" --output_file "$output_file" 1>/dev/null
|
||||
}
|
||||
|
||||
run_migrations() {
|
||||
echo "Running the lms migrations on the $db bok_choy DB."
|
||||
./manage.py lms --settings "$SETTINGS" migrate --database "$db" --traceback --noinput
|
||||
echo "Running the cms migrations on the $db bok_choy DB."
|
||||
./manage.py cms --settings "$SETTINGS" migrate --database "$db" --traceback --noinput
|
||||
}
|
||||
|
||||
load_cache_into_db() {
|
||||
echo "Loading the schema from the filesystem into the $db MySQL DB."
|
||||
mysql "$MYSQL_HOST" -u root "${databases["$db"]}" < "$DB_CACHE_DIR/bok_choy_schema_$db.sql"
|
||||
echo "Loading the fixture data from the filesystem into the $db MySQL DB."
|
||||
./manage.py lms --settings "$SETTINGS" loaddata --database "$db" "$DB_CACHE_DIR/bok_choy_data_$db.json"
|
||||
echo "Loading the migration data from the filesystem into the $db MySQL DB."
|
||||
mysql "$MYSQL_HOST" -u root "${databases["$db"]}" < "$DB_CACHE_DIR/bok_choy_migrations_data_$db.sql"
|
||||
}
|
||||
|
||||
rebuild_cache_for_db() {
|
||||
# Make sure the DB has all migrations applied
|
||||
run_migrations
|
||||
|
||||
# Dump the schema and data to the cache
|
||||
echo "Using the dumpdata command to save the $db fixture data to the filesystem."
|
||||
./manage.py lms --settings "$SETTINGS" dumpdata --database "$db" > "$DB_CACHE_DIR/bok_choy_data_$db.json" --exclude=api_admin.Catalog
|
||||
echo "Saving the schema of the $db bok_choy DB to the filesystem."
|
||||
mysqldump "$MYSQL_HOST" -u root --no-data --skip-comments --skip-dump-date "${databases[$db]}" > "$DB_CACHE_DIR/bok_choy_schema_$db.sql"
|
||||
|
||||
# dump_data does not dump the django_migrations table so we do it separately.
|
||||
echo "Saving the django_migrations table of the $db bok_choy DB to the filesystem."
|
||||
mysqldump $MYSQL_HOST -u root --no-create-info --skip-comments --skip-dump-date "${databases["$db"]}" django_migrations > "$DB_CACHE_DIR/bok_choy_migrations_data_$db.sql"
|
||||
}
|
||||
|
||||
for db in "${database_order[@]}"; do
|
||||
if ! [[ $USE_EXISTING_DB ]]; then
|
||||
echo "CREATE DATABASE IF NOT EXISTS ${databases[$db]};" | mysql $MYSQL_HOST -u root
|
||||
|
||||
# Clear out the test database
|
||||
#
|
||||
# We are using the reset_db command which uses "DROP DATABASE" and
|
||||
# "CREATE DATABASE" in case the tests are being run in an environment (e.g. devstack
|
||||
# or a jenkins worker environment) that already ran tests on another commit that had
|
||||
# different migrations that created, dropped, or altered tables.
|
||||
echo "Issuing a reset_db command to the $db bok_choy MySQL database."
|
||||
./manage.py lms --settings "$SETTINGS" reset_db --traceback --router "$db"
|
||||
fi
|
||||
|
||||
if ! [[ $CALCULATE_MIGRATIONS ]]; then
|
||||
# If there are cached database schemas/data, then load them.
|
||||
# If they are missing, then we will want to build new cache files even if
|
||||
# not explicitly directed to do so via arguments passed to this script.
|
||||
if [[ ! -f $DB_CACHE_DIR/bok_choy_schema_$db.sql || ! -f $DB_CACHE_DIR/bok_choy_data_$db.json || ! -f $DB_CACHE_DIR/bok_choy_migrations_data_$db.sql ]]; then
|
||||
REBUILD_CACHE=true
|
||||
else
|
||||
load_cache_into_db
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ $REBUILD_CACHE ]]; then
|
||||
echo "Cleaning the DB cache directory and building new files."
|
||||
mkdir -p $DB_CACHE_DIR && rm -f $DB_CACHE_DIR/bok_choy*
|
||||
|
||||
for db in "${database_order[@]}"; do
|
||||
rebuild_cache_for_db
|
||||
done
|
||||
elif [[ $APPLY_MIGRATIONS ]]; then
|
||||
for db in "${database_order[@]}"; do
|
||||
run_migrations
|
||||
done
|
||||
elif [[ $CALCULATE_MIGRATIONS ]]; then
|
||||
for db in "${database_order[@]}"; do
|
||||
calculate_migrations
|
||||
done
|
||||
fi
|
||||
4
tox.ini
4
tox.ini
@@ -26,10 +26,6 @@ setenv =
|
||||
PYTHONHASHSEED=0
|
||||
TOXENV={envname}
|
||||
passenv =
|
||||
BOK_CHOY_CMS_PORT
|
||||
BOKCHOY_HEADLESS
|
||||
BOK_CHOY_HOSTNAME
|
||||
BOK_CHOY_LMS_PORT
|
||||
DISABLE_COURSEENROLLMENT_HISTORY
|
||||
DISPLAY
|
||||
DJANGO_SETTINGS_MODULE
|
||||
|
||||
@@ -9,5 +9,4 @@ 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',
|
||||
'edx.devstack.mongo' if 'BOK_CHOY_HOSTNAME' in os.environ else 'localhost')
|
||||
MONGO_HOST = os.environ.get('EDXAPP_TEST_MONGO_HOST', 'localhost')
|
||||
|
||||
@@ -3,7 +3,6 @@ Tests for methods defined in mongo_utils.py
|
||||
"""
|
||||
|
||||
|
||||
import os
|
||||
from unittest import TestCase
|
||||
from uuid import uuid4
|
||||
|
||||
@@ -29,7 +28,7 @@ class MongoUtilsTests(TestCase):
|
||||
"""
|
||||
Test that read_preference parameter gets converted to a valid pymongo read preference.
|
||||
"""
|
||||
host = 'edx.devstack.mongo' if 'BOK_CHOY_HOSTNAME' in os.environ else 'localhost'
|
||||
host = '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)
|
||||
|
||||
@@ -15,7 +15,6 @@ the course, section, subsection, unit, etc.
|
||||
|
||||
import datetime
|
||||
import json
|
||||
import os
|
||||
import shutil
|
||||
import unittest
|
||||
from tempfile import mkdtemp
|
||||
@@ -937,7 +936,7 @@ class VideoBlockStudentViewDataTestCase(unittest.TestCase):
|
||||
@patch.object(settings, 'CONTENTSTORE', create=True, new={
|
||||
'ENGINE': 'xmodule.contentstore.mongo.MongoContentStore',
|
||||
'DOC_STORE_CONFIG': {
|
||||
'host': 'edx.devstack.mongo' if 'BOK_CHOY_HOSTNAME' in os.environ else 'localhost',
|
||||
'host': 'localhost',
|
||||
'db': 'test_xcontent_%s' % uuid4().hex,
|
||||
},
|
||||
# allow for additional options that can be keyed on a name, e.g. 'trashcan'
|
||||
|
||||
Reference in New Issue
Block a user