Skip to content

Commit 4160eee

Browse files
author
Taniya Mathur
committed
fix sldc smoke test as per lending sample
1 parent b3337d3 commit 4160eee

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

scripts/sdlc/idp-cli/src/idp_cli/cli/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def uninstall(
7474
def smoketest(
7575
stack_name: str = typer.Option("idp-Stack", "--stack-name", help="Name of the deployed stack to test"),
7676
file_path: str = typer.Option("../../../samples/lending_package.pdf", "--file-path", help="Path to the test file"),
77-
verify_string: str = typer.Option("BIGTOWN, MA, 02801", "--verify-string", help="String to verify in the processed output")
77+
verify_string: str = typer.Option("ANYTOWN, USA 12345", "--verify-string", help="String to verify in the processed output")
7878
):
7979
"""
8080
Run a smoke test on the deployed IDP Accelerator

scripts/sdlc/idp-cli/src/idp_cli/service/smoketest_service.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def verify_result(self, folder_key):
102102
_, output_bucket_name = self.get_bucket_names()
103103

104104
# Define the path to the expected result.json file
105-
object_path = f"{folder_key}/pages/1/result.json"
105+
object_path = f"{folder_key}/pages/0/result.json"
106106
logger.debug(f"Looking for result file at: s3://{output_bucket_name}/{object_path}")
107107

108108
try:
@@ -122,7 +122,7 @@ def verify_result(self, folder_key):
122122
# Check if the text content contains the expected verification string
123123
if self.verify_string not in result_json["pages"][0]["representation"]["markdown"]:
124124
logger.error(f"Text content does not contain expected string: '{self.verify_string}'")
125-
logger.debug(f"Actual text starts with: '{result_json['text'][:100]}...'")
125+
logger.debug(f"Actual text starts with: '{result_json['pages'][0]['representation']['markdown'][:100]}...'")
126126
raise ValueError("Text content does not contain expected verification string")
127127

128128
logger.debug("Smoke test verification passed!")

0 commit comments

Comments
 (0)