From 8fc6ee00f9571306cd4c67530e88bd532afe9e19 Mon Sep 17 00:00:00 2001 From: "Alex Ellis (OpenFaaS Ltd)" Date: Thu, 23 Jan 2025 11:40:16 +0000 Subject: [PATCH] Fix bash test Signed-off-by: Alex Ellis (OpenFaaS Ltd) --- build_integration_test.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/build_integration_test.sh b/build_integration_test.sh index 976643ce..3c90c4c6 100755 --- a/build_integration_test.sh +++ b/build_integration_test.sh @@ -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 @@ -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