Commit 7044f8d1 authored by kalman@chromium.org's avatar kalman@chromium.org

Docserver: Use the testing URL for the new omahaproxy history API.

R=rsesek@chromium.org, rockot@chromium.org
NOTRY=true

Review URL: https://codereview.chromium.org/314133004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275451 0039d316-1c4b-4281-b951-d872f2087c98
parent 776e71cd
application: chrome-apps-doc
version: 3-25-1
version: 3-26-0
runtime: python27
api_version: 1
threadsafe: false
......
......@@ -166,7 +166,7 @@ class BranchUtility(object):
numbers = {}
for entry in version_json:
if entry['os'] not in ['win', 'linux', 'mac', 'cros']:
if entry['os'] not in ('win', 'linux', 'mac', 'cros'):
continue
for version in entry['versions']:
if version['channel'] != channel_name:
......@@ -198,9 +198,8 @@ class BranchUtility(object):
return branch
version_json = json.loads(self._history_result.Get().content)
for entry in version_json['events']:
# Here, entry['title'] looks like: '<title> - <version>.##.<branch>.##'
version_title = entry['title'].split(' - ')[1].split('.')
for entry in version_json:
version_title = entry['version'].split('.')
if version_title[0] == str(version):
self._branch_object_store.Set(str(version), version_title[2])
return version_title[2]
......@@ -227,8 +226,8 @@ class BranchUtility(object):
version_json = json.loads(self._history_result.Get().content)
latest_version = 0
for entry in version_json['events']:
version_title = entry['title'].split(' - ')[1].split('.')
for entry in version_json:
version_title = entry['version'].split('.')
version = int(version_title[0])
if version > latest_version:
latest_version = version
......
......@@ -121,7 +121,7 @@ class BranchUtilityTest(unittest.TestCase):
self.assertEquals(stable_info, self._branch_util.GetChannelInfo('stable'))
def testGetLatestVersionNumber(self):
self.assertEquals(28, self._branch_util.GetLatestVersionNumber())
self.assertEquals(37, self._branch_util.GetLatestVersionNumber())
def testGetBranchForVersion(self):
self.assertEquals('1500',
......
......@@ -2,4 +2,4 @@ cron:
- description: Repopulates all cached data.
url: /_cron
schedule: every 5 minutes
target: 3-25-1
target: 3-26-0
......@@ -9,8 +9,8 @@ branch_utility/first.json
branch_utility/second.json
Downloaded from:
http://omahaproxy.appspot.com/history?channel=dev&os=win&json=1
Downloaded on 5th June 2014 from:
http://10.omahaproxy-hrd.appspot.com/history.json?channel=dev&os=win&json=1
- Contains a history of revision names for the dev channel on Windows.
- File has been formatted for readability. To view a readable version of the
data at the above URL, remove '&json=1'.
......
......@@ -7,7 +7,8 @@ GITHUB_BASE = 'https://github.com/GoogleChrome/chrome-app-samples/tree/master'
RAW_GITHUB_BASE = ('https://github.com/GoogleChrome/chrome-app-samples/raw/'
'master')
OMAHA_PROXY_URL = 'http://omahaproxy.appspot.com/json'
OMAHA_HISTORY = 'http://omahaproxy.appspot.com/history'
# TODO(kalman): Change this to http://omahaproxy.appspot.com/history.json
OMAHA_HISTORY = 'http://10.omahaproxy-hrd.appspot.com/history.json'
OMAHA_DEV_HISTORY = '%s?channel=dev&os=win&json=1' % OMAHA_HISTORY
SVN_URL = 'http://src.chromium.org/chrome'
VIEWVC_URL = 'http://src.chromium.org/viewvc/chrome'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment