Bug 1345023 - Changed SYNC_API_VERSION to 1.5 and updated SUPPORTED_PROTOCOL_VERSIONS to reflect this change. Also altered the changed SYNC_API_VERSION constant from 1.5 to 1.1 in the head_http_server test file r?markh . draft
authorJoseph Cameron <jcameron97@btinternet.com>
Wed, 15 Mar 2017 02:32:43 -0400
changeset 498714 fa90fb8d3b281dcac8e9b324b026685d4cae99b8
parent 498708 128d0c46d34e767d3bf8bda82afdd59ac2f2218f
child 549225 ade3bf1fe96ce4b361da0211a19e26160336acd2
push id49279
push userbmo:jcameron97@btinternet.com
push dateWed, 15 Mar 2017 06:52:14 +0000
reviewersmarkh
bugs1345023
milestone55.0a1
Bug 1345023 - Changed SYNC_API_VERSION to 1.5 and updated SUPPORTED_PROTOCOL_VERSIONS to reflect this change. Also altered the changed SYNC_API_VERSION constant from 1.5 to 1.1 in the head_http_server test file r?markh . MozReview-Commit-ID: A44U1QIPsoz
services/sync/modules/constants.js
services/sync/tests/unit/head_http_server.js
services/sync/tests/unit/test_clients_engine.js
--- a/services/sync/modules/constants.js
+++ b/services/sync/modules/constants.js
@@ -5,17 +5,17 @@
 
 // Process each item in the "constants hash" to add to "global" and give a name
 this.EXPORTED_SYMBOLS = [];
 for (let [key, val] of Object.entries({
 
 WEAVE_VERSION:                         "@weave_version@",
 
 // Sync Server API version that the client supports.
-SYNC_API_VERSION:                      "1.1",
+SYNC_API_VERSION:                      "1.5",
 
 // Version of the data format this client supports. The data format describes
 // how records are packaged; this is separate from the Server API version and
 // the per-engine cleartext formats.
 STORAGE_VERSION:                       5,
 PREFS_BRANCH:                          "services.sync.",
 
 // Host "key" to access Weave Identity in the password manager
--- a/services/sync/tests/unit/head_http_server.js
+++ b/services/sync/tests/unit/head_http_server.js
@@ -2,17 +2,17 @@
 /* import-globals-from ../../../common/tests/unit/head_helpers.js */
 /* import-globals-from head_helpers.js */
 
 var Cm = Components.manager;
 
 // Shared logging for all HTTP server functions.
 Cu.import("resource://gre/modules/Log.jsm");
 const SYNC_HTTP_LOGGER = "Sync.Test.Server";
-const SYNC_API_VERSION = "1.5";
+const SYNC_API_VERSION = "1.1";
 
 // Use the same method that record.js does, which mirrors the server.
 // The server returns timestamps with 1/100 sec granularity. Note that this is
 // subject to change: see Bug 650435.
 function new_timestamp() {
   return Math.round(Date.now() / 10) / 100;
 }
 
--- a/services/sync/tests/unit/test_clients_engine.js
+++ b/services/sync/tests/unit/test_clients_engine.js
@@ -27,19 +27,18 @@ function check_record_version(user, id) 
     rec.ciphertext = payload.ciphertext;
     rec.hmac = payload.hmac;
     rec.IV = payload.IV;
 
     let cleartext = rec.decrypt(Service.collectionKeys.keyForCollection("clients"));
 
     _("Payload is " + JSON.stringify(cleartext));
     equal(Services.appinfo.version, cleartext.version);
-    equal(2, cleartext.protocols.length);
-    equal("1.1", cleartext.protocols[0]);
-    equal("1.5", cleartext.protocols[1]);
+    equal(1, cleartext.protocols.length);
+    equal("1.5", cleartext.protocols[0]);
 }
 
 // compare 2 different command arrays, taking into account that a flowID
 // attribute must exist, be unique in the commands, but isn't specified in
 // "expected" as the value isn't known.
 function compareCommands(actual, expected, description) {
   let tweakedActual = JSON.parse(JSON.stringify(actual));
   tweakedActual.map(elt => delete elt.flowID);