Repository: badges/shields
Pull request #2831 (2019-01-21 21:31:12)

Reorganize BaseService-related modules
Ref #2698

shields-ci: 
<!--
  0 failure: 
  4 warning:  This PR modified ..., This PR modified ..., This PR modified ..., This PR modified ...
  1 messages
  
  DangerID: danger-id-default;
-->


<table>
  <thead>
    <tr>
      <th width="50"></th>
      <th width="100%" data-danger-table="true">Warnings</th>
    </tr>
  </thead>
  <tbody><tr>
      <td>:warning:</td>
      <td>This PR modified service code for <kbd>azure-devops</kbd> but not its test code. <br>That's okay so long as it's refactoring existing code.</td>
    </tr>
  
<tr>
      <td>:warning:</td>
      <td>This PR modified service code for <kbd>gitter</kbd> but not its test code. <br>That's okay so long as it's refactoring existing code.</td>
    </tr>
  
<tr>
      <td>:warning:</td>
      <td>This PR modified service code for <kbd>packagecontrol</kbd> but not its test code. <br>That's okay so long as it's refactoring existing code.</td>
    </tr>
  
<tr>
      <td>:warning:</td>
      <td>This PR modified service code for <kbd>static-badge</kbd> but not its test code. <br>That's okay so long as it's refactoring existing code.</td>
    </tr>
  </tbody>
</table>


<table>
  <thead>
    <tr>
      <th width="50"></th>
      <th width="100%" data-danger-table="true">Messages</th>
    </tr>
  </thead>
  <tbody><tr>
      <td>:book:</td>
      <td>:sparkles: Thanks for your contribution to Shields, @paulmelnikow!</td>
    </tr>
  </tbody>
</table>


<p align="right">
  Generated by :no_entry_sign: <a href="https://danger.systems/js">dangerJS</a> against c8ee2f986ded59ec679ed8083b0e20c2ecdde8c1
</p>

calebcartwright: Is this ready for a 👍 again?
paulmelnikow: Yup, it looks ready to me!

Patch:
diff --git a/services/base-json.js b/core/base-service/base-json.js
similarity index 100%
rename from services/base-json.js
rename to core/base-service/base-json.js
diff --git a/services/base-json.spec.js b/core/base-service/base-json.spec.js
similarity index 100%
rename from services/base-json.spec.js
rename to core/base-service/base-json.spec.js
diff --git a/services/base-non-memory-caching.js b/core/base-service/base-non-memory-caching.js
similarity index 93%
rename from services/base-non-memory-caching.js
rename to core/base-service/base-non-memory-caching.js
index 953d1a3262..9ffe066c58 100644
--- a/services/base-non-memory-caching.js
+++ b/core/base-service/base-non-memory-caching.js
@@ -1,9 +1,9 @@
 'use strict'
 
-const makeBadge = require('../gh-badges/lib/make-badge')
-const { makeSend } = require('../core/base-service/legacy-result-sender')
+const makeBadge = require('../../gh-badges/lib/make-badge')
 const BaseService = require('./base')
 const { setCacheHeaders } = require('./cache-headers')
+const { makeSend } = require('./legacy-result-sender')
 
 // Badges are subject to two independent types of caching: in-memory and
 // downstream.
diff --git a/services/base-static.js b/core/base-service/base-static.js
similarity index 87%
rename from services/base-static.js
rename to core/base-service/base-static.js
index 94f0b69955..d9afd34672 100644
--- a/services/base-static.js
+++ b/core/base-service/base-static.js
@@ -1,13 +1,13 @@
 'use strict'
 
-const makeBadge = require('../gh-badges/lib/make-badge')
-const { makeSend } = require('../core/base-service/legacy-result-sender')
-const analytics = require('../core/server/analytics')
+const makeBadge = require('../../gh-badges/lib/make-badge')
+const analytics = require('../server/analytics')
 const BaseService = require('./base')
 const {
   serverHasBeenUpSinceResourceCached,
   setCacheHeadersForStaticResource,
 } = require('./cache-headers')
