Skip to content

Commit

Permalink
Fix bash test
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
  • Loading branch information
alexellis committed Jan 23, 2025
1 parent 452db1e commit 8fc6ee0
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions build_integration_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,14 @@ build_faas_function() {
eval $cli new $function_name --lang $TEMPLATE_NAME

cat << EOF > $function_name/handler.py
def handle(req):
return "Function output from integration testing: Hello World!"
def handle(event, context):
return {
"statusCode": 200,
"body": {"message": "Hello from OpenFaaS!"},
"headers": {
"Content-Type": "application/json"
}
}
EOF

eval $cli build -f $function_name.yml
Expand Down Expand Up @@ -126,7 +131,7 @@ EOF

get_templates() {
echo "Getting templates..."
eval $cli template pull $TEMPLATE_NAME
eval $cli template store pull $TEMPLATE_NAME
}

get_templates
Expand Down

0 comments on commit 8fc6ee0

Please sign in to comment.