Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(amplify-category-function): add length validation for secret value (
- Loading branch information
1 parent
6383260
commit 1779fa0
Showing
2 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
...s__/provider-utils/awscloudformation/service-walkthroughs/secretValuesWalkthrough.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { secretValueValidator } from '../../../../provider-utils/awscloudformation/service-walkthroughs/secretValuesWalkthrough'; | ||
|
||
describe('Check not valid secret values', () => { | ||
it('Empty value', () => { | ||
expect(secretValueValidator('')).toEqual('Secret value must be between 1 and 2048 characters long'); | ||
}); | ||
it('Value over 2048 characters', () => { | ||
expect(secretValueValidator('a'.repeat(2049))).toEqual('Secret value must be between 1 and 2048 characters long'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters