testing: consistently name bmoweb environment variable (bug 1363509); r?glob draft
authorGregory Szorc <gps@mozilla.com>
Tue, 09 May 2017 14:23:24 -0700
changeset 11318 fa8cfd940e3a46920af40828a11abf57048205d8
parent 11317 45418301beea77f90e308bfdd2b05217cbd46b40
child 11319 cd82c4b973e81f5685f654b3b14621fd294c756a
push id1719
push userbmo:gps@mozilla.com
push dateSat, 24 Jun 2017 00:30:23 +0000
reviewersglob
bugs1363509
testing: consistently name bmoweb environment variable (bug 1363509); r?glob Environment variables are used by the test harness to pass the Docker image IDs to tests. The environment variable name is typically DOCKER_*_IMAGE where the wildcard is the name of the directory under testing/docker. This naming was inconsistent for the bmoweb image, so this commit fixes it. MozReview-Commit-ID: HU1XtnJp1oo
testing/vcttesting/docker_mach_commands.py
testing/vcttesting/mozreview_mach_commands.py
testing/vcttesting/testing.py
testing/vcttesting/unittest.py
--- a/testing/vcttesting/docker_mach_commands.py
+++ b/testing/vcttesting/docker_mach_commands.py
@@ -60,17 +60,17 @@ class DockerCommands(object):
     @Command('start-bmo', category='docker',
         description='Start a bugzilla.mozilla.org instance')
     @CommandArgument('cluster', help='Name to give to this instance')
     @CommandArgument('http_port',
         help='HTTP port the server should be exposed on')
     @CommandArgument('--web-id-file',
         help='File to store the bmoweb container ID in')
     def start_bmo(self, cluster, http_port, web_id_file=None):
-        web_image = os.environ.get('DOCKER_BMO_WEB_IMAGE')
+        web_image = os.environ.get('DOCKER_BMOWEB_IMAGE')
 
         res = self.d.start_bmo(cluster=cluster,
                 http_port=http_port,
                 web_image=web_image)
 
         if web_id_file:
             with open(web_id_file, 'wb') as fh:
                 fh.write(res['web_id'])
--- a/testing/vcttesting/mozreview_mach_commands.py
+++ b/testing/vcttesting/mozreview_mach_commands.py
@@ -26,17 +26,17 @@ class MozReviewCommands(object):
                 where = os.environ['MOZREVIEW_HOME']
             else:
                 # Check for the path used by start-local-mozreview
                 default_path = os.path.abspath(
                     os.path.join(HERE, '..', '..', '..', 'mozreview-test'))
                 if os.path.isdir(default_path):
                     where = default_path
 
-        web_image = os.environ.get('DOCKER_BMO_WEB_IMAGE')
+        web_image = os.environ.get('DOCKER_BMOWEB_IMAGE')
         hgrb_image = os.environ.get('DOCKER_HGRB_IMAGE')
         ldap_image = os.environ.get('DOCKER_LDAP_IMAGE')
         pulse_image = os.environ.get('DOCKER_PULSE_IMAGE')
         rbweb_image = os.environ.get('DOCKER_RBWEB_IMAGE')
         autolanddb_image = os.environ.get('DOCKER_AUTOLANDDB_IMAGE')
         autoland_image = os.environ.get('DOCKER_AUTOLAND_IMAGE')
         hgweb_image = os.environ.get('DOCKER_HGWEB_IMAGE')
         treestatus_image = os.environ.get('DOCKER_TREESTATUS_IMAGE')
--- a/testing/vcttesting/testing.py
+++ b/testing/vcttesting/testing.py
@@ -271,26 +271,26 @@ def get_docker_state(docker, tests, verb
         env['DOCKER_AUTOLANDDB_IMAGE'] = mr_images['autolanddb']
         env['DOCKER_AUTOLAND_IMAGE'] = mr_images['autoland']
         env['DOCKER_RBWEB_IMAGE'] = mr_images['rbweb']
         env['DOCKER_TREESTATUS_IMAGE'] = mr_images['treestatus']
         env['DOCKER_LDAP_IMAGE'] = mr_images['ldap']
         if not hgmo:
             env['DOCKER_HGWEB_IMAGE'] = mr_images['hgweb']
         if not bmo:
-            env['DOCKER_BMO_WEB_IMAGE'] = mr_images['bmoweb']
+            env['DOCKER_BMOWEB_IMAGE'] = mr_images['bmoweb']
 
     if hgmo:
         env['DOCKER_HGMASTER_IMAGE'] = hgmo_images['hgmaster']
         env['DOCKER_HGWEB_IMAGE'] = hgmo_images['hgweb']
         env['DOCKER_LDAP_IMAGE'] = hgmo_images['ldap']
         env['DOCKER_PULSE_IMAGE'] = hgmo_images['pulse']
 
     if bmo:
-        env['DOCKER_BMO_WEB_IMAGE'] = bmo_images['bmoweb']
+        env['DOCKER_BMOWEB_IMAGE'] = bmo_images['bmoweb']
 
     return env
 
 
 def produce_coverage_reports(coverdir):
     cov = Coverage(data_file='coverage')
     cov.combine(data_paths=[os.path.join(coverdir, 'data')])
 
--- a/testing/vcttesting/unittest.py
+++ b/testing/vcttesting/unittest.py
@@ -26,17 +26,17 @@ from selenium.webdriver.support.wait imp
 from vcttesting.docker import DockerNotAvailable
 from vcttesting.mozreview import MozReview
 
 
 # The environment variables should be set by the test runner. If
 # they aren't set, you are likely invoking the tests wrong.
 def start_mozreview(mr):
     mr.start(
-         web_image=os.environ['DOCKER_BMO_WEB_IMAGE'],
+         web_image=os.environ['DOCKER_BMOWEB_IMAGE'],
          ldap_image=os.environ['DOCKER_LDAP_IMAGE'],
          pulse_image=os.environ['DOCKER_PULSE_IMAGE'],
          autolanddb_image=os.environ['DOCKER_AUTOLANDDB_IMAGE'],
          autoland_image=os.environ['DOCKER_AUTOLAND_IMAGE'],
          hgrb_image=os.environ['DOCKER_HGRB_IMAGE'],
          rbweb_image=os.environ['DOCKER_RBWEB_IMAGE'],
          hgweb_image=os.environ['DOCKER_HGWEB_IMAGE'],
          treestatus_image=os.environ['DOCKER_TREESTATUS_IMAGE'])