  def testS3ToGCS(self, mock_gcst_api, mock_loader, mock_creds):
    """Test S3ToGCS operation."""
    api_job_create = mock_gcst_api.return_value.transferJobs.return_value.create
    api_job_create.return_value.execute.return_value = gcp_mocks.MOCK_STORAGE_TRANSFER_JOB
    api_job_get = mock_gcst_api.return_value.transferOperations.return_value.list
    api_job_get.return_value.execute.return_value = gcp_mocks.MOCK_STORAGE_TRANSFER_OPERATION
    mock_loader.return_value = None
    creds = mock.MagicMock()
    creds.access_key = 'ABC'
    creds.secret_key = 'DEF'
    mock_creds.return_value = creds

    transfer_results = gcp_mocks.FAKE_GCST.S3ToGCS(
        's3://s3_source_bucket/file.name',
        'fake-zone-2b',
        'gs://gcs_sink_bucket/test_path')
    self.assertEqual(1, len(transfer_results['operations']))
    self.assertEqual('s3_source_bucket', transfer_results['operations'][0]['metadata']['transferSpec']['awsS3DataSource']['bucketName'])
    self.assertEqual('30', transfer_results['operations'][0]['metadata']['counters']['bytesCopiedToSink'])
Test S3ToGCS operation.
tests/providers/gcp/internal/test_storagetransfer.py