Assuming all pytests pass locally, do a final "integration" test locally before pushing to the staging environment -
functions-framework --target=main --source "/Users/mkirzon/Documents/2023/230901 - Hip Log Bot/hip-log-bot-cloud-function/src/main.py" --debug
curl -X POST -H 'Content-Type: application/json' -d '{"responseId":"8223ff8d-3688-48eb-a8cd-5ccadb17f418-646be87f","queryResult":{"queryText":"I did yoga today","parameters":{"activity":"Yoga","date":"2023-09-24T12:00:00+02:00","reps":["1"],"duration":[],"weight":[]},"allRequiredParamsPresent":true,"fulfillmentMessages":[{"text":{"text":[""]}}],"outputContexts":[{"name":"projects/hip-log-bot/agent/sessions/5da5f49c-36cf-1cda-a186-ce4ec3523b66/contexts/__system_counters__","parameters":{"no-input":0,"no-match":0,"activity":"Yoga","activity.original":"yoga","date":"2023-09-24T12:00:00+02:00","date.original":"today","reps":["1"],"duration":[],"duration.original":[],"reps.original":[],"weight":[],"weight.original":[]}}],"intent":{"name":"projects/hip-log-bot/agent/intents/3f813326-a34e-4845-875d-5803cf3c3cc2","displayName":"LogActivity"},"intentDetectionConfidence":1,"languageCode":"en"},"originalDetectIntentRequest":{"source":"DIALOGFLOW_CONSOLE","payload":{}},"session":"projects/hip-log-bot/agent/sessions/5da5f49c-36cf-1cda-a186-ce4ec3523b66"}' http://192.168.128.245:8080
For testing the CF, we can inspect the test function logs