File streaming to Google Cloud Storage
Also simplifies some code since we're only going to support GCS.
This commit is contained in:
@@ -23,7 +23,8 @@ EXAMPLE_FILE = {u'_id': ObjectId('5672e2c1c379cf0007b31995'),
|
||||
u'content_type': 'image/png', u'_etag': '044ce3aede2e123e261c0d8bd77212f264d4f7b0',
|
||||
u'_created': datetime.datetime(2015, 12, 17, 16, 28, 49, tzinfo=tz_util.utc),
|
||||
u'md5': '',
|
||||
u'file_path': 'c2a5c897769ce1ef0eb10f8fa1c472bcb8e2d5a4.png', u'backend': 'gcs',
|
||||
u'file_path': 'c2a5c897769ce1ef0eb10f8fa1c472bcb8e2d5a4.png',
|
||||
u'backend': 'pillar',
|
||||
u'link': 'http://localhost:8002/file',
|
||||
u'link_expires': datetime.datetime(2016, 3, 22, 9, 28, 22, tzinfo=tz_util.utc)}
|
||||
|
||||
|
@@ -24,7 +24,7 @@ class ZencoderNotificationTest(AbstractPillarTest):
|
||||
data=json.dumps({'job': {'id': 'koro-007'}}),
|
||||
headers={'X-Zencoder-Notification-Secret': secret,
|
||||
'Content-Type': 'application/json'})
|
||||
self.assertEqual(404, resp.status_code)
|
||||
self.assertEqual(200, resp.status_code)
|
||||
|
||||
def test_good_secret_existing_file(self):
|
||||
self.ensure_file_exists(file_overrides={
|
||||
@@ -40,11 +40,16 @@ class ZencoderNotificationTest(AbstractPillarTest):
|
||||
'state': 'done'},
|
||||
'outputs': [{
|
||||
'format': 'jpg',
|
||||
'height': 1080,
|
||||
'width': 2048,
|
||||
'file_size_in_bytes': 15,
|
||||
}]}),
|
||||
'md5_checksum': None,
|
||||
}],
|
||||
'input': {
|
||||
'duration_in_ms': 5000,
|
||||
}}),
|
||||
headers={'X-Zencoder-Notification-Secret': secret,
|
||||
'Content-Type': 'application/json'})
|
||||
|
||||
# TODO: check that the file in MongoDB is actually updated properly.
|
||||
self.assertEqual(200, resp.status_code)
|
||||
self.assertEqual(204, resp.status_code)
|
||||
|
Reference in New Issue
Block a user