Skip to content

Commit 5c0a0ce

Browse files
committed
fix: ossConfig auto
1 parent 0e1f2fc commit 5c0a0ce

2 files changed

Lines changed: 41 additions & 0 deletions

File tree

__tests__/e2e/ci-mac-linux.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,14 @@ cd ..
7979

8080
echo "test nodejs runtime with auto ..."
8181
cd nodejs
82+
83+
echo "test nodejs runtime with oss config auto ..."
84+
export fc_component_function_name=nodejs18-$(uname)-$(uname -m)-$RANDSTR
85+
s deploy -y -t ./s_ossConfig_auto.yaml
86+
s invoke -e '{"hello":"fc nodejs with oss config auto"}' -t ./s_ossConfig_auto.yaml
87+
s info -y -t ./s_ossConfig_auto.yaml
88+
s remove -y -t ./s_ossConfig_auto.yaml
89+
8290
export fc_component_function_name=nodejs18-$(uname)-$(uname -m)-$RANDSTR
8391
s deploy -y -t s_auto.yaml
8492
s invoke -e '{"hello":"fc nodejs with auto"}' -t s_auto.yaml
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
edition: 3.0.0
2+
name: test-node-app
3+
access: quanxi
4+
5+
vars:
6+
region: ${env('REGION', 'cn-hongkong')}
7+
8+
resources:
9+
fcDemo:
10+
component: ${env('fc_component_version', path('../../../'))}
11+
props:
12+
region: ${vars.region}
13+
functionName: fc3-event-${env('fc_component_function_name', 'nodejs18')}
14+
role: acs:ram::${config('AccountID')}:role/aliyunaliyunfcdefaultrole
15+
runtime: ${env('fc_component_runtime', 'nodejs18')}
16+
code: './test-auto-code'
17+
handler: index.handler
18+
memorySize: 512
19+
timeout: 60
20+
ossMountConfig: auto
21+
22+
fcDemo2: # 业务名称/模块名称
23+
component: ${env('fc_component_version', path('../../../'))}
24+
props: # 组件的属性值
25+
region: ${vars.region}
26+
functionName: fc3-event-${env('fc_component_function_name', 'nodejs18')}-f2
27+
role: acs:ram::${config('AccountID')}:role/aliyunaliyunfcdefaultrole
28+
runtime: ${env('fc_component_runtime', 'nodejs18')}
29+
code: ./test-auto-code
30+
handler: index.handler
31+
memorySize: 512
32+
timeout: 60
33+
ossMountConfig: auto|rules=[{"allowedOrigin":"*","allowedMethod":"GET","allowedHeader":"*","exposeHeader":"Content-Length","maxAgeSeconds":30}]

0 commit comments

Comments
 (0)