Skip to content

Commit 31ea84e

Browse files
authored
feat(triggers): add manager (#226)
* feat(triggers): add manager * fix: ts type * test: fix test error about apigw url * test: fix cls test
1 parent 2485f39 commit 31ea84e

File tree

26 files changed

+819
-105
lines changed

26 files changed

+819
-105
lines changed

__tests__/apigw.test.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ describe('apigw', () => {
156156
},
157157
usagePlanId: expect.stringContaining('usagePlan-'),
158158
},
159+
url: expect.stringContaining('http'),
159160
apiList: [
160161
{
161162
path: '/',
@@ -167,6 +168,7 @@ describe('apigw', () => {
167168
authType: 'NONE',
168169
businessType: 'NORMAL',
169170
isBase64Encoded: true,
171+
url: expect.stringContaining('http'),
170172
},
171173
{
172174
path: '/mo',
@@ -178,6 +180,7 @@ describe('apigw', () => {
178180
authType: 'NONE',
179181
businessType: 'NORMAL',
180182
isBase64Encoded: false,
183+
url: expect.stringContaining('http'),
181184
},
182185
{
183186
path: '/auto',
@@ -189,6 +192,7 @@ describe('apigw', () => {
189192
authType: 'NONE',
190193
businessType: 'NORMAL',
191194
isBase64Encoded: false,
195+
url: expect.stringContaining('http'),
192196
},
193197
{
194198
path: '/ws',
@@ -200,6 +204,7 @@ describe('apigw', () => {
200204
authType: 'NONE',
201205
businessType: 'NORMAL',
202206
isBase64Encoded: false,
207+
url: expect.stringContaining('http'),
203208
},
204209
{
205210
path: '/wsf',
@@ -213,6 +218,7 @@ describe('apigw', () => {
213218
authType: 'NONE',
214219
businessType: 'NORMAL',
215220
isBase64Encoded: false,
221+
url: expect.stringContaining('http'),
216222
},
217223
{
218224
path: '/oauth',
@@ -224,6 +230,7 @@ describe('apigw', () => {
224230
businessType: 'OAUTH',
225231
internalDomain: expect.any(String),
226232
isBase64Encoded: false,
233+
url: expect.stringContaining('http'),
227234
},
228235
{
229236
path: '/oauthwork',
@@ -236,6 +243,7 @@ describe('apigw', () => {
236243
authRelationApiId: expect.stringContaining('api-'),
237244
internalDomain: expect.any(String),
238245
isBase64Encoded: false,
246+
url: expect.stringContaining('http'),
239247
},
240248
],
241249
tags,
@@ -267,6 +275,7 @@ describe('apigw', () => {
267275
subDomain: expect.stringContaining('.apigw.tencentcs.com'),
268276
protocols: 'http&https',
269277
environment: 'release',
278+
url: expect.stringContaining('http'),
270279
apiList: [
271280
{
272281
path: '/',
@@ -286,6 +295,7 @@ describe('apigw', () => {
286295
usagePlanId: expect.stringContaining('usagePlan-'),
287296
},
288297
isBase64Encoded: true,
298+
url: expect.stringContaining('http'),
289299
},
290300
{
291301
path: '/mo',
@@ -297,6 +307,7 @@ describe('apigw', () => {
297307
authType: 'NONE',
298308
businessType: 'NORMAL',
299309
isBase64Encoded: false,
310+
url: expect.stringContaining('http'),
300311
},
301312
{
302313
path: '/auto',
@@ -308,6 +319,7 @@ describe('apigw', () => {
308319
authType: 'NONE',
309320
businessType: 'NORMAL',
310321
isBase64Encoded: false,
322+
url: expect.stringContaining('http'),
311323
},
312324
{
313325
path: '/ws',
@@ -319,6 +331,7 @@ describe('apigw', () => {
319331
businessType: 'NORMAL',
320332
created: true,
321333
isBase64Encoded: false,
334+
url: expect.stringContaining('http'),
322335
},
323336
{
324337
path: '/wsf',
@@ -332,6 +345,7 @@ describe('apigw', () => {
332345
businessType: 'NORMAL',
333346
created: true,
334347
isBase64Encoded: false,
348+
url: expect.stringContaining('http'),
335349
},
336350
{
337351
path: '/oauth',
@@ -343,6 +357,7 @@ describe('apigw', () => {
343357
businessType: 'OAUTH',
344358
internalDomain: expect.any(String),
345359
isBase64Encoded: false,
360+
url: expect.stringContaining('http'),
346361
},
347362
{
348363
path: '/oauthwork',
@@ -355,6 +370,7 @@ describe('apigw', () => {
355370
authRelationApiId: expect.stringContaining('api-'),
356371
internalDomain: expect.any(String),
357372
isBase64Encoded: false,
373+
url: expect.stringContaining('http'),
358374
},
359375
],
360376
tags,
@@ -385,6 +401,7 @@ describe('apigw', () => {
385401
subDomain: expect.stringContaining('.apigw.tencentcs.com'),
386402
protocols: 'http&https',
387403
environment: 'release',
404+
url: expect.stringContaining('http'),
388405
apiList: [
389406
{
390407
path: '/',
@@ -396,6 +413,7 @@ describe('apigw', () => {
396413
authType: 'NONE',
397414
businessType: 'NORMAL',
398415
isBase64Encoded: true,
416+
url: expect.stringContaining('http'),
399417
},
400418
{
401419
path: '/mo',
@@ -407,6 +425,7 @@ describe('apigw', () => {
407425
authType: 'NONE',
408426
businessType: 'NORMAL',
409427
isBase64Encoded: false,
428+
url: expect.stringContaining('http'),
410429
},
411430
{
412431
path: '/auto',
@@ -418,6 +437,7 @@ describe('apigw', () => {
418437
authType: 'NONE',
419438
businessType: 'NORMAL',
420439
isBase64Encoded: false,
440+
url: expect.stringContaining('http'),
421441
},
422442
{
423443
path: '/ws',
@@ -429,6 +449,7 @@ describe('apigw', () => {
429449
businessType: 'NORMAL',
430450
created: true,
431451
isBase64Encoded: false,
452+
url: expect.stringContaining('http'),
432453
},
433454
{
434455
path: '/wsf',
@@ -442,6 +463,7 @@ describe('apigw', () => {
442463
businessType: 'NORMAL',
443464
created: true,
444465
isBase64Encoded: false,
466+
url: expect.stringContaining('http'),
445467
},
446468
{
447469
path: '/oauth',
@@ -453,6 +475,7 @@ describe('apigw', () => {
453475
businessType: 'OAUTH',
454476
internalDomain: expect.any(String),
455477
isBase64Encoded: false,
478+
url: expect.stringContaining('http'),
456479
},
457480
{
458481
path: '/oauthwork',
@@ -465,6 +488,7 @@ describe('apigw', () => {
465488
authRelationApiId: expect.stringContaining('api-'),
466489
internalDomain: expect.any(String),
467490
isBase64Encoded: false,
491+
url: expect.stringContaining('http'),
468492
},
469493
],
470494
tags,

__tests__/scf.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,10 @@ describe('Scf', () => {
248248
authType: 'NONE',
249249
businessType: 'NORMAL',
250250
isBase64Encoded: false,
251+
url: expect.stringContaining('http'),
251252
},
252253
],
254+
url: expect.stringContaining('http'),
253255
},
254256
{
255257
NeedCreate: expect.any(Boolean),
@@ -290,7 +292,6 @@ describe('Scf', () => {
290292
maxWait: triggers.cls.cls.parameters.maxWait,
291293
qualifier: triggers.cls.cls.parameters.qualifier,
292294
topicId: triggers.cls.cls.parameters.topicId,
293-
Qualifier: expect.any(String),
294295
},
295296
// {
296297
// enable: triggers.mps.mps.parameters.enable,
@@ -399,8 +400,10 @@ describe('Scf', () => {
399400
authType: 'NONE',
400401
businessType: 'NORMAL',
401402
isBase64Encoded: false,
403+
url: expect.stringContaining('http'),
402404
},
403405
],
406+
url: expect.stringContaining('http'),
404407
},
405408
{
406409
NeedCreate: expect.any(Boolean),
@@ -441,7 +444,6 @@ describe('Scf', () => {
441444
maxWait: triggers.cls.cls.parameters.maxWait,
442445
qualifier: triggers.cls.cls.parameters.qualifier,
443446
topicId: triggers.cls.cls.parameters.topicId,
444-
Qualifier: expect.any(String),
445447
},
446448
// {
447449
// enable: triggers.mps.mps.parameters.enable,

0 commit comments

Comments
 (0)