From c035aaa9f0e413191877fe3875285af7cf53a650 Mon Sep 17 00:00:00 2001 From: Ronak Seth Date: Tue, 3 Dec 2024 09:55:26 -0500 Subject: [PATCH 1/2] Add validation for bank count --- signify-ts-test/test-load.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/signify-ts-test/test-load.sh b/signify-ts-test/test-load.sh index 1e5e7b4..8cb8712 100755 --- a/signify-ts-test/test-load.sh +++ b/signify-ts-test/test-load.sh @@ -97,6 +97,16 @@ parse_args() { fi } +check_available_banks() { + local TOTAL_AVAILABLE_BANKS=10 + + if [[ "$BANK_COUNT" -gt "$TOTAL_AVAILABLE_BANKS" ]]; then + echo "WARNING: You have selected more banks ($BANK_COUNT) than available ($TOTAL_AVAILABLE_BANKS)." + echo "Please reduce the --bank-count value to $TOTAL_AVAILABLE_BANKS or fewer for performing load test." + exit 1 + fi +} + # Start services start_services_local() { echo "Starting local services..." @@ -184,6 +194,7 @@ load_test_banks() { main() { parse_args "$@" + check_available_banks if [[ "$MODE" == "local" ]]; then start_services_local From 0d3d4d700e7f5b50ee935906dd5834d8d72129cd Mon Sep 17 00:00:00 2001 From: Ronak Seth Date: Tue, 3 Dec 2024 10:11:32 -0500 Subject: [PATCH 2/2] Added info about pre-configured API URL for local mode --- signify-ts-test/test-load.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/signify-ts-test/test-load.sh b/signify-ts-test/test-load.sh index 8cb8712..df89942 100755 --- a/signify-ts-test/test-load.sh +++ b/signify-ts-test/test-load.sh @@ -80,6 +80,11 @@ parse_args() { usage fi + # REG_PILOT_API for local mode + if [[ "$MODE" == "local" ]]; then + echo "INFO: The default API URL for local mode is already set. No need to specify it." + fi + # Check for REG_PILOT_API is required in remote mode if [[ "$MODE" == "remote" && -z "$REG_PILOT_API" ]]; then echo "********************************************"