From d1ec9e4bf0e15d2496be103dc8858383797ac05c Mon Sep 17 00:00:00 2001 From: Dmitrii Stepanov Date: Mon, 1 Apr 2024 16:10:04 +0300 Subject: [PATCH] [#108] preset: Allow to skip preset Signed-off-by: Dmitrii Stepanov --- scenarios/preset/preset_grpc.py | 2 +- scenarios/preset/preset_s3.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scenarios/preset/preset_grpc.py b/scenarios/preset/preset_grpc.py index 7b1daa0..0f3e8fe 100755 --- a/scenarios/preset/preset_grpc.py +++ b/scenarios/preset/preset_grpc.py @@ -75,7 +75,7 @@ def main(): print("Create containers: Completed") print(f" > Containers: {containers}") - if containers_count == 0 or len(containers) != containers_count: + if containers_count > 0 and len(containers) != containers_count: print(f"Containers mismatch in preset: expected {containers_count}, created {len(containers)}") if not ignore_errors: sys.exit(ERROR_WRONG_CONTAINERS_COUNT) diff --git a/scenarios/preset/preset_s3.py b/scenarios/preset/preset_s3.py index c76e57d..637dac6 100755 --- a/scenarios/preset/preset_s3.py +++ b/scenarios/preset/preset_s3.py @@ -71,7 +71,7 @@ def main(): print("Create buckets: Completed") print(f" > Buckets: {buckets}") - if buckets_count == 0 or len(buckets) != buckets_count: + if buckets_count > 0 and len(buckets) != buckets_count: print(f"Buckets mismatch in preset: expected {buckets_count}, created {len(buckets)}") if not ignore_errors: sys.exit(ERROR_WRONG_CONTAINERS_COUNT)