Joystream / Joystream/joystream
Giza integration tests: Joystream CLI: Channels and videos flow
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.4k
- Forks
- 116
- PR merge metrics
- No merged PRs in 30d
Description
Preconditions:
- A running Joystream node
- A running query-node
- A running storage node (which accepts channel assets and has sufficient limits set to handle the scenario)
- A running distributor node (which accepts channel assets and has sufficient limits set to handle the scenario)
- Curator lead is hired
- Storage lead is hired
- Optionally: There is a curator group with at least 1 curator (it can also be created in this flow)
- Optionally: Some video/channel categories are available (they can also be created in this flow)
Constants:
Icc- number of different input cases to test forcreateChannelIuc- number of different input cases to test forupdateChannelIcv- number of different input cases to test forcreateVideoIuv- number of different input cases to test forupdateVideo
Parameters:
Cc- number ofMember/Curator groupchannels to createDc- number ofMember/Curator groupchannels to deleteUc- numberMember/Curator groupchannels to updateUv- number ofMember/Curator groupvideos to updateCv- number of videos to create per channelHc- number ofMember/Curator groupchannels to censorSc- number ofMember/Curator groupchannels to uncensorHv- number ofMember/Curator groupvideos to censorSv- number ofMember/Curator groupvideos to uncensor
Constraints:
1 <= Icc <= CcIcv <= Cv * Cc * 2Iuc <= UcIuv <= Uv1 <= Sc <= Hc- `1 <= Sv <= Hv
Optimistic flow:
- Create and initialize members (channel owners)
- Create and initialize members (contributors)
- Create and initialize curator groups (if none available)
- Create channels
- Create
CcMemberchannels (cover allcreateChannelinput cases) - Create
CcCurator Groupchannels (cover allcreateChannelinput cases) - Verify the output of
content:channels: confirm channels created with expected owners, reward accs etc. - Verify the output of
content:channelfor each channel: confirm channel data is valid in each case - Verify channels metadata and assets data using query-node
- Verify channel assets can be retrieved from distributor node
- Create
- Update channels (owner)
- Update
UcMemberchannels (cover allupdateChannelinput cases listed below, useCollaboratorcontext for update3.) - Update
UcCuratorchannels (cover allupdateChannelinput cases listed below, useCollaboratorcontext for update3.) - Verify the output of
content:channels: confirm channels reward accs updated where expected - Verify the output of
content:channelfor each channel: confirm channel data updated as expected - Verify channels metadata and assets data using query-node: confirm updated as expected
- Verify new channel assets are accessible from distributor node
- Update
- Change channels censorship status
- Censor
HcMemberchannels (as curator) - Censor
HcCuratorchannels (as lead) - Verify the output of
content:channels: confirm channels censorship status - Verify the output of
content:channelfor each channel: confirm channel censorship status - Verify channels censorship status using query-node
- Uncensor
ScMemberchannels (as curator) - Uncensor
ScCuraotrchannels (as lead) - Verify the output of
content:channels: confirm channels censorship status - Verify the output of
content:channelfor each channel: confirm channel censorship status - Verify channels censorship status using query-node
- Censor
- Create videos
- Add
Cvvideos to each channel (cover allcreateVideoinput cases listed below) - Verify the output of
content:channels: confirm video counts match - Verify the output of
content:channelfor each channel: confirm video counts match - Verify the output of
videos- confirm all videos are listed and the data matches the expectations - Verify the output of
videos [CHANNEL_ID]for each channel - confirm only the expected videos are listed - Verify the output of
videofor each video - confirm video data matches the expectations - Verify videos metadata and assets data using query-node
- Verify video assets are accessible from distributor node
- Add
- Change videos censorship status
- Censor
HvMemberchannel videos (use curator context) - Censor
SvCurator groupvideos (use lead context) - Verify the output of
videos- confirm censorship status - Verify the output of
videofor each video - confirm censorship status - Verify videos censorship status using query-node
- Uncensor
SvMemberchannel videos (use curator context)
-UncensorSvCurator groupvideos (use lead context) - Verify the output of
videos- confirm censorship status - Verify the output of
videofor each video - confirm censorship status - Verify videos censorship status using query-node
- Censor
- Update videos
- Update
UvMemberchannel videos (cover allupdateVideometadata cases listed below) - Update
UvCurator groupchannel videos (cover allupdateVideometadata cases listed below) - Verify updated videos metadata and assets data using query-node
- Verify new video assets are accessible from distributor node
- Update
- Remove assets
- Delete assets of a video using
removeChannelAssets(test for bothMemberandCuratorchannel) - Delete assets of a channel using
removeChannelAssets(test for bothMemberandCuratorchannel) - Verify updated channel and video metadata and assets data using query-node
- Delete assets of a video using
- Deleting videos
- Delete a video with no assets using
deleteVideow/o--forceflag (test for bothMemberandCuratorchannel) - Delete all remaining videos in
DcMemberchannels w/--forceflag - Delete all remaning videos in
DcCurator groupchannels w/--forceflag - Verify the output of
videos- confirm videos are removed - Verify the output of
videofor each video - confirm400exit code - Verify videos are no longer retrieveable from query node
- Delete a video with no assets using
- Deleting channels
- Delete a channel with no assets w/o
--forceflag (test for bothMemberandCuratorchannel) - Delete remaining
Dc-1Memberchannels w/--forceflag - Delete remaining
Dc-1Curator groupchannels w/--forceflag - Verify the output of
channels- confirm channels are removed - Verify the output of
channelfor each channel - confirm400exit code - Verify channels are no longer retrieveable from query node
- Delete a channel with no assets w/o
createChannel input cases to test:
- Full valid metadata case
{
"title": "Test channel case 1",
"description": "Channel with full valid metadata set at creation",
"isPublic": true,
"language": "en",
"category": 1,
"avatarPhotoPath": "/path/to/avatar-photo.bmp",
"coverPhotoPath": "/path/to/cover-photo.bmp",
"rewardAccount": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
"collaborators": [a, b, c] // Populated with legit member/members
}
- No avatar photo, invalid category and no reward account case
{
"title": "Test channel case 2",
"description": "Channel with no avatar photo, invalid category and no reward acc set at creation",
"isPublic": true,
"language": "de",
"category": 999,
"coverPhotoPath": "/path/to/cover-photo.bmp",
"collaborators": [a, b, c] // Populated with legit member/members
}
- No cover photo, unpublic and invalid language case
{
"title": "Test channel case 3",
"description": "Channel with no cover photo, invalid language and isPublic=false set at creation",
"isPublic": false,
"language": "xx",
"category": 3,
"avatarPhotoPath": "/path/to/avatar-photo.bmp",
"rewardAccount": "5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y",
"collaborators": [a, b, c] // Populated with legit member/members
}
- Empty channel case
{ }
updateChannel input cases to test:
- Clear all (invalid category/language) + replace both assets case
{
"title": "",
"description": "",
"isPublic": false,
"language": "",
"category": 999,
"avatarPhotoPath": "/path/to/avatar-photo-2.bmp",
"coverPhotoPath": "/path/to/cover-photo-2.bmp",
"rewardAccount": null,
"collaborators": []
}
- Setting reward account, valid category and updating cover photo case
{
"rewardAccount": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty",
"category": 2,
"coverPhotoPath": "/path/to/cover-photo-2.bmp",
}
- Setting public status, valid language and updating avatar photo case
{
"isPublic": true,
"language": "sk",
"avatarPhotoPath": "/path/to/avatar-photo-2.bmp",
}
- Setting full metadata case
{
"title": "Update channel case 4",
"description": "Updating full channel metadata",
"isPublic": true,
"language": "es",
"category": 4,
"avatarPhotoPath": "/path/to/avatar-photo.bmp",
"coverPhotoPath": "/path/to/cover-photo.bmp",
"rewardAccount": "5DAAnrj7VHTznn2AWBemMuyBwZWs6FNFjdyVXUeYum3PTXFy",
"collaborators": [a, b, c] // Populated with legit member/members
}
createVideo input cases to test:
- Full valid metadata case
{
"title": "Test video case 1",
"description": "Video with full valid metadata set at creation",
"videoPath": "/path/to/video.mp4",
"thumbnailPhotoPath": "/path/to/thumbnail.png",
"language": "en",
"hasMarketing": true,
"isPublic": true,
"isExplicit": true,
"personsList": [1, 2, 3],
"category": 1,
"license": {
"code": 1003,
"attribution": "by Joystream Contributors",
"customText": "Additional custom text"-
},
"publishedBeforeJoystream": {
"isPublished": true,
"date": "2020-01-01"
},
"mediaPixelWidth": 100,
"mediaPixelHeight": 200,
"duration": 10,
"mediaType": {
"codecName": "Custom codec name",
"container": "Custom container",
"mimeMediaType": "Custom mime media type"
}
}
- No video file, invalid category, invalid license, publishedBeforeJoystream.isPublished=false,
{
"title": "Test video case 2",
"description": "Video with no video file, invalid category, invalid license, publishedBeforeJoystream.isPublished=false set at creation",
"thumbnailPhotoPath": "/path/to/thumbnail.png",
"language": "gb",
"hasMarketing": false,
"isPublic": true,
"isExplicit": false,
"personsList": [],
"category": 999,
"license": {
"code": 9999,
"attribution": "Invalid license"
},
"publishedBeforeJoystream": {
"isPublished": false,
"date": "2020-01-01"
}
}
- No thumbnail, invalid publishedBeforeJoystream date, invalid language, missing required license attribution, partial mediaType
{
"title": "Test video case 3",
"description": "Video with no thumbnail, invalid publishedBeforeJoystream date, invalid language, missing required license attribution, partial mediaType set at creation",
"videoPath": "/path/to/video.mp4",
"language": "xx",
"hasMarketing": false,
"isPublic": false,
"isExplicit": false,
"personsList": [],
"category": 3,
"license": {
"code": 1008
},
"publishedBeforeJoystream": {
"isPublished": true,
"date": "abc"
},
"mediaType": {
"codecName": "Custom codec name",
}
}
- Empty video case
{ }
updateVideo input cases to test:
- Clear all (invalid category/language) + replace both assets case
{
"title": "",
"description": "",
"videoPath": "/path/to/video-2.mp4",
"thumbnailPhotoPath": "/path/to/thumbnail-2.png",
"language": "",
"hasMarketing": false,
"isPublic": false,
"isExplicit": false,
"personsList": [0], // FIXME: No way to explicitly unset now
"category": 999,
"license": {},
"publishedBeforeJoystream": {},
"mediaPixelWidth": 0, // FIXME: No way to explicitly unset now
"mediaPixelHeight": 0, // FIXME: No way to explicitly unset now
"duration": 0, // FIXME: No way to explicitly unset now
"mediaType": {}
}
- Update thumbnail, unpublish, set valid category, set valid license, set valid publishedBeforeJoystream
{
"thumbnailPhotoPath": "/path/to/thumbnail-2.png",
"isPublic": false,
"category": 2,
"license": {
"code": 1000,
"customText": "Some valid custom license"
},
"publishedBeforeJoystream": {
"isPublished": true,
"date": "1965-01-01"
}
}
- Update video file, partial mediaType update, set valid language, publish
{
"videoPath": "/path/to/video-2.mp4",
"language": "pl",
"isPublic": true,
"mediaType": {
"codecName": "Custom codec name",
}
}
- Set all case
{
"title": "Update video case 4",
"description": "Updating full video metadata",
"videoPath": "/path/to/video.mp4",
"thumbnailPhotoPath": "/path/to/thumbnail.png",
"language": "sk",
"hasMarketing": true,
"isPublic": true,
"isExplicit": true,
"personsList": [1, 2, 3],
"category": 4,
"license": {
"code": 1006,
"attribution": "Joystream Contributors",
"customText": "Some custom text"
},
"publishedBeforeJoystream": {
"isPublished": true,
"date": "2021-12-24"
},
"mediaPixelWidth": 1024,
"mediaPixelHeight": 768,
"duration": 120,
"mediaType": {
"codecName": "h263",
"container": "MP4",
"mimeMediaType": "video/mp4"
}
}
Possible additional failure cases to include:
- Invalid metadata when creating/updating a channel/video: expect exit code
400-InvalidInput - Invalid asset file paths in metadata when creating/updating channel/video
- Updating channel/adding videos/removing channel assets/removing channel with using non-owner context that matches selected account (multiple possible combinations): expect exit code
405-AccessDenied - Executing any of the commands with context not matching selected account: expect exit code
405-AccessDenied - Updating/removing a non-existing channel/video: expect exit code
400-InvalidInput - Updating non-existring channel/video censorship status: expect exit code
400-InvalidInput - Removing channel assets that don't belong to the given channel: expect exit code
400-InvalidInput - Removing channel/video with existing assets without
--forceflag: expect exit code400-InvalidInput - Censoring
Curator Groupvideo/channel usingCuratorcontext: expect405-AccessDenied - Trying to update channel's reward account / collaborators using
Collaboratorcontext: expect405-AccessDenied
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Joystream CLI integration-test entry point and the commands named in this issue, including content:channels, content:channel, videos, video, and the asset-removal flow. Define the required node, query-node, storage-node, and distributor-node setup, then implement the listed channel and video scenarios and verify CLI, query-node, and asset results match the expected lifecycle.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, typescript
- Domain
- cli, distributed-systems, testing-qa
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 20/100