+const { makeSend } = require('./legacy-result-sender')
 
 module.exports = class BaseStaticService extends BaseService {
   static register({ camp }, serviceConfig) {
diff --git a/services/base-svg-scraping.js b/core/base-service/base-svg-scraping.js
similarity index 100%
rename from services/base-svg-scraping.js
rename to core/base-service/base-svg-scraping.js
diff --git a/services/base-svg-scraping.spec.js b/core/base-service/base-svg-scraping.spec.js
similarity index 97%
rename from services/base-svg-scraping.spec.js
rename to core/base-service/base-svg-scraping.spec.js
index 05b80babbf..2cc8af5c2f 100644
--- a/services/base-svg-scraping.spec.js
+++ b/core/base-service/base-svg-scraping.spec.js
@@ -3,8 +3,8 @@
 const { expect } = require('chai')
 const sinon = require('sinon')
 const Joi = require('joi')
-const { makeBadgeData } = require('../lib/badge-data')
-const makeBadge = require('../gh-badges/lib/make-badge')
+const { makeBadgeData } = require('../../lib/badge-data')
+const makeBadge = require('../../gh-badges/lib/make-badge')
 const BaseSvgScrapingService = require('./base-svg-scraping')
 
 function makeExampleSvg({ label, message }) {
diff --git a/services/base-xml.js b/core/base-service/base-xml.js
similarity index 100%
rename from services/base-xml.js
rename to core/base-service/base-xml.js
diff --git a/services/base-xml.spec.js b/core/base-service/base-xml.spec.js
similarity index 100%
rename from services/base-xml.spec.js
rename to core/base-service/base-xml.spec.js
diff --git a/services/base-yaml.js b/core/base-service/base-yaml.js
similarity index 100%
rename from services/base-yaml.js
rename to core/base-service/base-yaml.js
diff --git a/services/base-yaml.spec.js b/core/base-service/base-yaml.spec.js
similarity index 100%
rename from services/base-yaml.spec.js
rename to core/base-service/base-yaml.spec.js
diff --git a/services/base.js b/core/base-service/base.js
similarity index 97%
rename from services/base.js
rename to core/base-service/base.js
index d876529003..b864adf0ca 100644
--- a/services/base.js
+++ b/core/base-service/base.js
@@ -4,6 +4,15 @@
 const emojic = require('emojic')
 const pathToRegexp = require('path-to-regexp')
 const Joi = require('joi')
+const { checkErrorResponse } = require('../../lib/error-helper')
+const { toArray } = require('../../lib/badge-data')
+const { svg2base64 } = require('../../lib/svg-helpers')
+const {
+  decodeDataUrlFromQueryParam,
+  prepareNamedLogo,
+} = require('../../lib/logos')
+const { assertValidCategory } = require('../../services/categories')
+const coalesce = require('./coalesce')
 const {
   NotFound,
   InvalidResponse,
@@ -11,19 +20,10 @@ const {
   InvalidParameter,
   Deprecated,
 } = require('./errors')
-const coalesce = require('../core/base-service/coalesce')
-const validate = require('../core/base-service/validate')
-const { checkErrorResponse } = require('../lib/error-helper')
-const { toArray } = require('../lib/badge-data')
-const { svg2base64 } = require('../lib/svg-helpers')
-const {
-  decodeDataUrlFromQueryParam,
-  prepareNamedLogo,
-} = require('../lib/logos')
+const { assertValidServiceDefinition } = require('./service-definitions')
 const trace = require('./trace')
 const { validateExample, transformExample } = require('./transform-example')
-const { assertValidCategory } = require('./categories')
-const { assertValidServiceDefinition } = require('./service-definitions')
+const validate = require('./validate')
 
 const defaultBadgeDataSchema = Joi.object({
   label: Joi.string(),
diff --git a/services/base.spec.js b/core/base-service/base.spec.js
similarity index 99%
rename from services/base.spec.js
rename to core/base-service/base.spec.js
index f0b9d2cacd..c8df17ade4 100644
--- a/services/base.spec.js
+++ b/core/base-service/base.spec.js
@@ -4,7 +4,7 @@ const Joi = require('joi')
 const { expect } = require('chai')
 const { test, given, forCases } = require('sazerac')
 const sinon = require('sinon')
-const { getShieldsIcon } = require('../lib/logos')
+const { getShieldsIcon } = require('../../lib/logos')
 const trace = require('./trace')
 
 const {
@@ -16,7 +16,7 @@ const {
 } = require('./errors')
 const BaseService = require('./base')
 
-require('../lib/register-chai-plugins.spec')
+require('../register-chai-plugins.spec')
 
 class DummyService extends BaseService {
   static render({ namedParamA, queryParamA }) {
diff --git a/services/cache-headers.js b/core/base-service/cache-headers.js
similarity index 98%
rename from services/cache-headers.js
rename to core/base-service/cache-headers.js
index 58ecc7e192..99697464c8 100644
--- a/services/cache-headers.js
+++ b/core/base-service/cache-headers.js
@@ -2,7 +2,7 @@
 
 const assert = require('assert')
 const Joi = require('joi')
-const coalesce = require('../core/base-service/coalesce')
+const coalesce = require('./coalesce')
 
 const serverStartTimeGMTString = new Date().toGMTString()
 const serverStartTimestamp = Date.now()
diff --git a/services/cache-headers.spec.js b/core/base-service/cache-headers.spec.js
similarity index 100%
rename from services/cache-headers.spec.js
rename to core/base-service/cache-headers.spec.js
diff --git a/services/deprecated-service.js b/core/base-service/deprecated-service.js
similarity index 100%
rename from services/deprecated-service.js
rename to core/base-service/deprecated-service.js
diff --git a/services/deprecated-service.spec.js b/core/base-service/deprecated-service.spec.js
similarity index 100%
rename from services/deprecated-service.spec.js
rename to core/base-service/deprecated-service.spec.js
diff --git a/services/errors.js b/core/base-service/errors.js
similarity index 100%
rename from services/errors.js
rename to core/base-service/errors.js
diff --git a/core/base-service/index.js b/core/base-service/index.js
index 85fce21a5f..bdedfe9bd9 100644
--- a/core/base-service/index.js
+++ b/core/base-service/index.js
@@ -1,14 +1,14 @@
 'use strict'
 
-const BaseService = require('../../services/base')
-const BaseJsonService = require('../../services/base-json')
-const NonMemoryCachingBaseService = require('../../services/base-non-memory-caching')
-const BaseStaticService = require('../../services/base-static')
-const BaseSvgScrapingService = require('../../services/base-svg-scraping')
-const BaseXmlService = require('../../services/base-xml')
-const BaseYamlService = require('../../services/base-yaml')
+const BaseService = require('./base')
+const BaseJsonService = require('./base-json')
+const NonMemoryCachingBaseService = require('./base-non-memory-caching')
+const BaseStaticService = require('./base-static')
+const BaseSvgScrapingService = require('./base-svg-scraping')
+const BaseXmlService = require('./base-xml')
+const BaseYamlService = require('./base-yaml')
 
-const deprecatedService = require('../../services/deprecated-service')
+const deprecatedService = require('./deprecated-service')
 
 const {
   NotFound,
@@ -16,7 +16,7 @@ const {
   Inaccessible,
   InvalidParameter,
   Deprecated,
-} = require('../../services/errors')
+} = require('./errors')
 
 module.exports = {
   BaseService,
diff --git a/core/base-service/legacy-request-handler.js b/core/base-service/legacy-request-handler.js
index 2ee57c1dac..9795d77d54 100644
--- a/core/base-service/legacy-request-handler.js
+++ b/core/base-service/legacy-request-handler.js
@@ -4,17 +4,17 @@
 const domain = require('domain')
 const request = require('request')
 const queryString = require('query-string')
-const log = require('../server/log')
-const analytics = require('../server/analytics')
 const LruCache = require('../../gh-badges/lib/lru-cache')
 const makeBadge = require('../../gh-badges/lib/make-badge')
+const { makeBadgeData: getBadgeData } = require('../../lib/badge-data')
+const analytics = require('../server/analytics')
+const log = require('../server/log')
+const { setCacheHeaders } = require('./cache-headers')
 const {
   Inaccessible,
   InvalidResponse,
   ShieldsRuntimeError,
-} = require('../../services/errors')
-const { setCacheHeaders } = require('../../services/cache-headers')
-const { makeBadgeData: getBadgeData } = require('../../lib/badge-data')
+} = require('./errors')
 const { makeSend } = require('./legacy-result-sender')
 
 // We avoid calling the vendor's server for computation of the information in a
diff --git a/services/service-definitions.js b/core/base-service/service-definitions.js
similarity index 100%
rename from services/service-definitions.js
rename to core/base-service/service-definitions.js
diff --git a/services/trace.js b/core/base-service/trace.js
similarity index 100%
rename from services/trace.js
rename to core/base-service/trace.js
diff --git a/services/transform-example.js b/core/base-service/transform-example.js
similarity index 100%
rename from services/transform-example.js
rename to core/base-service/transform-example.js
diff --git a/services/transform-example.spec.js b/core/base-service/transform-example.spec.js
similarity index 100%
rename from services/transform-example.spec.js
rename to core/base-service/transform-example.spec.js
diff --git a/core/base-service/validate.js b/core/base-service/validate.js
index 97f7c7a03e..4d1cf55b3c 100644
--- a/core/base-service/validate.js
+++ b/core/base-service/validate.js
@@ -2,7 +2,7 @@
 
 const emojic = require('emojic')
 const Joi = require('joi')
-const trace = require('../../services/trace')
+const trace = require('./trace')
 
 function validate(
   {
diff --git a/core/base-service/validate.spec.js b/core/base-service/validate.spec.js
index 152a6423df..7340aa2bc8 100644
--- a/core/base-service/validate.spec.js
+++ b/core/base-service/validate.spec.js
@@ -3,8 +3,8 @@
 const Joi = require('joi')
 const { expect } = require('chai')
 const sinon = require('sinon')
-const trace = require('../../services/trace')
-const { InvalidParameter } = require('../../services/errors')
+const trace = require('./trace')
+const { InvalidParameter } = require('./errors')
 const validate = require('./validate')
 
 describe('validate', function() {
diff --git a/doc/deprecating-badges.md b/doc/deprecating-badges.md
index d11f0c0ec4..238e7f575a 100644
--- a/doc/deprecating-badges.md
+++ b/doc/deprecating-badges.md
@@ -18,12 +18,12 @@ Add a key for the service with the corresponding date for deprecation, for examp
 
 Locate the source file(s) for the service, which can be found in `*.service.js` files located within the directory for the service (`./services/:service-name/`) such as `./services/imagelayers/imagelayers.service.js`.
 
-Replace the existing service class implementation with the `DeprecatedService` class from `./services/deprecated-service.js` using the respective `category`, `url`, and `label` values for that service. For example:
+Replace the existing service class implementation with the `DeprecatedService` class from `./core/base-service/deprecated-service.js` using the respective `category`, `url`, and `label` values for that service. For example:
 
 ```js
 'use strict'
 
-const deprecatedService = require('../deprecated-service')
+const { deprecatedService } = require('..')
 
 // image layers integration - deprecated as of November 2018.
 module.exports = deprecatedService({
diff --git a/lib/deprecation-helpers.js b/lib/deprecation-helpers.js
index 89bd141a64..36f13affd2 100644
--- a/lib/deprecation-helpers.js
+++ b/lib/deprecation-helpers.js
@@ -1,6 +1,6 @@
 'use strict'
 
-const { Deprecated } = require('../services/errors')
+const { Deprecated } = require('../core/base-service/errors')
 
 function enforceDeprecation(effectiveDate) {
   if (Date.now() >= effectiveDate.getTime()) {
diff --git a/lib/deprecation-helpers.spec.js b/lib/deprecation-helpers.spec.js
index 0a58a2a05d..26bc307f9d 100644
--- a/lib/deprecation-helpers.spec.js
+++ b/lib/deprecation-helpers.spec.js
@@ -1,7 +1,7 @@
 'use strict'
 
 const { expect } = require('chai')
-const { Deprecated } = require('../services/errors')
+const { Deprecated } = require('../core/base-service/errors')
 const { enforceDeprecation } = require('./deprecation-helpers')
 
 describe('enforceDeprecation', function() {
diff --git a/lib/error-helper.js b/lib/error-helper.js
index 49ff12e121..c19a711a66 100644
--- a/lib/error-helper.js
+++ b/lib/error-helper.js
@@ -4,7 +4,7 @@ const {
   NotFound,
   InvalidResponse,
   Inaccessible,
-} = require('../services/errors')
+} = require('../core/base-service/errors')
 const defaultErrorMessages = {
   404: 'not found',
 }
diff --git a/lib/error-helper.spec.js b/lib/error-helper.spec.js
index d9b91c4d8c..d774db9972 100644
--- a/lib/error-helper.spec.js
+++ b/lib/error-helper.spec.js
@@ -1,12 +1,12 @@
 'use strict'
 
 const { expect } = require('chai')
-const { checkErrorResponse } = require('./error-helper')
 const {
   NotFound,
   InvalidResponse,
   Inaccessible,
-} = require('../services/errors')
+} = require('../core/base-service/errors')
+const { checkErrorResponse } = require('./error-helper')
 
 describe('Standard Error Handler', function() {
   it('makes inaccessible badge', function() {
diff --git a/lib/regular-update.js b/lib/regular-update.js
index ce7916d98d..3957b5411e 100644
--- a/lib/regular-update.js
+++ b/lib/regular-update.js
@@ -1,6 +1,6 @@
 'use strict'
 
-const { Inaccessible, InvalidResponse } = require('../services/errors')
+const { Inaccessible, InvalidResponse } = require('../core/base-service/errors')
 
 // Map from URL to { timestamp: last fetch time, data: data }.
 let regularUpdateCache = Object.create(null)
diff --git a/services/azure-devops/azure-devops-build.service.js b/services/azure-devops/azure-devops-build.service.js
index ad61500d00..52d9070781 100644
--- a/services/azure-devops/azure-devops-build.service.js
+++ b/services/azure-devops/azure-devops-build.service.js
@@ -1,9 +1,8 @@
 'use strict'
 
-const BaseSvgService = require('../base-svg-scraping')
-const { NotFound } = require('..')
-const { keywords, fetch } = require('./azure-devops-helpers')
 const { renderBuildStatusBadge } = require('../../lib/build-status')
+const { BaseSvgScrapingService, NotFound } = require('..')
+const { keywords, fetch } = require('./azure-devops-helpers')
 
 const documentation = `
 <p>
@@ -28,7 +27,7 @@ const documentation = `
   alt="PROJECT_ID is in the id property of the API response." />
 `
 
-module.exports = class AzureDevOpsBuild extends BaseSvgService {
+module.exports = class AzureDevOpsBuild extends BaseSvgScrapingService {
   static get category() {
     return 'build'
   }
diff --git a/services/azure-devops/azure-devops-release.service.js b/services/azure-devops/azure-devops-release.service.js
index 94ff6ab7c1..331d59f7ca 100644
--- a/services/azure-devops/azure-devops-release.service.js
+++ b/services/azure-devops/azure-devops-release.service.js
@@ -1,8 +1,8 @@
 'use strict'
 
-const BaseSvgService = require('../base-svg-scraping')
-const { keywords, fetch } = require('./azure-devops-helpers')
 const { renderBuildStatusBadge } = require('../../lib/build-status')
+const { BaseSvgScrapingService } = require('..')
+const { keywords, fetch } = require('./azure-devops-helpers')
 
 const documentation = `
 <p>
@@ -22,7 +22,7 @@ const documentation = `
 </p>
 `
 
-module.exports = class AzureDevOpsRelease extends BaseSvgService {
+module.exports = class AzureDevOpsRelease extends BaseSvgScrapingService {
   static get category() {
     return 'build'
   }
diff --git a/services/dynamic-common.js b/services/dynamic-common.js
index 1eb0345ec5..02dd5f8e44 100644
--- a/services/dynamic-common.js
+++ b/services/dynamic-common.js
@@ -3,7 +3,7 @@
 const Joi = require('joi')
 const validate = require('../core/base-service/validate')
 const { toArray } = require('../lib/badge-data')
-const { InvalidResponse } = require('./errors')
+const { InvalidResponse } = require('.')
 
 const individualValueSchema = Joi.alternatives()
   .try(Joi.string(), Joi.number())
diff --git a/services/endpoint/endpoint.service.js b/services/endpoint/endpoint.service.js
index ed9fa31ce8..54ac158bfc 100644
--- a/services/endpoint/endpoint.service.js
+++ b/services/endpoint/endpoint.service.js
@@ -3,8 +3,7 @@
 const { URL } = require('url')
 const Joi = require('joi')
 const { errorMessages } = require('../dynamic/dynamic-helpers')
-const BaseJsonService = require('../base-json')
-const { InvalidParameter } = require('../errors')
+const { BaseJsonService, InvalidParameter } = require('..')
 const { optionalUrl } = require('../validators')
 
 const blockedDomains = ['github.com', 'shields.io']
diff --git a/services/gitter/gitter.service.js b/services/gitter/gitter.service.js
index 308ee90d4f..9a54a2a4d9 100644
--- a/services/gitter/gitter.service.js
+++ b/services/gitter/gitter.service.js
@@ -1,6 +1,6 @@
 'use strict'
 
-const BaseStaticService = require('../base-static')
+const { BaseStaticService } = require('..')
 
 module.exports = class Gitter extends BaseStaticService {
   static get category() {
diff --git a/services/index.js b/services/index.js
index 5081f0a5ed..7e9bd6ba55 100644
--- a/services/index.js
+++ b/services/index.js
@@ -2,10 +2,12 @@
 
 const glob = require('glob')
 const base = require('../core/base-service')
-const createServiceTester = require('./create-service-tester')
-const ServiceTester = require('./service-tester')
+const createServiceTester = require('../core/service-test-runner/create-service-tester')
+const ServiceTester = require('../core/service-test-runner/service-tester')
+const {
+  assertValidServiceDefinitionExport,
+} = require('../core/base-service/service-definitions')
 const { categories } = require('./categories')
-const { assertValidServiceDefinitionExport } = require('./service-definitions')
 
 const { BaseService } = base
 
diff --git a/services/legacy-service.js b/services/legacy-service.js
index d2f8bb585b..b57969722a 100644
--- a/services/legacy-service.js
+++ b/services/legacy-service.js
@@ -1,6 +1,6 @@
 'use strict'
 
-const BaseService = require('./base')
+const { BaseService } = require('.')
 
 // This adapter allows running legacy badges in the new file layout and
 // service architecture.
diff --git a/services/package-json-helpers.js b/services/package-json-helpers.js
index 9ad97dc03c..79f41e903c 100644
--- a/services/package-json-helpers.js
+++ b/services/package-json-helpers.js
@@ -1,7 +1,7 @@
 'use strict'
 
 const Joi = require('joi')
-const { InvalidParameter } = require('./errors')
+const { InvalidParameter } = require('.')
 
 const isDependencyMap = Joi.object()
   .pattern(
diff --git a/services/packagecontrol/packagecontrol.service.js b/services/packagecontrol/packagecontrol.service.js
index 09d6c83e65..335c7e5b86 100644
--- a/services/packagecontrol/packagecontrol.service.js
+++ b/services/packagecontrol/packagecontrol.service.js
@@ -1,9 +1,9 @@
 'use strict'
 
 const Joi = require('joi')
-const BaseJsonService = require('../base-json')
 const { metric } = require('../../lib/text-formatters')
 const { downloadCount } = require('../../lib/color-formatters')
+const { BaseJsonService } = require('..')
 const { nonNegativeInteger } = require('../validators')
 
 const keywords = ['sublime', 'sublimetext', 'packagecontrol']
diff --git a/services/static-badge/static-badge.service.js b/services/static-badge/static-badge.service.js
index e7d5e2092f..7d4070b393 100644
--- a/services/static-badge/static-badge.service.js
+++ b/services/static-badge/static-badge.service.js
@@ -1,6 +1,6 @@
 'use strict'
 
-const BaseStaticService = require('../base-static')
+const { BaseStaticService } = require('..')
 const { escapeFormat } = require('../../core/badge-urls/path-helpers')
 
 module.exports = class StaticBadge extends BaseStaticService {


Test patch:
diff --git a/lib/register-chai-plugins.spec.js b/core/register-chai-plugins.spec.js
similarity index 100%
rename from lib/register-chai-plugins.spec.js
rename to core/register-chai-plugins.spec.js
diff --git a/services/create-service-tester.js b/core/service-test-runner/create-service-tester.js
similarity index 93%
rename from services/create-service-tester.js
rename to core/service-test-runner/create-service-tester.js
index a67029c04f..54a0836b6c 100644
--- a/services/create-service-tester.js
+++ b/core/service-test-runner/create-service-tester.js
@@ -1,8 +1,8 @@
 'use strict'
 
 const caller = require('caller')
+const BaseService = require('../base-service/base')
 const ServiceTester = require('./service-tester')
-const BaseService = require('./base')
 
 // Automatically create a ServiceTester.
 //
diff --git a/services/icedfrisby-no-nock.js b/core/service-test-runner/icedfrisby-no-nock.js
similarity index 100%
rename from services/icedfrisby-no-nock.js
rename to core/service-test-runner/icedfrisby-no-nock.js
diff --git a/services/service-tester.js b/core/service-test-runner/service-tester.js
similarity index 98%
rename from services/service-tester.js
rename to core/service-test-runner/service-tester.js
index d04e4a7bc9..e9fc897a0e 100644
--- a/services/service-tester.js
+++ b/core/service-test-runner/service-tester.js
@@ -4,7 +4,7 @@ const emojic = require('emojic')
 const frisby = require('./icedfrisby-no-nock')(
   require('icedfrisby-nock')(require('icedfrisby'))
 )
-const trace = require('./trace')
+const trace = require('../base-service/trace')
 
 /**
  * Encapsulate a suite of tests. Create new tests using create() and register
diff --git a/services/endpoint/endpoint.tester.js b/services/endpoint/endpoint.tester.js
index 92a05e0e77..2df245777a 100644
--- a/services/endpoint/endpoint.tester.js
+++ b/services/endpoint/endpoint.tester.js
@@ -3,7 +3,7 @@
 const { expect } = require('chai')
 const { getShieldsIcon } = require('../../lib/logos')
 
-const t = (module.exports = require('../create-service-tester')())
+const t = (module.exports = require('..').createServiceTester())
 
 t.create('Valid schema (mocked)')
   .get('.json?url=https://example.com/badge')
diff --git a/test-fixtures/invalid-mixed.fixture.js b/test-fixtures/invalid-mixed.fixture.js
index 673614149d..b0922abaef 100644
--- a/test-fixtures/invalid-mixed.fixture.js
+++ b/test-fixtures/invalid-mixed.fixture.js
@@ -1,6 +1,6 @@
 'use strict'
 
-const BaseJsonService = require('../services/base-json')
+const BaseJsonService = require('../core/base-service/base-json')
 
 class BadBaseService {}
 class GoodService extends BaseJsonService {}
diff --git a/test-fixtures/valid-array.fixture.js b/test-fixtures/valid-array.fixture.js
index 6c3176b465..42bc59e011 100644
--- a/test-fixtures/valid-array.fixture.js
+++ b/test-fixtures/valid-array.fixture.js
@@ -1,6 +1,6 @@
 'use strict'
 
-const BaseJsonService = require('../services/base-json')
+const BaseJsonService = require('../core/base-service/base-json')
 const LegacyService = require('../services/legacy-service')
 
 class GoodServiceOne extends BaseJsonService {
diff --git a/test-fixtures/valid-class.fixture.js b/test-fixtures/valid-class.fixture.js
index 9169c0ee0d..9f4bf0fd46 100644
--- a/test-fixtures/valid-class.fixture.js
+++ b/test-fixtures/valid-class.fixture.js
@@ -1,6 +1,6 @@
 'use strict'
 
-const BaseJsonService = require('../services/base-json')
+const BaseJsonService = require('../core/base-service/base-json')
 
 class GoodService extends BaseJsonService {
   static get category() {
diff --git a/test-fixtures/valid-object.fixture.js b/test-fixtures/valid-object.fixture.js
index 3523477cd8..7c5353d3c4 100644
--- a/test-fixtures/valid-object.fixture.js
+++ b/test-fixtures/valid-object.fixture.js
@@ -1,6 +1,6 @@
 'use strict'
 
-const BaseJsonService = require('../services/base-json')
+const BaseJsonService = require('../core/base-service/base-json')
 const LegacyService = require('../services/legacy-service')
 
 class GoodServiceOne extends BaseJsonService {