From 6dafd8215a8940e5f7e76b801e50636dff662e3f Mon Sep 17 00:00:00 2001 From: "shimoda.m@nds-tyo.co.jp" Date: Tue, 12 Mar 2024 10:15:58 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=B8=80=E6=B0=97=E9=80=9A=E8=B2=AB?= =?UTF-8?q?=E3=83=86=E3=82=B9=E3=83=88=E3=81=A7=E5=87=A6=E7=90=86=E3=81=AE?= =?UTF-8?q?=E3=83=AD=E3=82=B0=E3=82=92=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB?= =?UTF-8?q?=E3=81=AB=E6=9B=B8=E3=81=8D=E5=87=BA=E3=81=99=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ecs/crm-datafetch/.gitignore | 20 ++++++++++++++++++++ ecs/crm-datafetch/tests/test_walk_through.py | 9 +++++++++ 2 files changed, 29 insertions(+) create mode 100644 ecs/crm-datafetch/.gitignore diff --git a/ecs/crm-datafetch/.gitignore b/ecs/crm-datafetch/.gitignore new file mode 100644 index 00000000..bbfbbcbe --- /dev/null +++ b/ecs/crm-datafetch/.gitignore @@ -0,0 +1,20 @@ +# Node.jsで実装されたLambdaの管理対象外ファイル群 +package-lock.json +node_modules/ +# ローカル確認用環境変数ファイル +.env +# Pythonの仮想環境ファイル +.venv +# pythonのキャッシュファイル +__pycache__/ + +# StepFunctionsステートメント定義変換後のフォルダ +stepfunctions/*/build +**/.vscode/settings.json + +# python test +.coverage +.report/ + +# log +.log \ No newline at end of file diff --git a/ecs/crm-datafetch/tests/test_walk_through.py b/ecs/crm-datafetch/tests/test_walk_through.py index e2be6670..75bf894d 100644 --- a/ecs/crm-datafetch/tests/test_walk_through.py +++ b/ecs/crm-datafetch/tests/test_walk_through.py @@ -6,6 +6,7 @@ from datetime import datetime, timezone import boto3 import pytest + from src.controller import controller from src.parser.json_parser import JsonParser from src.system_var.constants import YYYYMMDDTHHMMSSTZ @@ -114,6 +115,10 @@ def test_walk_through(s3_test, s3_client, monkeypatch, caplog): logger.info(f'##########################') # Assertion log_messages = caplog.messages + # ログの目視確認を容易にするため、ローカルファイルに書き出す。 + with open('crm_datafetch_test_walk_through_diff.log', 'w', encoding='utf8') as f: + f.write('\n'.join(log_messages)) + # ループ前のログ確認 assert 'I-CTRL-01 CRMデータ取得処理を開始します' in log_messages assert 'I-CTRL-02 データ取得準備処理呼び出し' in log_messages @@ -170,6 +175,10 @@ def test_walk_through(s3_test, s3_client, monkeypatch, caplog): logger.info(f'##########################') # ログ再取得 log_messages_all = caplog.messages + # ログの目視確認を容易にするため、ローカルファイルに書き出す。 + with open('crm_datafetch_test_walk_through_all.log', 'w', encoding='utf8') as f: + f.write('\n'.join(log_messages_all)) + object_info_list_all = object_info_files[1] # 開始ログなどはテスト済みなのでチェックを省く for object_info in object_info_list_all['objects']: