@@ -7,7 +7,7 @@ describe('Scf - special', () => {
77 SecretId : process . env . TENCENT_SECRET_ID ,
88 SecretKey : process . env . TENCENT_SECRET_KEY ,
99 } ;
10- const scf = new Scf ( credentials , 'ap-guangzhou' ) ;
10+ const client = new Scf ( credentials , 'ap-guangzhou' ) ;
1111
1212 const triggers = {
1313 apigw : {
@@ -66,9 +66,13 @@ describe('Scf - special', () => {
6666
6767 let outputs ;
6868
69+ test ( 'get demo addresss' , async ( ) => {
70+ const res = await client . scf . getDemoAddress ( 'demo-nhbwbsi4' ) ;
71+ expect ( res ) . toContain ( `https://` ) ;
72+ } ) ;
6973 test ( 'should deploy SCF success' , async ( ) => {
7074 await sleep ( 3000 ) ;
71- outputs = await scf . deploy ( inputs ) ;
75+ outputs = await client . deploy ( inputs ) ;
7276 expect ( outputs . FunctionName ) . toBe ( inputs . name ) ;
7377 expect ( outputs . Qualifier ) . toBe ( '$LATEST' ) ;
7478 expect ( outputs . Description ) . toBe ( 'Created by Serverless' ) ;
@@ -80,7 +84,7 @@ describe('Scf - special', () => {
8084 } ) ;
8185 test ( 'should update SCF success' , async ( ) => {
8286 await sleep ( 3000 ) ;
83- outputs = await scf . deploy ( inputs ) ;
87+ outputs = await client . deploy ( inputs ) ;
8488 expect ( outputs . FunctionName ) . toBe ( inputs . name ) ;
8589 expect ( outputs . Qualifier ) . toBe ( '$LATEST' ) ;
8690 expect ( outputs . Description ) . toBe ( 'Created by Serverless' ) ;
@@ -93,13 +97,13 @@ describe('Scf - special', () => {
9397 test ( '[ignoreTriggers = true] update' , async ( ) => {
9498 await sleep ( 3000 ) ;
9599 inputs . ignoreTriggers = true ;
96- outputs = await scf . deploy ( inputs ) ;
100+ outputs = await client . deploy ( inputs ) ;
97101
98102 // expect triggers result
99103 expect ( outputs . Triggers ) . toEqual ( [ ] ) ;
100104 } ) ;
101105 test ( 'should remove Scf success' , async ( ) => {
102- const res = await scf . remove ( {
106+ const res = await client . remove ( {
103107 functionName : inputs . name ,
104108 ...outputs ,
105109 } ) ;
0 commit comments