Bug 1447104 - Update addon metadata in TPS to new format r?markh draft
authorThom Chiovoloni <tchiovoloni@mozilla.com>
Mon, 19 Mar 2018 13:19:13 -0700
changeset 769541 6ff67a68770aa4bd3cbe68057692fa957493648c
parent 769320 4f1014eb5039bdfdd7a39fb7785d102df1994a6f
push id103168
push userbmo:tchiovoloni@mozilla.com
push dateMon, 19 Mar 2018 20:19:30 +0000
reviewersmarkh
bugs1447104
milestone61.0a1
Bug 1447104 - Update addon metadata in TPS to new format r?markh MozReview-Commit-ID: BqxqzH2OppR
services/sync/tests/tps/addons/api/restartless-xpi@tests.mozilla.org.json
services/sync/tests/tps/addons/api/restartless-xpi@tests.mozilla.org.xml
services/sync/tests/tps/addons/api/unsigned-xpi@tests.mozilla.org.json
services/sync/tests/tps/addons/api/unsigned-xpi@tests.mozilla.org.xml
testing/tps/tps/testrunner.py
new file mode 100644
--- /dev/null
+++ b/services/sync/tests/tps/addons/api/restartless-xpi@tests.mozilla.org.json
@@ -0,0 +1,21 @@
+{
+  "next": null,
+  "results": [
+    {
+      "name": "Restartless Test XPI",
+      "type": "extension",
+      "guid": "restartless-xpi@tests.mozilla.org",
+      "current_version": {
+        "version": "1.0",
+        "files": [
+          {
+            "platform": "all",
+            "size": 485,
+            "url": "http://127.0.0.1:4567/addons/restartless.xpi"
+          }
+        ]
+      },
+      "last_updated": "2011-09-05T20:42:09Z"
+    }
+  ]
+}
\ No newline at end of file
deleted file mode 100644
--- a/services/sync/tests/tps/addons/api/restartless-xpi@tests.mozilla.org.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<searchresults total_results="1">
-  <addon id="5617">
-  <name>Restartless Test XPI</name>
-  <type id="1">Extension</type>
-  <guid>restartless-xpi@tests.mozilla.org</guid>
-  <slug>restartless-xpi</slug>
-  <version>1.0</version>
-
-  <compatible_applications><application>
-      <name>Firefox</name>
-      <application_id>1</application_id>
-      <min_version>3.6</min_version>
-      <max_version>*</max_version>
-      <appID>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</appID>
-    </application></compatible_applications>
-  <all_compatible_os><os>ALL</os></all_compatible_os>
-
-  <install os="ALL" size="485">http://127.0.0.1:4567/addons/restartless.xpi</install>
-    <created epoch="1252903662">
-      2009-09-14T04:47:42Z
-    </created>
-    <last_updated epoch="1315255329">
-      2011-09-05T20:42:09Z
-    </last_updated>
-    </addon>
-</searchresults>
new file mode 100644
--- /dev/null
+++ b/services/sync/tests/tps/addons/api/unsigned-xpi@tests.mozilla.org.json
@@ -0,0 +1,21 @@
+{
+  "next": null,
+  "results": [
+    {
+      "name": "Unsigned Test XPI",
+      "type": "extension",
+      "guid": "unsigned-xpi@tests.mozilla.org",
+      "current_version": {
+        "version": "1.0",
+        "files": [
+          {
+            "platform": "all",
+            "size": 452,
+            "url": "http://127.0.0.1:4567/addons/unsigned.xpi"
+          }
+        ]
+      },
+      "last_updated": "2011-09-05T20:42:09Z"
+    }
+  ]
+}
\ No newline at end of file
deleted file mode 100644
--- a/services/sync/tests/tps/addons/api/unsigned-xpi@tests.mozilla.org.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<searchresults total_results="1">
-  <addon id="5612">
-  <name>Unsigned Test XPI</name>
-  <type id="1">Extension</type>
-  <guid>unsigned-xpi@tests.mozilla.org</guid>
-  <slug>unsigned-xpi</slug>
-  <version>1.0</version>
-
-  <compatible_applications><application>
-      <name>Firefox</name>
-      <application_id>1</application_id>
-      <min_version>3.6</min_version>
-      <max_version>*</max_version>
-      <appID>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</appID>
-    </application></compatible_applications>
-  <all_compatible_os><os>ALL</os></all_compatible_os>
-
-  <install os="ALL" size="452">http://127.0.0.1:4567/addons/unsigned.xpi</install>
-    <created epoch="1252903662">
-      2009-09-14T04:47:42Z
-    </created>
-    <last_updated epoch="1315255329">
-      2011-09-05T20:42:09Z
-    </last_updated>
-    </addon>
-</searchresults>
--- a/testing/tps/tps/testrunner.py
+++ b/testing/tps/tps/testrunner.py
@@ -59,17 +59,17 @@ class TPSTestRunner(object):
         'app.update.enabled': False,
         'browser.dom.window.dump.enabled': True,
         'browser.sessionstore.resume_from_crash': False,
         'browser.shell.checkDefaultBrowser': False,
         'browser.tabs.warnOnClose': False,
         'browser.warnOnQuit': False,
         # Allow installing extensions dropped into the profile folder
         'extensions.autoDisableScopes': 10,
-        'extensions.getAddons.get.url': 'http://127.0.0.1:4567/addons/api/%IDS%.xml',
+        'extensions.getAddons.get.url': 'http://127.0.0.1:4567/addons/api/%IDS%.json',
         # Our pretend addons server doesn't support metadata...
         'extensions.getAddons.cache.enabled': False,
         'extensions.install.requireSecureOrigin': False,
         'extensions.update.enabled': False,
         # Don't open a dialog to show available add-on updates
         'extensions.update.notifyUser': False,
         'services.sync.firstSync': 'notReady',
         'services.sync.lastversion': '1.0',