RosterIn commented on a change in pull request #10338:
URL: https://github.com/apache/airflow/pull/10338#discussion_r502310879



##########
File path: airflow/providers/amazon/aws/transfers/redshift_to_s3.py
##########
@@ -112,13 +112,14 @@ def execute(self, context):
                     UNLOAD ('{select_query}')
                     TO 's3://{s3_bucket}/{s3_key}'
                     with credentials
-                    
'aws_access_key_id={access_key};aws_secret_access_key={secret_key}'
+                    
'aws_access_key_id={access_key};aws_secret_access_key={secret_key};token={token}'

Review comment:
       You need also to modify the test
   
`tests.providers.amazon.aws.transfers.test_redshift_to_s3.TestRedshiftToS3Transfer`
   because it's failing:
   ```
       def fail(self, msg=None):
           """Fail immediately, with the given message."""
   >       raise self.failureException(msg)
   E       AssertionError: "UNLO[110 
chars]ws_secret_access_key=aws_secret_access_key;token=None' HEADER;" != 
"UNLO[110 chars]ws_secret_access_key=aws_secret_access_key' HEADER;"
   E       - UNLOAD ('SELECT * FROM schema.table') TO 's3://bucket/key' with 
credentials 
'aws_access_key_id=aws_access_key_id;aws_secret_access_key=aws_secret_access_key;token=None'
 HEADER;
   E       ?                                                                    
                                                                                
         -----------
   E       + UNLOAD ('SELECT * FROM schema.table') TO 's3://bucket/key' with 
credentials 
'aws_access_key_id=aws_access_key_id;aws_secret_access_key=aws_secret_access_key'
 HEADER;
   
   /usr/local/lib/python3.6/unittest/case.py:670: AssertionError
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to