Checking in schema 3 handling and accompanying tests. r=preed, bug 368117.

git-svn-id: svn://10.0.0.236/trunk@235949 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
morgamic%mozilla.com 2007-09-13 19:17:12 +00:00
parent 5a612f1eef
commit a380aef43e
3 changed files with 27 additions and 2 deletions

View File

@ -27,6 +27,8 @@ class Verify(ColumnFixture):
"partial": "String",
"updateType": "String",
"osVersion": "String",
"dist": "String",
"distVersion": "String",
"licenseUrl": "String",
"lastURI": "String",
"newURI": "String",
@ -49,6 +51,8 @@ class Verify(ColumnFixture):
self.platform = ""
self.locale = ""
self.osVersion = ""
self.dist = ""
self.distVersion = ""
# For storign the last retrieved AUS XML and its URI.
self.lastURI = ""
@ -131,7 +135,8 @@ class Verify(ColumnFixture):
if (self.osVersion != "NULL"):
return '/'.join((self.host, self.updateVersion, self.product, self.version, \
self.build, self.platform, self.locale, \
self.channel, self.osVersion, "update.xml"))
self.channel, self.osVersion, self.dist, \
self.distVersion, "update.xml"))
else:
return '/'.join((self.host, self.updateVersion, self.product, self.version, \
self.build, self.platform, self.locale, \

View File

@ -8,6 +8,8 @@
!define platform {platform}
!define locale {locale}
!define osVersion {osVersion}
!define dist {dist}
!define distVersion {distVersion}
!1 Patches
1 only a complete
@ -65,7 +67,6 @@
1 should serve update if build version in uri is newer than build version in *.txt
2 should serve update if build version in uri is newer than build version in *.txt, fallback channel
3 should serve update if build version in uri is older than build version in *.txt if using release datasource
|aus.Verify|${host}|${updateVersion}|${product}|${version}|${platform}|${locale}|${osVersion}|
|build|channel|complete|partial|hasUpdate?|hasComplete?|hasPartial?|isValidXml?|
|7000000001|channel|complete|partial|true|true|true|true|
@ -76,6 +77,7 @@
2 should serve update, regardless of build ID in url or *.txt, if using the release datasource
3 should serve update if build version in uri is older than build version in *.txt if using release datasource and channel is nightly
|aus.Verify|${host}|1|${product}|${version}|${platform}|${locale}|NULL|
|build|channel|complete|partial|hasUpdate?|hasComplete?|hasPartial?|isValidXml?|
|7000000001|nightly|complete|partial|false|false|false|true|
|7000000002|nightly|complete|partial|true|true|true|true|
|7000000003|nightly|complete|partial|true|true|true|true|
@ -110,3 +112,10 @@
|1.5.0.5|1100000003|nightly|complete|partial|false|false|false|true|
|6.0|1100000001|nightly|complete|partial|false|false|false|true|
!1 Dist URLs
1 complete update works with schema 3
2 complete and partial update works with schema 3
|aus.Verify|${host}|3|${product}|${version}|${platform}|${locale}|${osVersion}|
|build|channel|complete|partial|hasUpdate?|hasComplete?|hasPartial?|isValidXml?|
|1000000001|channel|complete001|partial001|true|true|false|true|
|1000000002|channel|complete002|partial002|true|true|true|true|

View File

@ -103,6 +103,17 @@ $clean['locale'] = isset($path[5]) ? trim($path[5]) : null;
*/
switch ($clean['updateVersion']) {
/*
* This is for the fourth revision, adding %DISTRIBUTION% and
* %DISTRIBUTION_VERSION%.
* /update/3/%PRODUCT%/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/update.xml
*/
case 3:
// Parse out dist information. For now, though, we aren't doing
// anything with it.
$clean['dist'] = isset($path[8]) ? trim($path[8]) : null;
$clean['distVersion'] = isset($path[9]) ? trim($path[9]) : null;
/*
* This is for the third revision of the URI schema, with %OS_VERSION%.
* /update2/2/%PRODUCT%/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/update.xml