66 lines
2.9 KiB
Gherkin
66 lines
2.9 KiB
Gherkin
Feature: Transcoding status
|
|
A registered video starts life as "processing" and is handed to MediaConvert.
|
|
MediaConvert reports every job state change to an SNS topic, which fans the
|
|
event out to a queue cms consumes, so the catalogue record catches up with
|
|
the transcoding job on its own — nobody polls AWS and nothing is exposed for
|
|
AWS to call back into.
|
|
|
|
Background:
|
|
Given the CMS API is available
|
|
|
|
Scenario: A finished job marks the video ready
|
|
Given I have registered a video that is being transcoded
|
|
When MediaConvert reports that the job reached "COMPLETE"
|
|
Then the video eventually has status "ready"
|
|
|
|
# The COMPLETE event carries the paths MediaConvert actually wrote. The
|
|
# playlist among them is an s3:// URI into a private bucket, so what the
|
|
# catalogue stores is that path rewritten onto the public delivery host.
|
|
Scenario: A finished job gives the video an HLS playback URL
|
|
Given I have registered a video that is being transcoded
|
|
When MediaConvert reports that the job reached "COMPLETE"
|
|
Then the video eventually has status "ready"
|
|
And the video has a playback URL for its HLS playlist
|
|
|
|
Scenario: A finished job that reported no playlist still marks the video ready
|
|
Given I have registered a video that is being transcoded
|
|
When MediaConvert reports that the job reached "COMPLETE" without a playlist
|
|
Then the video eventually has status "ready"
|
|
And the video has no playback URL
|
|
|
|
Scenario: A failed job leaves the video with no playback URL
|
|
Given I have registered a video that is being transcoded
|
|
When MediaConvert reports that the job reached "ERROR"
|
|
Then the video eventually has status "failed"
|
|
And the video has no playback URL
|
|
|
|
Scenario Outline: A job that did not finish cleanly marks the video failed
|
|
Given I have registered a video that is being transcoded
|
|
When MediaConvert reports that the job reached "<state>"
|
|
Then the video eventually has status "failed"
|
|
|
|
Examples:
|
|
| state |
|
|
| ERROR |
|
|
| CANCELED |
|
|
|
|
Scenario Outline: A state that is not an outcome leaves the video processing
|
|
Given I have registered a video that is being transcoded
|
|
When MediaConvert reports that the job reached "<state>"
|
|
Then the video keeps status "processing"
|
|
|
|
Examples:
|
|
| state |
|
|
| SUBMITTED |
|
|
| PROGRESSING |
|
|
| STATUS_UPDATE |
|
|
|
|
# A message naming a job nobody has must be consumed and dropped, not left to
|
|
# redeliver forever. The second event is the assertion that it was: it can
|
|
# only be handled if the first one did not wedge the consumer.
|
|
Scenario: An event for a job no video has does not stop the consumer
|
|
Given I have registered a video that is being transcoded
|
|
When MediaConvert reports that the job "1700000000000-nosuchjob" reached "COMPLETE"
|
|
And MediaConvert reports that the job reached "COMPLETE"
|
|
Then the video eventually has status "ready"
|