From 028a179cb73aeca339694fde4cbddf03412e4903 Mon Sep 17 00:00:00 2001 From: sfopsbot Date: Wed, 20 Dec 2023 07:33:42 +1100 Subject: [PATCH] fix(envvar): revert env var to use SFPOWERSCRIPTS nomenclature for backward compatibility --- packages/sfp-cli/package.json | 2 +- packages/sfp-cli/src/SfpCommand.ts | 26 ++++++++-------- .../sfp-cli/src/commands/metrics/report.ts | 8 ++--- .../src/commands/orchestrator/publish.ts | 4 +-- .../src/commands/package/source/install.ts | 8 ++--- .../src/commands/pool/metrics/publish.ts | 8 ++--- .../src/core/artifacts/ArtifactFetcher.ts | 14 ++++----- .../artifacts/generators/ArtifactGenerator.ts | 2 +- packages/sfp-cli/src/core/git/Git.ts | 4 +-- packages/sfp-cli/src/core/git/GitIdentity.ts | 8 ++--- .../sfp-cli/src/core/stats/SFPStatsSender.ts | 12 ++++---- .../sfp-cli/src/core/utils/DefaultShell.ts | 8 ++--- .../impl/artifacts/FetchAnArtifactFromNPM.ts | 4 +-- .../sfp-cli/src/impl/prepare/PrepareOrgJob.ts | 14 ++++----- .../sfp-cli/src/impl/validate/ValidateImpl.ts | 4 +-- .../artifacts/ArtifactsFromFileSystem.test.ts | 30 +++++++++---------- 16 files changed, 78 insertions(+), 78 deletions(-) diff --git a/packages/sfp-cli/package.json b/packages/sfp-cli/package.json index 58d348d78..cd0da82bd 100644 --- a/packages/sfp-cli/package.json +++ b/packages/sfp-cli/package.json @@ -1,7 +1,7 @@ { "name": "@flxblio/sfp", "description": "Flxbl Toolkit", - "version": "30.0.3", + "version": "30.0.4", "license": "MIT", "author": "flxblio", "release": "January 24", diff --git a/packages/sfp-cli/src/SfpCommand.ts b/packages/sfp-cli/src/SfpCommand.ts index 03048231b..2d92e93ce 100644 --- a/packages/sfp-cli/src/SfpCommand.ts +++ b/packages/sfp-cli/src/SfpCommand.ts @@ -39,7 +39,7 @@ export default abstract class sfpCommand extends Command { */ async run(): Promise { //Always enable color by default - if (process.env.sfp_NOCOLOR) SFPLogger.disableColor(); + if (process.env.SFPOWERSCRIPTS_NOCOLOR) SFPLogger.disableColor(); else SFPLogger.enableColor(); @@ -121,32 +121,32 @@ export default abstract class sfpCommand extends Command { private initializeStatsD() { - if (process.env.sfp_STATSD) { + if (process.env.SFPOWERSCRIPTS_STATSD) { SFPStatsSender.initialize( - process.env.sfp_STATSD_PORT, - process.env.sfp_STATSD_HOST, - process.env.sfp_STATSD_PROTOCOL + process.env.SFPOWERSCRIPTS_STATSD_PORT, + process.env.SFPOWERSCRIPTS_STATSD_HOST, + process.env.SFPOWERSCRIPTS_STATSD_PROTOCOL ); } - if (process.env.sfp_DATADOG) { + if (process.env.SFPOWERSCRIPTS_DATADOG) { SFPStatsSender.initializeNativeMetrics( 'DataDog', - process.env.sfp_DATADOG_HOST, - process.env.sfp_DATADOG_API_KEY, + process.env.SFPOWERSCRIPTS_DATADOG_HOST, + process.env.SFPOWERSCRIPTS_DATADOG_API_KEY, new ConsoleLogger() ); - } else if (process.env.sfp_NEWRELIC) { + } else if (process.env.SFPOWERSCRIPTS_NEWRELIC) { SFPStatsSender.initializeNativeMetrics( 'NewRelic', null, - process.env.sfp_NEWRELIC_API_KEY, + process.env.SFPOWERSCRIPTS_NEWRELIC_API_KEY, new ConsoleLogger() ); - } else if (process.env.sfp_SPLUNK) { + } else if (process.env.SFPOWERSCRIPTS_SPLUNK) { SFPStatsSender.initializeNativeMetrics( 'Splunk', - process.env.sfp_SPLUNK_HOST, - process.env.sfp_SPLUNK_API_KEY, + process.env.SFPOWERSCRIPTS_SPLUNK_HOST, + process.env.SFPOWERSCRIPTS_SPLUNK_API_KEY, new ConsoleLogger() ); } diff --git a/packages/sfp-cli/src/commands/metrics/report.ts b/packages/sfp-cli/src/commands/metrics/report.ts index 6b5b0a3a7..75c8e2d28 100644 --- a/packages/sfp-cli/src/commands/metrics/report.ts +++ b/packages/sfp-cli/src/commands/metrics/report.ts @@ -75,10 +75,10 @@ export default class Report extends sfpCommand { private validateEnvVars() { if ( !( - process.env.sfp_STATSD || - process.env.sfp_DATADOG || - process.env.sfp_NEWRELIC || - process.env.sfp_SPLUNK + process.env.SFPOWERSCRIPTS_STATSD || + process.env.SFPOWERSCRIPTS_STATSD_DATADOG || + process.env.SFPOWERSCRIPTS_STATSD_NEWRELIC || + process.env.SFPOWERSCRIPTS_STATSD_SPLUNK ) ) { throw new Error('Environment variable not set for metrics. No metrics will be published.'); diff --git a/packages/sfp-cli/src/commands/orchestrator/publish.ts b/packages/sfp-cli/src/commands/orchestrator/publish.ts index 1ceb82900..4afa79d0f 100644 --- a/packages/sfp-cli/src/commands/orchestrator/publish.ts +++ b/packages/sfp-cli/src/commands/orchestrator/publish.ts @@ -140,7 +140,7 @@ export default class Promote extends sfpCommand { let artifactFilePaths = ArtifactFetcher.fetchArtifacts(this.flags.artifactdir); // Pattern captures two named groups, the "package" name and "version" number - let pattern = new RegExp('(?^.*)(?:_sfp_artifact_)(?.*)(?:\\.zip)'); + let pattern = new RegExp('(?^.*)(?:_sfpowerscripts_artifact_)(?.*)(?:\\.zip)'); for (let artifact of artifacts) { let packageName: string; let packageVersionNumber: string; @@ -261,7 +261,7 @@ export default class Promote extends sfpCommand { let artifactRootDirectory = path.dirname(sfpPackage.sourceDir); // NPM does not accept packages with uppercase characters - let name: string = sfpPackage.packageName.toLowerCase() + '_sfp_artifact'; + let name: string = sfpPackage.packageName.toLowerCase() + '_sfpowerscriptsartifact'; //Check whether the user has already passed in @ diff --git a/packages/sfp-cli/src/commands/package/source/install.ts b/packages/sfp-cli/src/commands/package/source/install.ts index 14746c316..b8f4aeaa1 100644 --- a/packages/sfp-cli/src/commands/package/source/install.ts +++ b/packages/sfp-cli/src/commands/package/source/install.ts @@ -106,19 +106,19 @@ export default class InstallSourcePackage extends InstallPackageCommand { if (this.flags.refname) { fs.writeFileSync( '.env', - `${this.flags.refname}_sfp_installsourcepackage_deployment_id=${result.deploy_id}\n`, + `${this.flags.refname}_sfpowerscripts_installsourcepackage_deployment_id=${result.deploy_id}\n`, { flag: 'a' } ); console.log( - `${this.flags.refname}_sfp_installsourcepackage_deployment_id=${result.deploy_id}` + `${this.flags.refname}_sfpowerscripts_installsourcepackage_deployment_id=${result.deploy_id}` ); } else { fs.writeFileSync( '.env', - `sfp_installsourcepackage_deployment_id=${result.deploy_id}\n`, + `sfpowerscripts_installsourcepackage_deployment_id=${result.deploy_id}\n`, { flag: 'a' } ); - console.log(`sfp_installsourcepackage_deployment_id=${result.deploy_id}`); + console.log(`sfpowerscripts_installsourcepackage_deployment_id=${result.deploy_id}`); } } } diff --git a/packages/sfp-cli/src/commands/pool/metrics/publish.ts b/packages/sfp-cli/src/commands/pool/metrics/publish.ts index 6a0251f65..6ff13e294 100644 --- a/packages/sfp-cli/src/commands/pool/metrics/publish.ts +++ b/packages/sfp-cli/src/commands/pool/metrics/publish.ts @@ -114,10 +114,10 @@ export default class Publish extends sfpCommand { private validateEnvVars() { if ( !( - process.env.sfp_STATSD || - process.env.sfp_DATADOG || - process.env.sfp_NEWRELIC || - process.env.sfp_SPLUNK + process.env.SFPOWERSCRIPTS_STATSD || + process.env.SFPOWERSCRIPTS_DATADOG || + process.env.SFPOWERSCRIPTS_NEWRELIC || + process.env.SFPOWERSCRIPTS_SPLUNK ) ) { throw new Error('Environment variable not set for metrics. No metrics will be published.'); diff --git a/packages/sfp-cli/src/core/artifacts/ArtifactFetcher.ts b/packages/sfp-cli/src/core/artifacts/ArtifactFetcher.ts index fd0c94644..18623bbd2 100644 --- a/packages/sfp-cli/src/core/artifacts/ArtifactFetcher.ts +++ b/packages/sfp-cli/src/core/artifacts/ArtifactFetcher.ts @@ -72,7 +72,7 @@ export default class ArtifactFetcher { // Overwrite existing files zip.extractAllTo(unzippedArtifactsDirectory, true); - let artifactName: string = path.basename(artifact).match(/.*sfp_artifact/)?.[0]; + let artifactName: string = path.basename(artifact).match(/.*sfpowerscripts_artifact/)?.[0]; if (artifactName == null) { throw new Error(`Failed to fetch artifact file paths for ${artifact}`); } @@ -128,16 +128,16 @@ export default class ArtifactFetcher { /** * Find zip and tarball artifacts * Artifact format/s: - * sfp_artifact_.zip, - * [sfdx_package]_sfp_artifact_[version].zip, - * [sfdx_package]_sfp_artifact_[version].tgz + * sfpowerscripts_artifact_.zip, + * [sfdx_package]_sfpowerscripts_artifact_[version].zip, + * [sfdx_package]_sfpowerscripts_artifact_[version].tgz */ public static findArtifacts(artifactDirectory: string, sfdx_package?: string): string[] { let pattern: string; if (sfdx_package) { - pattern = `**/*${sfdx_package}_sfp_artifact*.@(zip|tgz)`; + pattern = `**/*${sfdx_package}_sfpowerscripts_artifact*.@(zip|tgz)`; } else { - pattern = `**/*sfp_artifact*.@(zip|tgz)`; + pattern = `**/*sfpowerscripts_artifact*.@(zip|tgz)`; } let artifacts: string[] = globSync(pattern, { @@ -164,7 +164,7 @@ export default class ArtifactFetcher { return ext === '.zip' || ext === '.tgz'; }); - let pattern = new RegExp('(?:^.*)(?:_sfp_artifact[_-])(?.*)(?:\\.zip|\\.tgz)$'); + let pattern = new RegExp('(?:^.*)(?:_sfpowerscripts_artifact[_-])(?.*)(?:\\.zip|\\.tgz)$'); let versions: string[] = artifacts.map((artifact) => { let match: RegExpMatchArray = path.basename(artifact).match(pattern); let version = match?.groups.version; diff --git a/packages/sfp-cli/src/core/artifacts/generators/ArtifactGenerator.ts b/packages/sfp-cli/src/core/artifacts/generators/ArtifactGenerator.ts index 6ce94ec2d..a50bfcfac 100644 --- a/packages/sfp-cli/src/core/artifacts/generators/ArtifactGenerator.ts +++ b/packages/sfp-cli/src/core/artifacts/generators/ArtifactGenerator.ts @@ -16,7 +16,7 @@ export default class ArtifactGenerator { ): Promise { try { // Artifact folder consisting of artifact metadata, changelog & source - let artifactFolder: string = `${sfpPackage.packageName}_sfp_artifact`; + let artifactFolder: string = `${sfpPackage.packageName}_sfpowerscripts_artifact`; // Absolute filepath of artifact let artifactFilepath: string; diff --git a/packages/sfp-cli/src/core/git/Git.ts b/packages/sfp-cli/src/core/git/Git.ts index 97089b71f..9b7e0e42b 100644 --- a/packages/sfp-cli/src/core/git/Git.ts +++ b/packages/sfp-cli/src/core/git/Git.ts @@ -189,9 +189,9 @@ export default class Git { async pushToRemote(branch: string, isForce: boolean) { if (!branch) branch = (await this._git.branch()).current; SFPLogger.log(`Pushing ${branch}`, LoggerLevel.INFO, this.logger); - if (process.env.sfp_OVERRIDE_ORIGIN_URL) { + if (process.env.SFPOWERSCRIPTS_OVERRIDE_ORIGIN_URL) { await this._git.removeRemote('origin'); - await this._git.addRemote('origin', process.env.sfp_OVERRIDE_ORIGIN_URL); + await this._git.addRemote('origin', process.env.SFPOWERSCRIPTS_OVERRIDE_ORIGIN_URL); } if (isForce) { diff --git a/packages/sfp-cli/src/core/git/GitIdentity.ts b/packages/sfp-cli/src/core/git/GitIdentity.ts index ecc806d82..16c1a6d1c 100644 --- a/packages/sfp-cli/src/core/git/GitIdentity.ts +++ b/packages/sfp-cli/src/core/git/GitIdentity.ts @@ -11,8 +11,8 @@ export default class GitIdentity { private async setUsername(): Promise { let username: string; - if (process.env.sfp_GIT_USERNAME) { - username = process.env.sfp_GIT_USERNAME; + if (process.env.SFPOWERSCRIPTS_GIT_USERNAME) { + username = process.env.SFPOWERSCRIPTS_GIT_USERNAME; } else { username = 'sfp'; } @@ -23,8 +23,8 @@ export default class GitIdentity { private async setEmail(): Promise { let email: string; - if (process.env.sfp_GIT_EMAIL) { - email = process.env.sfp_GIT_EMAIL; + if (process.env.SFPOWERSCRIPTS_GIT_EMAIL) { + email = process.env.SFPOWERSCRIPTS_GIT_EMAIL; } else { email = 'sfp@flxblio.io'; } diff --git a/packages/sfp-cli/src/core/stats/SFPStatsSender.ts b/packages/sfp-cli/src/core/stats/SFPStatsSender.ts index 24e0bd165..62dd344b2 100644 --- a/packages/sfp-cli/src/core/stats/SFPStatsSender.ts +++ b/packages/sfp-cli/src/core/stats/SFPStatsSender.ts @@ -17,7 +17,7 @@ export default class SFPStatsSender { host: host, port: port == null ? 8125 : Number(port), protocol: protocol == 'tcp' ? 'tcp' : 'udp', - prefix: 'sfp.', + prefix: 'sfpowerscripts.', }; SFPStatsSender.client = new StatsDClient(options); } @@ -46,8 +46,8 @@ export default class SFPStatsSender { static initializeLogBasedMetrics() { try { - fs.mkdirpSync('.sfp/logs'); - SFPStatsSender.metricsLogger = `.sfp/logs/metrics.log`; + fs.mkdirpSync('.sfpowerscripts/logs'); + SFPStatsSender.metricsLogger = `.sfpowerscripts/logs/metrics.log`; } catch (error) { console.log('Unable to initiate Log based metrics', error); } @@ -62,7 +62,7 @@ export default class SFPStatsSender { } let metrics = { - metric: `sfp.${metric}`, + metric: `sfpowerscripts.${metric}`, type: `timers`, value: elapsedMilliSeconds, timestamp: Date.now(), @@ -80,7 +80,7 @@ export default class SFPStatsSender { } let metrics = { - metric: `sfp.${metric}`, + metric: `sfpowerscripts.${metric}`, type: `guage`, value: value, timestamp: Date.now(), @@ -98,7 +98,7 @@ export default class SFPStatsSender { } let metrics = { - metric: `sfp.${metric}`, + metric: `sfpowerscripts.${metric}`, type: `count`, timestamp: Date.now(), tags: tags, diff --git a/packages/sfp-cli/src/core/utils/DefaultShell.ts b/packages/sfp-cli/src/core/utils/DefaultShell.ts index d8b4ae16a..63a1ddf8f 100644 --- a/packages/sfp-cli/src/core/utils/DefaultShell.ts +++ b/packages/sfp-cli/src/core/utils/DefaultShell.ts @@ -1,7 +1,7 @@ -const sfp_DEFAULT_SHELL = `sh`; +const SFPOWERSCRIPTS_DEFAULT_SHELL = `sh`; export default function defaultShell(): string { - return process.env.sfp_DEFAULT_SHELL - ? process.env.sfp_DEFAULT_SHELL - : sfp_DEFAULT_SHELL; + return process.env.SFPOWERSCRIPTS_DEFAULT_SHELL + ? process.env.SFPOWERSCRIPTS_DEFAULT_SHELL + : SFPOWERSCRIPTS_DEFAULT_SHELL; } diff --git a/packages/sfp-cli/src/impl/artifacts/FetchAnArtifactFromNPM.ts b/packages/sfp-cli/src/impl/artifacts/FetchAnArtifactFromNPM.ts index 8e5cead2d..f22432972 100644 --- a/packages/sfp-cli/src/impl/artifacts/FetchAnArtifactFromNPM.ts +++ b/packages/sfp-cli/src/impl/artifacts/FetchAnArtifactFromNPM.ts @@ -40,8 +40,8 @@ export class FetchAnArtifactFromNPM implements FetchAnArtifact { packageName = packageName.toLowerCase(); let cmd: string; - if (this.scope) cmd = `npm pack @${this.scope.toLowerCase()}/${packageName}_sfp_artifact`; - else cmd = `npm pack ${packageName}_sfp_artifact`; + if (this.scope) cmd = `npm pack @${this.scope.toLowerCase()}/${packageName}_sfpowerscripts_artifact`; + else cmd = `npm pack ${packageName}_sfpowerscripts_artifact`; cmd += `@${version}`; diff --git a/packages/sfp-cli/src/impl/prepare/PrepareOrgJob.ts b/packages/sfp-cli/src/impl/prepare/PrepareOrgJob.ts index eae028d18..052f47308 100644 --- a/packages/sfp-cli/src/impl/prepare/PrepareOrgJob.ts +++ b/packages/sfp-cli/src/impl/prepare/PrepareOrgJob.ts @@ -25,7 +25,7 @@ import ProjectConfig from '../../core/project/ProjectConfig'; import { FileLogger } from '@flxblio/sfp-logger'; const fs = require('fs-extra'); -const sfp_ARTIFACT_PACKAGE = '04t1P000000ka9mQAA'; +const SFPOWERSCRIPTS_ARTIFACT_PACKAGE = '04t1P000000ka9mQAA'; export default class PrepareOrgJob extends PoolJobExecutor implements PreDeployHook { public constructor( protected pool: PoolConfig, @@ -145,22 +145,22 @@ export default class PrepareOrgJob extends PoolJobExecutor implements PreDeployH logger: Logger, packageCollectionInstaller: InstallUnlockedPackageCollection ) { - SFPLogger.log(`Installing sfp_artifact package to the ${scratchOrg.alias}`, null, logger); + SFPLogger.log(`Installing sfpowerscripts_artifact package to the ${scratchOrg.alias}`, null, logger); //Install sfp artifact package await packageCollectionInstaller.install( [ { - name: 'sfp_artifact2', - subscriberPackageVersionId: process.env.sfp_ARTIFACT_PACKAGE - ? process.env.sfp_ARTIFACT_PACKAGE - : sfp_ARTIFACT_PACKAGE, + name: 'SFPOWERSCRIPTS_artifact2', + subscriberPackageVersionId: process.env.SFPOWERSCRIPTS_ARTIFACT_PACKAGE + ? process.env.SFPOWERSCRIPTS_ARTIFACT_PACKAGE + : SFPOWERSCRIPTS_ARTIFACT_PACKAGE, }, ], true ); - SFPLogger.log(`Suscessfully Installed sfp_artifact package to the ${scratchOrg.alias}`, null, logger); + SFPLogger.log(`Suscessfully Installed SFPOWERSCRIPTS_artifact package to the ${scratchOrg.alias}`, null, logger); } private async invokeDeployImpl( diff --git a/packages/sfp-cli/src/impl/validate/ValidateImpl.ts b/packages/sfp-cli/src/impl/validate/ValidateImpl.ts index 39e17c6ba..7d52ed3f4 100644 --- a/packages/sfp-cli/src/impl/validate/ValidateImpl.ts +++ b/packages/sfp-cli/src/impl/validate/ValidateImpl.ts @@ -107,9 +107,9 @@ export default class ValidateImpl implements PostDeployHook, PreDeployHook { } else if ( this.props.validateAgainst === ValidateAgainst.PRECREATED_POOL ) { - if (process.env.sfp_DEBUG_PREFETCHED_SCRATCHORG) + if (process.env.SFPOWERSCRIPTS_DEBUG_PREFETCHED_SCRATCHORG) scratchOrgUsername = - process.env.sfp_DEBUG_PREFETCHED_SCRATCHORG; + process.env.SFPOWERSCRIPTS_DEBUG_PREFETCHED_SCRATCHORG; else scratchOrgUsername = await this.fetchScratchOrgFromPool( this.props.pools, diff --git a/packages/sfp-cli/tests/core/artifacts/ArtifactsFromFileSystem.test.ts b/packages/sfp-cli/tests/core/artifacts/ArtifactsFromFileSystem.test.ts index f30a3ab4f..5e201822e 100644 --- a/packages/sfp-cli/tests/core/artifacts/ArtifactsFromFileSystem.test.ts +++ b/packages/sfp-cli/tests/core/artifacts/ArtifactsFromFileSystem.test.ts @@ -7,10 +7,10 @@ describe('Provided a path to the artifacts folder containing sfp artifact', () = jest.spyOn(globSync, 'globSync').mockImplementationOnce((pattern: string | string[], options: any) => { return [ - '/path/to/core_sfp_artifact_1.0.0-2.zip', - '/path/to/core2_sfp_artifact_1.0.0-2.zip', - '/path/to/core3_sfp_artifact_1.0.0-3.zip', - '/path/to/my-package_sfp_artifact_3.30.53-NEXT.tgz' + '/path/to/core_sfpowerscripts_artifact_1.0.0-2.zip', + '/path/to/core2_sfpowerscripts_artifact_1.0.0-2.zip', + '/path/to/core3_sfpowerscripts_artifact_1.0.0-3.zip', + '/path/to/my-package_sfpowerscripts_artifact_3.30.53-NEXT.tgz' ]; }); @@ -18,10 +18,10 @@ describe('Provided a path to the artifacts folder containing sfp artifact', () = let artifacts = ArtifactFetcher.findArtifacts('artifacts'); expect(artifacts).toEqual( [ - '/path/to/core_sfp_artifact_1.0.0-2.zip', - '/path/to/core2_sfp_artifact_1.0.0-2.zip', - '/path/to/core3_sfp_artifact_1.0.0-3.zip', - '/path/to/my-package_sfp_artifact_3.30.53-NEXT.tgz' + '/path/to/core_sfpowerscripts_artifact_1.0.0-2.zip', + '/path/to/core2_sfpowerscripts_artifact_1.0.0-2.zip', + '/path/to/core3_sfpowerscripts_artifact_1.0.0-3.zip', + '/path/to/my-package_sfpowerscripts_artifact_3.30.53-NEXT.tgz' ] ); }); @@ -29,24 +29,24 @@ describe('Provided a path to the artifacts folder containing sfp artifact', () = it('provided only one artifact exists for a package and a package name is provided, it should just return the one artifact', () => { jest.spyOn(globSync, 'globSync').mockImplementationOnce((pattern: string | string[], options: any) => { - return new Array('/path/to/core_sfp_artifact_1.0.0-2.zip'); + return new Array('/path/to/core_sfpowerscripts_artifact_1.0.0-2.zip'); }); let artifacts = ArtifactFetcher.findArtifacts('artifacts', 'core'); - expect(artifacts).toEqual(new Array('/path/to/core_sfp_artifact_1.0.0-2.zip')); + expect(artifacts).toEqual(new Array('/path/to/core_sfpowerscripts_artifact_1.0.0-2.zip')); }); it('provided multiple artifacts of the same package exists and a package name is provied, it should return the latest', () => { jest.spyOn(globSync, 'globSync').mockImplementationOnce((pattern: string | string[], options: any) => { return [ - '/path/to/core_sfp_artifact_1.0.0-2.zip', - '/path/to/core_sfp_artifact_1.0.0-3.zip', - '/path/to/core_sfp_artifact_1.0.0-4.zip', - '/path/to/core_sfp_artifact_1.0.0-5.tgz' + '/path/to/core_sfpowerscripts_artifact_1.0.0-2.zip', + '/path/to/core_sfpowerscripts_artifact_1.0.0-3.zip', + '/path/to/core_sfpowerscripts_artifact_1.0.0-4.zip', + '/path/to/core_sfpowerscripts_artifact_1.0.0-5.tgz' ]; }); let artifacts = ArtifactFetcher.findArtifacts('artifacts', 'core'); - expect(artifacts).toEqual(new Array('/path/to/core_sfp_artifact_1.0.0-5.tgz')); + expect(artifacts).toEqual(new Array('/path/to/core_sfpowerscripts_artifact_1.0.0-5.tgz')); }); });