@@ -104,23 +104,23 @@ test('Throws when name is specified incorrectly', () => {
104
104
} ) ,
105
105
runtime : synthetics . Runtime . SYNTHETICS_NODEJS_PUPPETEER_8_0 ,
106
106
} ) )
107
- . toThrowError ( 'Canary name must be lowercase, numbers, hyphens, or underscores (got "My Canary")' ) ;
107
+ . toThrow ( 'Canary name must be lowercase, numbers, hyphens, or underscores (got "My Canary")' ) ;
108
108
} ) ;
109
109
110
- test ( 'Throws when name has more than 21 characters' , ( ) => {
110
+ test ( 'Throws when name has more than 255 characters' , ( ) => {
111
111
// GIVEN
112
112
const stack = new Stack ( ) ;
113
113
114
114
// THEN
115
115
expect ( ( ) => new synthetics . Canary ( stack , 'Canary' , {
116
- canaryName : 'a' . repeat ( 22 ) ,
116
+ canaryName : 'a' . repeat ( 256 ) ,
117
117
test : synthetics . Test . custom ( {
118
118
handler : 'index.handler' ,
119
119
code : synthetics . Code . fromInline ( '/* Synthetics handler code */' ) ,
120
120
} ) ,
121
121
runtime : synthetics . Runtime . SYNTHETICS_NODEJS_PUPPETEER_8_0 ,
122
122
} ) )
123
- . toThrowError ( `Canary name is too large, must be between 1 and 21 characters, but is 22 (got "${ 'a' . repeat ( 22 ) } ")` ) ;
123
+ . toThrow ( `Canary name is too large, must be between 1 and 255 characters, but is 256 (got "${ 'a' . repeat ( 256 ) } ")` ) ;
124
124
} ) ;
125
125
126
126
test ( 'An existing role can be specified instead of auto-created' , ( ) => {
@@ -561,7 +561,7 @@ test('Throws when rate above 60 minutes', () => {
561
561
} ) ,
562
562
runtime : synthetics . Runtime . SYNTHETICS_NODEJS_PUPPETEER_8_0 ,
563
563
} ) )
564
- . toThrowError ( 'Schedule duration must be between 1 and 60 minutes' ) ;
564
+ . toThrow ( 'Schedule duration must be between 1 and 60 minutes' ) ;
565
565
} ) ;
566
566
567
567
test ( 'Throws when rate above is not a whole number of minutes' , ( ) => {
@@ -577,7 +577,7 @@ test('Throws when rate above is not a whole number of minutes', () => {
577
577
} ) ,
578
578
runtime : synthetics . Runtime . SYNTHETICS_NODEJS_PUPPETEER_8_0 ,
579
579
} ) )
580
- . toThrowError ( '\'59 seconds\' cannot be converted into a whole number of minutes.' ) ;
580
+ . toThrow ( '\'59 seconds\' cannot be converted into a whole number of minutes.' ) ;
581
581
} ) ;
582
582
583
583
test ( 'Can share artifacts bucket between canaries' , ( ) => {
0 commit comments