From b2f1ce71bac519fd83416297e0520b34af66e31d Mon Sep 17 00:00:00 2001 From: Nicolas Vuillamy Date: Thu, 12 Sep 2024 16:31:40 +0200 Subject: [PATCH] Fix call when specified test classes --- src/commands/hardis/project/deploy/sources/dx.ts | 2 +- src/common/utils/deployUtils.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/hardis/project/deploy/sources/dx.ts b/src/commands/hardis/project/deploy/sources/dx.ts index 3ffcd2b97..e4ecf68b0 100644 --- a/src/commands/hardis/project/deploy/sources/dx.ts +++ b/src/commands/hardis/project/deploy/sources/dx.ts @@ -267,7 +267,7 @@ If testlevel=RunRepositoryTests, can contain a regular expression to keep only c ); if (Array.isArray(testClassList) && testClassList.length) { flags.testlevel = 'RunSpecifiedTests'; - testClasses = testClassList.join(); + testClasses = testClassList.join(" "); } else { // Default back to RunLocalTests in case if repository has zero tests flags.testlevel = 'RunLocalTests'; diff --git a/src/common/utils/deployUtils.ts b/src/common/utils/deployUtils.ts index e37afa168..9cc1b8a53 100644 --- a/src/common/utils/deployUtils.ts +++ b/src/common/utils/deployUtils.ts @@ -263,7 +263,7 @@ export async function forceSourceDeploy( `sf project deploy ${check ? 'validate' : 'start'} --manifest "${deployment.packageXmlFile}"` + ' --ignore-warnings' + // So it does not fail in for objectTranslations stuff ` --test-level ${testlevel}` + - (options.testClasses && testlevel !== 'NoTestRun' ? ` --run-tests ${options.testClasses}` : '') + + (options.testClasses && testlevel !== 'NoTestRun' ? ` --tests ${options.testClasses}` : '') + (options.preDestructiveChanges ? ` --pre-destructive-changes ${options.preDestructiveChanges}` : '') + (options.postDestructiveChanges ? ` --post-destructive-changes ${options.postDestructiveChanges}` : '') + (options.targetUsername ? ` -o ${options.targetUsername}` : '') +