41 lines
2.2 KiB
Gherkin
41 lines
2.2 KiB
Gherkin
Feature: Building the catalogue from announcements
|
|
Discovery is the read side. It owns no ingestion of its own: it learns what
|
|
exists by subscribing to the catalogue topic cms announces ready videos on,
|
|
and keeps its own copy in its own database. Nothing polls cms and neither
|
|
service reads the other's tables.
|
|
|
|
A video therefore reaches the catalogue only once its transcode has finished
|
|
— which is the point, since a catalogue entry nobody can play is no use.
|
|
|
|
Background:
|
|
Given the CMS API is available
|
|
And the Discovery API is available
|
|
|
|
Scenario: A video the CMS announces appears in the catalogue
|
|
Given I have registered a video that is being transcoded
|
|
When MediaConvert reports that the job reached "COMPLETE"
|
|
Then the catalogue eventually holds that video
|
|
And the catalogue's copy carries its title, playback URL and categories
|
|
|
|
# The catalogue is built from announcements, and cms announces only what came
|
|
# out ready. A video part-way through its transcode is therefore genuinely
|
|
# absent rather than merely late, and saying so is the honest answer.
|
|
Scenario: A video that is still being transcoded is not in the catalogue
|
|
Given I have registered a video that is being transcoded
|
|
Then the catalogue does not hold that video
|
|
And the request is rejected with status 404
|
|
And the problem title is "Video Not In The Catalogue"
|
|
|
|
# The catalogue topic delivers at-least-once, and a job's outcome can be
|
|
# reported more than once, so the same video can be announced again. The
|
|
# later announcement is the truth: it lands on top of what is already there
|
|
# rather than colliding with it. Announcing it again with no playlist is what
|
|
# makes that visible — a second announcement carrying identical content is
|
|
# indistinguishable from never having arrived.
|
|
Scenario: A video announced again is updated rather than colliding
|
|
Given I have registered a video that is being transcoded
|
|
And MediaConvert reports that the job reached "COMPLETE"
|
|
And the catalogue eventually holds that video
|
|
When MediaConvert reports that the job reached "COMPLETE" without a playlist
|
|
Then the catalogue eventually holds that video with no playback URL
|