Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions __tests__/e2e/ci-mac-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ s deploy -y -t ./s_tags2.yaml
s deploy -y -t ./s_tags3.yaml
s remove -y -t ./s_tags3.yaml

echo "test nodejs runtime with custom endpoint ..."
s deploy -y -t ./s_custom_endpoint.yaml
s remove -y -t ./s_custom_endpoint.yaml

echo "test deploy with alias"
export fc_component_function_name=nodejs18-$(uname)-$(uname -m)-$RANDSTR
s deploy --function -t s2.yaml
Expand Down
5 changes: 5 additions & 0 deletions __tests__/e2e/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ s deploy -y -t ./s_tags3.yaml
s remove -y -t ./s_tags3.yaml
cd ..

echo "test nodejs runtime with custom endpoint ..."
s deploy -y -t ./s_custom_endpoint.yaml
s remove -y -t ./s_custom_endpoint.yaml
cd ..

echo "test deploy with alias"
cd nodejs
export fc_component_function_name=nodejs18-$(uname)-$(uname -m)-$RANDSTR
Expand Down
19 changes: 19 additions & 0 deletions __tests__/e2e/nodejs/s_custom_endpoint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
edition: 3.0.0
name: test-node-app
access: quanxi

vars:
region: ${env('REGION', 'ap-southeast-1')}

resources:
fcDemo1: # 业务名称/模块名称
component: ${env('fc_component_version', path('../../../'))}
props: # 组件的属性值
region: ${vars.region}
functionName: fc3-event-${env('fc_component_function_name', 'nodejs18')}-endpoint
runtime: ${env('fc_component_runtime', 'nodejs18')}
code: ./test-auto-code
handler: index.handler
memorySize: 128
endpoint: http://${config('AccountID')}.${vars.region}.fc.aliyuncs.com
timeout: 30
8 changes: 4 additions & 4 deletions example/test_models_pipeline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ for MODEL_INFO in "${MODEL_LIST[@]}"; do
if [ -z $SYSTEM_URL ]; then
log "Failed to extract system_url for model: $MODEL_ID"
# 清理资源
REMOVE_OUTPUT=$(s model remove -y 2>&1)
REMOVE_OUTPUT=$(s model remove -t s-pipeline.yaml -y 2>&1)
echo "$REMOVE_OUTPUT" >> "$LOG_FILE"
echo "$REMOVE_OUTPUT"
REMOVE_OUTPUT=$(s remove -y 2>&1)
REMOVE_OUTPUT=$(s remove -t s-pipeline.yaml -y 2>&1)
echo "$REMOVE_OUTPUT" >> "$LOG_FILE"
echo "$REMOVE_OUTPUT"
continue
Expand All @@ -105,10 +105,10 @@ for MODEL_INFO in "${MODEL_LIST[@]}"; do

# 清理资源
log "Removing resources..."
REMOVE_OUTPUT=$(s model remove -y 2>&1)
REMOVE_OUTPUT=$(s model remove -t s-pipeline.yaml -y 2>&1)
echo "$REMOVE_OUTPUT" >> "$LOG_FILE"
echo "$REMOVE_OUTPUT"
REMOVE_OUTPUT=$(s remove -y 2>&1)
REMOVE_OUTPUT=$(s remove -t s-pipeline.yaml -y 2>&1)
echo "$REMOVE_OUTPUT" >> "$LOG_FILE"
echo "$REMOVE_OUTPUT"

Expand Down
2 changes: 1 addition & 1 deletion src/resources/fc/impl/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export default class FC_Client {
const { timeout, userAgent } = options || {};
const hostAddrInfo = getCustomEndpoint(options.endpoint);
const { protocol } = hostAddrInfo;
let { endpoint } = hostAddrInfo;
let { host: endpoint } = hostAddrInfo;
let invokeEndpoint = endpoint;

if (_.isEmpty(endpoint)) {
Expand Down
Loading