@@ -282,44 +282,7 @@ func (s *S) TestGetStatusMultiple(c *check.C) {
282282
283283// Some data are only available when extended=no
284284func (s * S ) TestGetStatusNotExtended (c * check.C ) {
285- server , requests := s .startServer (`
286- {
287- "response": {
288- "job": {
289- "id": "abc123",
290- "userid": "myuser",
291- "sourcefile": "http://some.video/file.mp4",
292- "status": "Finished",
293- "notifyurl": "http://ping.me/please",
294- "created": "2015-12-31 20:45:30",
295- "started": "2015-12-31 20:45:34",
296- "finished": "2015-12-31 21:00:03",
297- "prevstatus": "Saving",
298- "downloaded": "2015-12-31 20:45:32",
299- "uploaded": "2015-12-31 20:59:54",
300- "time_left": "0",
301- "progress": "100",
302- "time_left_current": "0",
303- "progress_current": "100.0",
304- "format": {
305- "id": "f123",
306- "status": "Finished",
307- "created": "2015-12-31 20:45:30",
308- "started": "2015-12-31 20:45:34",
309- "finished": "2015-12-31 21:00:03",
310- "s3_destination": "https://s3.amazonaws.com/not-really/valid.mp4",
311- "cf_destination": "https://blablabla.cloudfront.net/not-valid.mp4",
312- "destination": "s3://mynicebucket",
313- "destination_status": "Saved",
314- "size": "0x1080",
315- "bitrate": "3500k",
316- "video_codec": "libx264",
317- "audio_codec": "dolby_aac",
318- "output": "mp4"
319- }
320- }
321- }
322- }` )
285+ server , requests := s .startServer (nonExtendedStatus )
323286 defer server .Close ()
324287
325288 client := Client {Endpoint : server .URL , UserID : "myuser" , UserKey : "123" }
@@ -330,39 +293,31 @@ func (s *S) TestGetStatusNotExtended(c *check.C) {
330293 expectedStartDate , _ := time .Parse (dateTimeLayout , "2015-12-31 20:45:34" )
331294 expectedFinishDate , _ := time .Parse (dateTimeLayout , "2015-12-31 21:00:03" )
332295 expectedDownloadDate , _ := time .Parse (dateTimeLayout , "2015-12-31 20:45:32" )
333- expectedUploadDate , _ := time .Parse (dateTimeLayout , "2015-12-31 20:59:54" )
334296 expected := []StatusResponse {
335297 {
336- MediaID : "abc123" ,
337- UserID : "myuser" ,
338- SourceFile : "http://some.video/file.mp4" ,
339- MediaStatus : "Finished" ,
340- PreviousMediaStatus : "Saving" ,
341- NotifyURL : "http://ping.me/please" ,
342- CreateDate : expectedCreateDate ,
343- StartDate : expectedStartDate ,
344- FinishDate : expectedFinishDate ,
345- DownloadDate : expectedDownloadDate ,
346- UploadDate : expectedUploadDate ,
347- TimeLeft : "0" ,
348- Progress : 100.0 ,
349- TimeLeftCurrentJob : "0" ,
350- ProgressCurrentJob : 100.0 ,
298+ MediaID : "abc123" ,
299+ UserID : "myuser" ,
300+ SourceFile : "http://some.video/file.mp4" ,
301+ MediaStatus : "Finished" ,
302+ CreateDate : expectedCreateDate ,
303+ StartDate : expectedStartDate ,
304+ FinishDate : expectedFinishDate ,
305+ DownloadDate : expectedDownloadDate ,
306+ TimeLeft : "21" ,
307+ Progress : 100.0 ,
351308 Formats : []FormatStatus {
352309 {
353- ID : "f123" ,
354- Status : "Finished" ,
355- CreateDate : expectedCreateDate ,
356- StartDate : expectedStartDate ,
357- FinishDate : expectedFinishDate ,
358- S3Destination : "https://s3.amazonaws.com/not-really/valid.mp4" ,
359- CFDestination : "https://blablabla.cloudfront.net/not-valid.mp4" ,
360- Destinations : []DestinationStatus {{Name : "s3://mynicebucket" , Status : "Saved" }},
361- Size : "0x1080" ,
362- Bitrate : "3500k" ,
363- Output : "mp4" ,
364- VideoCodec : "libx264" ,
365- AudioCodec : "dolby_aac" ,
310+ ID : "f123" ,
311+ Status : "Finished" ,
312+ CreateDate : expectedCreateDate ,
313+ StartDate : expectedStartDate ,
314+ FinishDate : expectedFinishDate ,
315+ Destinations : []DestinationStatus {{Name : "s3://mynicebucket" , Status : "Saved" }},
316+ Size : "0x1080" ,
317+ Bitrate : "3500k" ,
318+ Output : "mp4" ,
319+ VideoCodec : "libx264" ,
320+ AudioCodec : "dolby_aac" ,
366321 },
367322 },
368323 },
0 commit comments