エンドポイントテストにおいて、401および404ステータスの処理を追加し、該当するエンドポイントに対するテスト結果を記録する機能を実装。

This commit is contained in:
misyaguziya
2025-09-25 12:37:13 +09:00
parent 89a027a8e0
commit 93bdec7922

View File

@@ -359,6 +359,16 @@ class TestMainloop():
data = random.randint(1024, 65535)
case _:
data = None
expected_status = [404]
if expected_status == [401]:
print(f"-> {Color.YELLOW}[SKIP]{Color.RESET} No test available for this endpoint: {endpoint}.")
self.record_test_result(endpoint, None, None, expected_status) # テスト結果を記録
return success
elif expected_status == [404]:
print(f"-> {Color.RED}[ERROR]{Color.RESET} Unknown endpoint: {endpoint}.")
self.record_test_result(endpoint, None, None, expected_status) # テスト結果を記録
return False
if data is not None:
print(f"data: {data}", end=" ", flush=True)