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']: