From fc6d60e36dd771964d14e8a282934ea2f80dda5b Mon Sep 17 00:00:00 2001 From: Hannah Wolfe Date: Fri, 21 Jan 2022 14:50:56 +0000 Subject: [PATCH] Updated test UrlUtils to use canary by default refs: https://github.com/TryGhost/Toolbox/issues/168 - This file was pinning various tests to v3 We're going to be dropping the idea of having multiple versions of the API in each Ghost version. Because this has not achieved the goal of making it easier to make breaking changes, but it has created an ordinate amount of technical debt and maintenance overhead. As we know this is going away in the next major, there is no benefit to us constantly running tests that check if those versions still work, especially given how long they take. Instead we're starting work to ensure that all of our test work on canary, and that canary has excellent test coverage so that we can be sure that our one API version works really well and that any changes, no matter how subtle are deliberate, tracked and understood. --- test/utils/urlUtils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/utils/urlUtils.js b/test/utils/urlUtils.js index 4b430e0382..f169669ea8 100644 --- a/test/utils/urlUtils.js +++ b/test/utils/urlUtils.js @@ -13,7 +13,7 @@ const getInstance = (options) => { getSiteUrl: config.getSiteUrl, getAdminUrl: config.getAdminUrl, apiVersions: options.apiVersions, - defaultApiVersion: 'v3', + defaultApiVersion: 'canary', slugs: options.slugs, redirectCacheMaxAge: options.redirectCacheMaxAge, baseApiPath: '/ghost/api' @@ -46,7 +46,7 @@ const stubUrlUtils = (options, sandbox) => { const stubUrlUtilsFromConfig = () => { const options = { apiVersions: config.get('api:versions'), - defaultApiVersion: 'v3', + defaultApiVersion: 'canary', slugs: config.get('slugs').protected, redirectCacheMaxAge: config.get('caching:301:maxAge'), baseApiPath: '/ghost/api'