Skip to content

Commit

Permalink
add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
go-to-k committed Feb 5, 2024
1 parent 21513e3 commit cc5b6cd
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -736,4 +736,21 @@ describe('schedule target', () => {
target: pipelineTarget,
})).toThrow(/Number of retry attempts should be less or equal than 185/);
});

test('throws when pipelineParameterList length is greater than 200', () => {
const dummyObject = {
name: 'MyParameterName',
value: 'MyParameterValue',
};
let dummyPipelineParameterList: SageMakerPipelineParameter[] = [];
for (let i = 0; i < 201; i++) {
dummyPipelineParameterList.push(dummyObject);
}

expect(() =>
new SageMakerStartPipelineExecution(pipeline, {
pipelineParameterList: dummyPipelineParameterList,
}),
).toThrow(/pipelineParameterList length must be between 0 and 200, got 201/);
});
});

0 comments on commit cc5b6cd

Please sign in to comment.