@@ -15,15 +15,16 @@ def test_s3_object():
1515 # Dataplane run id
1616 os .environ ["DP_RUNID" ] = generate ('1234567890abcdef' , 10 )
1717
18- # Sharepoint connection
1918 load_dotenv ()
2019
2120 RUN_ID = os .environ ["DP_RUNID" ]
2221
22+ S3_HOST = os .environ ["S3_HOST" ]
23+
2324 # S3 connection
2425 S3Connect = boto3 .client (
2526 's3' ,
26- endpoint_url = "http://minio:9000" ,
27+ endpoint_url = S3_HOST ,
2728 aws_access_key_id = "admin" ,
2829 aws_secret_access_key = "hello123" ,
2930 config = Config (signature_version = 's3v4' ),
@@ -48,7 +49,7 @@ def test_s3_object():
4849 # Store the data with key hello - run id will be attached
4950 rs = s3_upload (Bucket = bucket ,
5051 S3Client = S3Connect ,
51- TargetFilePath = f"/ s3test/object myfile { RUN_ID } .csv" ,
52+ TargetFilePath = f"s3test/object myfile { RUN_ID } .csv" ,
5253 UploadObject = UploadObject ,
5354 UploadMethod = "Object"
5455 )
@@ -59,7 +60,7 @@ def test_s3_object():
5960 # ---------- RETRIEVE FILE FROM S3 ------------
6061 rs = s3_download (Bucket = bucket ,
6162 S3Client = S3Connect ,
62- S3FilePath = f"/ s3test/object myfile { RUN_ID } .csv" ,
63+ S3FilePath = f"s3test/object myfile { RUN_ID } .csv" ,
6364 DownloadMethod = "Object"
6465 )
6566 print (rs )
0 commit comments