From 5f933b5103a53a2a45a48096ccc0bb4ce44eb0d4 Mon Sep 17 00:00:00 2001 From: tirexx Date: Wed, 5 May 2021 14:15:52 +0300 Subject: [PATCH 1/2] Test patch calculation fixed; --- dist/index.js | 5 ++++- src/utils/sfdx.js | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index fd0d8ff..0b970d9 100644 --- a/dist/index.js +++ b/dist/index.js @@ -13381,7 +13381,10 @@ let deploy = function (deploy){ } if(deploy.testlevel == "RunSpecifiedTests"){ - testClassesTmp = getApexTestClass(sfdxRootFolder ? path.join(sfdxRootFolder, manifestTmp) : manifestTmp, deploy.defaultSourcePath + '/classes', deploy.defaultTestClass); + testClassesTmp = getApexTestClass( + sfdxRootFolder ? path.join(sfdxRootFolder, manifestTmp) : manifestTmp, + sfdxRootFolder ? path.join(deploy.defaultSourcePath, manifestTmp, 'classes') : deploy.defaultSourcePath, + deploy.defaultTestClass); core.info("classes are : " + testClassesTmp); diff --git a/src/utils/sfdx.js b/src/utils/sfdx.js index d92f534..b7df09b 100644 --- a/src/utils/sfdx.js +++ b/src/utils/sfdx.js @@ -72,7 +72,10 @@ let deploy = function (deploy){ } if(deploy.testlevel == "RunSpecifiedTests"){ - testClassesTmp = getApexTestClass(sfdxRootFolder ? path.join(sfdxRootFolder, manifestTmp) : manifestTmp, deploy.defaultSourcePath + '/classes', deploy.defaultTestClass); + testClassesTmp = getApexTestClass( + sfdxRootFolder ? path.join(sfdxRootFolder, manifestTmp) : manifestTmp, + sfdxRootFolder ? path.join(deploy.defaultSourcePath, manifestTmp, 'classes') : deploy.defaultSourcePath, + deploy.defaultTestClass); core.info("classes are : " + testClassesTmp); From 0c1f05e23cc9029d98d409b304ccd38d1d621348 Mon Sep 17 00:00:00 2001 From: tirexx Date: Thu, 6 May 2021 13:01:19 +0300 Subject: [PATCH 2/2] Tests patch calculation fixed for case if sfdx root folder is set; --- dist/index.js | 2 +- src/utils/sfdx.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 0b970d9..268cccc 100644 --- a/dist/index.js +++ b/dist/index.js @@ -13383,7 +13383,7 @@ let deploy = function (deploy){ if(deploy.testlevel == "RunSpecifiedTests"){ testClassesTmp = getApexTestClass( sfdxRootFolder ? path.join(sfdxRootFolder, manifestTmp) : manifestTmp, - sfdxRootFolder ? path.join(deploy.defaultSourcePath, manifestTmp, 'classes') : deploy.defaultSourcePath, + sfdxRootFolder ? path.join(sfdxRootFolder, deploy.defaultSourcePath, 'classes') : path.join(deploy.defaultSourcePath, 'classes'), deploy.defaultTestClass); core.info("classes are : " + testClassesTmp); diff --git a/src/utils/sfdx.js b/src/utils/sfdx.js index b7df09b..76f56c4 100644 --- a/src/utils/sfdx.js +++ b/src/utils/sfdx.js @@ -74,7 +74,7 @@ let deploy = function (deploy){ if(deploy.testlevel == "RunSpecifiedTests"){ testClassesTmp = getApexTestClass( sfdxRootFolder ? path.join(sfdxRootFolder, manifestTmp) : manifestTmp, - sfdxRootFolder ? path.join(deploy.defaultSourcePath, manifestTmp, 'classes') : deploy.defaultSourcePath, + sfdxRootFolder ? path.join(sfdxRootFolder, deploy.defaultSourcePath, 'classes') : path.join(deploy.defaultSourcePath, 'classes'), deploy.defaultTestClass); core.info("classes are : " + testClassesTmp);