From 0cef5a28f0c15c82046a684473626b6ccb138343 Mon Sep 17 00:00:00 2001 From: Mark Vayngrib Date: Mon, 30 Jul 2018 13:54:45 -0400 Subject: [PATCH] fix: ignore call home from dev env MyClouds --- src/in-house-bot/deployment.ts | 5 +++++ src/test/in-house-bot/deployment.test.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/in-house-bot/deployment.ts b/src/in-house-bot/deployment.ts index bc2b98f79..288c3193b 100644 --- a/src/in-house-bot/deployment.ts +++ b/src/in-house-bot/deployment.ts @@ -596,6 +596,11 @@ export class Deployment { public handleCallHome = async (report: ICallHomePayload) => { const { deploymentUUID, apiUrl, org, identity, stackId, version, adminEmail } = report + if (utils.isLocalUrl(apiUrl)) { + this.logger.info('ignoring call home from dev env MyCloud', report) + return true + } + let childDeployment if (deploymentUUID) { try { diff --git a/src/test/in-house-bot/deployment.test.ts b/src/test/in-house-bot/deployment.test.ts index 7208e4d6a..a8b2e33ce 100644 --- a/src/test/in-house-bot/deployment.test.ts +++ b/src/test/in-house-bot/deployment.test.ts @@ -43,7 +43,7 @@ test('deployment by referral', loudAsync(async (t) => { const child = createBotInRegion({ region }) sandbox.stub(child.stackUtils, 'getCurrentAdminEmail').resolves(conf.adminEmail) - const childUrl = 'childurl' + const childUrl = 'http://tradle.somewhereoverthe.com' child.serviceMap.RestApi.ApiGateway.url = childUrl const parentDeployment = new Deployment({