Skip to content

Commit

Permalink
Remove support for revision in SystemAddon superblobs. (mozilla-relen…
Browse files Browse the repository at this point in the history
…g#285). r=jlorenzo
  • Loading branch information
bhearsum authored Mar 27, 2017
1 parent 72f6e0c commit d8356c4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 17 deletions.
9 changes: 5 additions & 4 deletions auslib/blobs/schemas/superblob.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
required:
- name
- schema_version
- revision
- blobs
additionalProperties: false
properties:
Expand All @@ -48,14 +47,16 @@
description: Human readable identifier
minLength: 1
maxLength: 100
product:
type: string
description: The product that the blob is associated to
minLength: 1
maxLength: 100
schema_version:
type: number
description: Blob identifier number
enum:
- 4000
revision:
type: number
description: Revision number of adds collection
blobs:
type: array
items:
Expand Down
8 changes: 1 addition & 7 deletions auslib/blobs/superblob.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,7 @@ def getInnerHeaderXML(self, updateQuery, update_type, whitelistedDomains, specia
"""
:return: Header specific to GMP and systemaddons superblob
"""
if not self.get("products"):
revision = self['revision']
# In case of systemaddons superblob
return ' <addons revision=\"%i\">' % (revision)
else:
# In case of GMP superblob
return ' <addons>'
return ' <addons>'

def getInnerFooterXML(self, updateQuery, update_type, whitelistedDomains, specialForceHosts):
return ' </addons>'
3 changes: 1 addition & 2 deletions auslib/test/blobs/test_superblob.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ def setUp(self):
{
"name": "SystemAddOnsSuperblob",
"schema_version": 1000,
"revision": 123,
"blobs": [
"Hello-1.0",
"Pocket-2.0"
Expand Down Expand Up @@ -58,7 +57,7 @@ def testInnerHeaderXML(self):
self.specialForceHosts)

expected_header_gmp = ' <addons>'
expected_header_addon = ' <addons revision="123">'
expected_header_addon = ' <addons>'

self.assertEqual(headerXML_gmp, expected_header_gmp)
self.assertEquals(headerXML_addon, expected_header_addon)
Expand Down
6 changes: 2 additions & 4 deletions auslib/test/web/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,6 @@ def setUp(self):
{
"name": "superblobaddon",
"schema_version": 4000,
"revision": 123,
"blobs": ["responseblob-a"]
}
"""))
Expand All @@ -525,7 +524,6 @@ def setUp(self):
{
"name": "superblobaddon",
"schema_version": 4000,
"revision": 124,
"blobs": ["responseblob-a", "responseblob-b"]
}
"""))
Expand Down Expand Up @@ -862,7 +860,7 @@ def testSuperBlobAddOnMultipleUpdates(self):
# update / 3 / gg / 3 / 1 / p / l / a / a / a / a / update.xml?force = 0
self.assertUpdateEqual(ret, """<?xml version="1.0"?>
<updates>
<addons revision="124">
<addons>
<addon id="c" URL="http://a.com/e" hashFunction="SHA512" hashValue="3" size="2" version="1"/>
<addon id="d" URL="http://a.com/c" hashFunction="SHA512" hashValue="50" size="20" version="5"/>
<addon id="b" URL="http://a.com/b" hashFunction="sha512" hashValue="23" size="27" version="1"/>
Expand All @@ -875,7 +873,7 @@ def testSuperBlobAddOnOneUpdates(self):
# update / 3 / gg / 3 / 1 / p / l / a / a / a / a / update.xml?force = 0
self.assertUpdateEqual(ret, """<?xml version="1.0"?>
<updates>
<addons revision="123">
<addons>
<addon id="c" URL="http://a.com/e" hashFunction="SHA512" hashValue="3" size="2" version="1"/>
<addon id="d" URL="http://a.com/c" hashFunction="SHA512" hashValue="50" size="20" version="5"/>
</addons>
Expand Down

0 comments on commit d8356c4

Please sign in to comment.