From a1307f50b294b5e9cc82a1cbba670fae49355c04 Mon Sep 17 00:00:00 2001 From: Pavel Tisnovsky Date: Wed, 1 Nov 2023 13:21:12 +0100 Subject: [PATCH] Don't fail other tests than SHA extractor ones --- features/steps/insights_sha_extractor_s3.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/features/steps/insights_sha_extractor_s3.py b/features/steps/insights_sha_extractor_s3.py index 3c5ae0dc..cc19f332 100644 --- a/features/steps/insights_sha_extractor_s3.py +++ b/features/steps/insights_sha_extractor_s3.py @@ -14,14 +14,19 @@ """Implementation of logic behind usage of S3 and Kafka in SHA extractor tests.""" -import boto3 -import json import logging import os + +import json from behave import when -from botocore.exceptions import ClientError from src import kafka_util +try: + import boto3 + from botocore.exceptions import ClientError +except ImportError as e: + print("Warning: unable to import module:", e) + def create_presigned_url(s3_client, bucket_name, object_name, expiration=3600): """Generate a presigned URL to share an S3 object."""