Skip to content

Commit

Permalink
adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
Niranjan Jayakar committed Sep 13, 2021
1 parent acca89a commit d78bd67
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions packages/@aws-cdk/pipelines/test/compliance/assets.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,7 @@ describe('pipeline with single asset publisher', () => {

const actualFileName = buildSpecName.asString();

expect(actualFileName).toMatch(/^buildspec-.*\.yaml$/);
const buildSpec = JSON.parse(fs.readFileSync(path.join(assembly.directory, actualFileName), { encoding: 'utf-8' }));
expect(buildSpec.phases.build.commands).toContain(`cdk-assets --path "assembly-FileAssetApp/FileAssetAppStackEADD68C5.assets.json" --verbose publish "${FILE_ASSET_SOURCE_HASH}:current_account-current_region"`);
expect(buildSpec.phases.build.commands).toContain(`cdk-assets --path "assembly-FileAssetApp/FileAssetAppStackEADD68C5.assets.json" --verbose publish "${FILE_ASSET_SOURCE_HASH2}:current_account-current_region"`);
Expand Down
5 changes: 2 additions & 3 deletions packages/@aws-cdk/pipelines/test/testhelpers/matchers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export function stringLike(pattern: string) {
}

export function sortByRunOrder(pattern: any[]): Matcher {
return new Sorter(pattern, (a: any, b: any) => {
return new Sorter('SortByRunOrder', pattern, (a: any, b: any) => {
if (a.RunOrder !== b.RunOrder) { return a.RunOrder - b.RunOrder; }
return (a.Name as string).localeCompare(b.Name);
});
Expand Down Expand Up @@ -43,9 +43,8 @@ class StringLike extends Matcher {
}

class Sorter extends Matcher {
public name = 'SortByRunOrder';

constructor(
public readonly name: string,
private readonly pattern: any[],
private readonly compareFn: (a: any, b: any) => number,
) {
Expand Down

0 comments on commit d78bd67

Please sign in to comment.