From 0f62d5270c9e2f4fd94d256e5491d1e3cbd584d4 Mon Sep 17 00:00:00 2001 From: Jonathan Bernard Date: Tue, 13 Aug 2024 08:38:34 -0500 Subject: [PATCH] operations: Update root Makefile to correctly deploy the API. --- Makefile | 3 +-- api/test/tmodels.nim | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 6eb150f..0290760 100755 --- a/Makefile +++ b/Makefile @@ -23,8 +23,7 @@ dist/hff-entry-forms-web-${VERSION}.${TARGET_ENV}.tar.gz: tar czf dist/hff-entry-forms-web-${VERSION}.${TARGET_ENV}.tar.gz -C web/dist . deploy-api: - make -C api build-image push-image - cd operations/terraform && terraform apply -target module.${TARGET_ENV}_env.aws_ecs_task_definition.hff_entry_forms_api -target module.${TARGET_ENV}_env.aws_ecs_service.hff_entry_forms_api + TARGET_ENV=${TARGET_ENV} make -C api build-image push-image publish deploy-web: dist/hff-entry-forms-web-${VERSION}.${TARGET_ENV}.tar.gz mkdir -p temp-deploy/hff-entry-forms-web-${VERSION} diff --git a/api/test/tmodels.nim b/api/test/tmodels.nim index bf7bda9..00a30cd 100644 --- a/api/test/tmodels.nim +++ b/api/test/tmodels.nim @@ -4,7 +4,7 @@ import hff_entry_forms_apipkg/models suite "models": - test "asNotionPage(EventProposal)": + test "toPage(EventProposal)": let ep = EventProposal( name: "Test Event", description: "A test event.", @@ -15,6 +15,6 @@ suite "models": date: parse("2021-10-30", "YYYY-MM-dd"), budgetInDollars: 56) - let expectedJson = """{"properties":{"Event":{"title":[{"type":"text","text":{"content":"Test Event"}}]},"Date":{"date":{"start":"2021-10-30T00:00:00.000-05:00"}},"Department":{"multi_select":[{"name":"Testing"}]},"Location":{"rich_text":[{"type":"text","text":{"content":"Hope Family Fellowship"}}]},"Owner":{"rich_text":[{"type":"text","text":{"content":"Jonathan Bernard"}}]},"State":{"select":{"name":"Proposed"}},"Visibility":{"select":{"name":"Public"}}},"children":[{"object":"block","type":"heading_2","heading_2":{"text":[{"type":"text","text":{"content":"Purpose"}}]}},{"object":"block","type":"paragraph","paragraph":{"text":[{"type":"text","text":{"content":"Event example for unit testing."}}]}},{"object":"block","type":"heading_2","heading_2":{"text":[{"type":"text","text":{"content":"Description"}}]}},{"object":"block","type":"paragraph","paragraph":{"text":[{"type":"text","text":{"content":"A test event."}}]}}]}""" + let expectedJson = """{"properties":{"Event":{"title":[{"type":"text","text":{"content":"Test Event"}}]},"Date":{"date":{"start":"2021-10-30T00:00:00-05:00"}},"Department":{"multi_select":[{"name":"Testing"}]},"Location":{"rich_text":[{"type":"text","text":{"content":"Hope Family Fellowship"}}]},"Owner":{"rich_text":[{"type":"text","text":{"content":"Jonathan Bernard"}}]},"State":{"select":{"name":"Proposed"}},"Visibility":{"select":{"name":"Public"}}},"children":[{"object":"block","type":"heading_2","heading_2":{"text":[{"type":"text","text":{"content":"Purpose"}}]}},{"object":"block","type":"paragraph","paragraph":{"text":[{"type":"text","text":{"content":"Event example for unit testing."}}]}},{"object":"block","type":"heading_2","heading_2":{"text":[{"type":"text","text":{"content":"Description"}}]}},{"object":"block","type":"paragraph","paragraph":{"text":[{"type":"text","text":{"content":"A test event."}}]}}]}""" - check $(ep.asNotionPage) == expectedJson + check $(ep.toPage) == expectedJson