From 1a9d3677f7f77597bc8208232ee0bb4f7ef7322c Mon Sep 17 00:00:00 2001 From: gal salomon Date: Sat, 23 May 2020 15:10:14 +0300 Subject: [PATCH] using config parameters --- s3tests_boto3/functional/test_s3select.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/s3tests_boto3/functional/test_s3select.py b/s3tests_boto3/functional/test_s3select.py index b8367ad..3aae5be 100644 --- a/s3tests_boto3/functional/test_s3select.py +++ b/s3tests_boto3/functional/test_s3select.py @@ -76,16 +76,14 @@ import sys import random from botocore.client import Config -endpoint = 'http://localhost:8000' -access_key = 'b2345678901234567890' -secret_key = 'b234567890123456789012345678901234567890' region_name = '' def get_connection(): conn = boto.connect_s3( - aws_access_key_id = access_key, - aws_secret_access_key = secret_key, - host = 'localhost', port = 8000 , + aws_access_key_id = get_main_aws_access_key(), + aws_secret_access_key = get_main_aws_secret_key(), + host = get_config_host(), + port = get_config_port(), is_secure=False, # uncomment if you are not using ssl calling_format = boto.s3.connection.OrdinaryCallingFormat(), ) @@ -126,11 +124,12 @@ def upload_csv_object(bucket_name,new_key,obj): def run_s3select(bucket,key,query,column_delim=",",row_delim="\n",quot_char='"',esc_char='\\',csv_header_info="NONE"): + s3 = boto3.client('s3',#'sns', - endpoint_url=endpoint, - aws_access_key_id=access_key, + endpoint_url=get_config_endpoint(), + aws_access_key_id=get_main_aws_access_key(), region_name=region_name, - aws_secret_access_key=secret_key) + aws_secret_access_key=get_main_aws_secret_key()) #config=Config(signature_version='v2'))