Moved stub servers to terrain
Refactored stub services for style and DRY Added unit tests for stub implementations Updated acceptance tests that depend on stubs. Updated Studio acceptance tests to use YouTube stub server; fixed failing tests in devstack.
This commit is contained in:
@@ -114,22 +114,6 @@ try:
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
# Because an override for where to run will affect which ports to use,
|
||||
# set this up after the local overrides.
|
||||
if LETTUCE_SELENIUM_CLIENT == 'saucelabs':
|
||||
LETTUCE_SERVER_PORT = choice(PORTS)
|
||||
else:
|
||||
LETTUCE_SERVER_PORT = randint(1024, 65535)
|
||||
|
||||
|
||||
# Set up Video information so that the cms will send
|
||||
# requests to a mock Youtube server running locally
|
||||
if LETTUCE_SELENIUM_CLIENT == 'saucelabs':
|
||||
VIDEO_PORT = choice(PORTS)
|
||||
PORTS.remove(VIDEO_PORT)
|
||||
else:
|
||||
VIDEO_PORT = randint(1024, 65535)
|
||||
|
||||
# for testing Youtube
|
||||
YOUTUBE_API['url'] = "http://127.0.0.1:" + str(VIDEO_PORT) + '/test_transcripts_youtube/'
|
||||
|
||||
# Point the URL used to test YouTube availability to our stub YouTube server
|
||||
YOUTUBE_TEST_URL = "http://127.0.0.1:{0}/test_youtube/".format(YOUTUBE_PORT)
|
||||
YOUTUBE_API['url'] = "http://127.0.0.1:{0}/test_transcripts_youtube/".format(YOUTUBE_PORT)
|
||||
|
||||
@@ -359,6 +359,13 @@ CELERY_QUEUES = {
|
||||
DEFAULT_PRIORITY_QUEUE: {}
|
||||
}
|
||||
|
||||
|
||||
############################## Video ##########################################
|
||||
|
||||
# URL to test YouTube availability
|
||||
YOUTUBE_TEST_URL = 'https://gdata.youtube.com/feeds/api/videos/'
|
||||
|
||||
|
||||
############################ APPS #####################################
|
||||
|
||||
INSTALLED_APPS = (
|
||||
|
||||
@@ -150,6 +150,17 @@ CELERY_ALWAYS_EAGER = True
|
||||
CELERY_RESULT_BACKEND = 'cache'
|
||||
BROKER_TRANSPORT = 'memory'
|
||||
|
||||
|
||||
########################### Server Ports ###################################
|
||||
|
||||
# These ports are carefully chosen so that if the browser needs to
|
||||
# access them, they will be available through the SauceLabs SSH tunnel
|
||||
LETTUCE_SERVER_PORT = 8003
|
||||
XQUEUE_PORT = 8040
|
||||
YOUTUBE_PORT = 8031
|
||||
LTI_PORT = 8765
|
||||
|
||||
|
||||
################### Make tests faster
|
||||
# http://slacy.com/blog/2012/04/make-your-tests-faster-in-django-1-4/
|
||||
PASSWORD_HASHERS = (
|
||||
|
||||
Reference in New Issue
Block a user