Skip to content

Commit 28a2b9f

Browse files
committed
Good Tests
1 parent 2b4a77a commit 28a2b9f

File tree

3 files changed

+163
-187
lines changed

3 files changed

+163
-187
lines changed

delta_backend/src/delta.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,19 +145,17 @@ def handler(event, context):
145145
return {"statusCode": 500, "body": "Records not processed successfully"}
146146

147147
except Exception as e:
148-
logger.info(">>>>>> Delta EXCEPTION!!!")
149148

150149
operation_outcome["statusCode"] = "500"
151150
operation_outcome["statusDesc"] = "Exception"
152151
if intrusion_check:
153-
logger.info(f">>>>>> Delta Lambda failure: {e}")
154152
operation_outcome["diagnostics"] = "Incorrect invocation of Lambda"
155-
# logger.exception("Incorrect invocation of Lambda")
153+
logger.exception("Incorrect invocation of Lambda")
156154
else:
157155
operation_outcome["diagnostics"] = f"Delta Lambda failure: {e}"
158-
logger.info(f">>>>>> Delta Lambda failure: {e}")
156+
logger.exception(f"Delta Lambda failure: {e}")
159157
send_message(event) # Send failed records to DLQ
160158
log_data["operation_outcome"] = operation_outcome
161159
firehose_log["event"] = log_data
162160
firehose_logger.send_log(firehose_log)
163-
# raise Exception(f"Delta Lambda failure: {e}")
161+
raise Exception(f"Delta Lambda failure: {e}")

delta_backend/src/log_firehose.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ def __init__(
1919
self.delivery_stream_name = stream_name
2020

2121
def send_log(self, log_message):
22-
raise Exception(f"XXXXXXX")
2322
log_to_splunk = log_message
2423
logger.info(f"Log sent to Firehose for save: {log_to_splunk}")
2524
encoded_log_data = json.dumps(log_to_splunk).encode("utf-8")

0 commit comments

Comments
 (0)