@sap/bas-sdk
Advanced tools
Comparing version 3.4.2 to 3.4.3
@@ -10,3 +10,3 @@ "use strict"; | ||
const envLandscapeLabel = process.env.TENANT_LANDSCAPE_LABEL; | ||
if (!envLandscapeLabel) { | ||
if (!envLandscapeLabel || !envLandscapeLabel.startsWith("cf")) { | ||
return process.env.CF_API_ENDPOINT || ""; | ||
@@ -13,0 +13,0 @@ } |
@@ -24,2 +24,8 @@ "use strict"; | ||
}); | ||
it("TENANT_LANDSCAPE_LABEL variable is n/a, CF_API_ENDPOINT exists - should return CF_API_ENDPOINT", async () => { | ||
bas_sdk_sinon_helper_1.stubEnv({ TENANT_LANDSCAPE_LABEL: "n/a" }); | ||
bas_sdk_sinon_helper_1.stubEnv({ CF_API_ENDPOINT: "https://api.cf.sap.hana.ondemand.com" }); | ||
const res = await getCFEndpoint(); | ||
chai_1.expect(res).to.be.equals("https://api.cf.sap.hana.ondemand.com"); | ||
}); | ||
it("canary region - should return sap endpoint", async () => { | ||
@@ -26,0 +32,0 @@ bas_sdk_sinon_helper_1.stubEnv({ TENANT_LANDSCAPE_LABEL: "cf-eu10-canary" }); |
{ | ||
"name": "@sap/bas-sdk", | ||
"version": "3.4.2", | ||
"version": "3.4.3", | ||
"description": "SDK for SAP Business Application Studio", | ||
@@ -31,3 +31,3 @@ "license": "SAP", | ||
"devDependencies": { | ||
"@sap/bas-sdk-sinon-helper": "^3.4.2", | ||
"@sap/bas-sdk-sinon-helper": "^3.4.3", | ||
"@types/cross-spawn": "^6.0.2", | ||
@@ -34,0 +34,0 @@ "@types/fs-extra": "^11.0.1", |
@@ -8,3 +8,3 @@ import { join, split, tail } from "lodash"; | ||
const envLandscapeLabel = process.env.TENANT_LANDSCAPE_LABEL; | ||
if (!envLandscapeLabel) { | ||
if (!envLandscapeLabel || !envLandscapeLabel.startsWith("cf")) { | ||
return process.env.CF_API_ENDPOINT || ""; | ||
@@ -11,0 +11,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
465876
5443