aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/fixtures
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/fixtures')
-rw-r--r--server/tests/fixtures/60fps_720p_small.mp4bin276786 -> 0 bytes
-rw-r--r--server/tests/fixtures/ap-json/mastodon/bad-body-http-signature.json93
-rw-r--r--server/tests/fixtures/ap-json/mastodon/bad-http-signature.json93
-rw-r--r--server/tests/fixtures/ap-json/mastodon/bad-public-key.json3
-rw-r--r--server/tests/fixtures/ap-json/mastodon/create-bad-signature.json81
-rw-r--r--server/tests/fixtures/ap-json/mastodon/create.json81
-rw-r--r--server/tests/fixtures/ap-json/mastodon/http-signature.json93
-rw-r--r--server/tests/fixtures/ap-json/mastodon/public-key.json3
-rw-r--r--server/tests/fixtures/ap-json/peertube/announce-without-context.json13
-rw-r--r--server/tests/fixtures/ap-json/peertube/invalid-keys.json6
-rw-r--r--server/tests/fixtures/ap-json/peertube/keys.json4
-rw-r--r--server/tests/fixtures/avatar-big.pngbin146585 -> 0 bytes
-rw-r--r--server/tests/fixtures/avatar-resized-120x120.gifbin88318 -> 0 bytes
-rw-r--r--server/tests/fixtures/avatar-resized-120x120.pngbin1727 -> 0 bytes
-rw-r--r--server/tests/fixtures/avatar-resized-48x48.gifbin20462 -> 0 bytes
-rw-r--r--server/tests/fixtures/avatar-resized-48x48.pngbin727 -> 0 bytes
-rw-r--r--server/tests/fixtures/avatar.gifbin46917 -> 0 bytes
-rw-r--r--server/tests/fixtures/avatar.pngbin1674 -> 0 bytes
-rw-r--r--server/tests/fixtures/avatar2-resized-120x120.pngbin1725 -> 0 bytes
-rw-r--r--server/tests/fixtures/avatar2-resized-48x48.pngbin760 -> 0 bytes
-rw-r--r--server/tests/fixtures/avatar2.pngbin4850 -> 0 bytes
-rw-r--r--server/tests/fixtures/banner-resized.jpgbin59947 -> 0 bytes
-rw-r--r--server/tests/fixtures/banner.jpgbin31648 -> 0 bytes
-rw-r--r--server/tests/fixtures/custom-preview-big.pngbin536513 -> 0 bytes
-rw-r--r--server/tests/fixtures/custom-preview.jpgbin14146 -> 0 bytes
-rw-r--r--server/tests/fixtures/custom-thumbnail-big.jpgbin20379 -> 0 bytes
-rw-r--r--server/tests/fixtures/custom-thumbnail.jpgbin6898 -> 0 bytes
-rw-r--r--server/tests/fixtures/custom-thumbnail.pngbin18070 -> 0 bytes
-rw-r--r--server/tests/fixtures/exif.jpgbin10877 -> 0 bytes
-rw-r--r--server/tests/fixtures/exif.pngbin21059 -> 0 bytes
-rw-r--r--server/tests/fixtures/live/0-000067.tsbin270532 -> 0 bytes
-rw-r--r--server/tests/fixtures/live/0-000068.tsbin181420 -> 0 bytes
-rw-r--r--server/tests/fixtures/live/0-000069.tsbin345732 -> 0 bytes
-rw-r--r--server/tests/fixtures/live/0-000070.tsbin282376 -> 0 bytes
-rw-r--r--server/tests/fixtures/live/0.m3u814
-rw-r--r--server/tests/fixtures/live/1-000067.tsbin620024 -> 0 bytes
-rw-r--r--server/tests/fixtures/live/1-000068.tsbin382392 -> 0 bytes
-rw-r--r--server/tests/fixtures/live/1-000069.tsbin712332 -> 0 bytes
-rw-r--r--server/tests/fixtures/live/1-000070.tsbin608556 -> 0 bytes
-rw-r--r--server/tests/fixtures/live/1.m3u814
-rw-r--r--server/tests/fixtures/live/master.m3u88
-rw-r--r--server/tests/fixtures/low-bitrate.mp4bin43850 -> 0 bytes
-rw-r--r--server/tests/fixtures/peertube-plugin-test-broken/main.js12
-rw-r--r--server/tests/fixtures/peertube-plugin-test-broken/package.json20
-rw-r--r--server/tests/fixtures/peertube-plugin-test-external-auth-one/main.js85
-rw-r--r--server/tests/fixtures/peertube-plugin-test-external-auth-one/package.json20
-rw-r--r--server/tests/fixtures/peertube-plugin-test-external-auth-three/main.js53
-rw-r--r--server/tests/fixtures/peertube-plugin-test-external-auth-three/package.json20
-rw-r--r--server/tests/fixtures/peertube-plugin-test-external-auth-two/main.js95
-rw-r--r--server/tests/fixtures/peertube-plugin-test-external-auth-two/package.json20
-rw-r--r--server/tests/fixtures/peertube-plugin-test-filter-translations/languages/fr.json3
-rw-r--r--server/tests/fixtures/peertube-plugin-test-filter-translations/languages/it.json3
-rw-r--r--server/tests/fixtures/peertube-plugin-test-filter-translations/main.js21
-rw-r--r--server/tests/fixtures/peertube-plugin-test-filter-translations/package.json23
-rw-r--r--server/tests/fixtures/peertube-plugin-test-five/main.js23
-rw-r--r--server/tests/fixtures/peertube-plugin-test-five/package.json20
-rw-r--r--server/tests/fixtures/peertube-plugin-test-four/main.js201
-rw-r--r--server/tests/fixtures/peertube-plugin-test-four/package.json20
-rw-r--r--server/tests/fixtures/peertube-plugin-test-id-pass-auth-one/main.js69
-rw-r--r--server/tests/fixtures/peertube-plugin-test-id-pass-auth-one/package.json20
-rw-r--r--server/tests/fixtures/peertube-plugin-test-id-pass-auth-three/main.js106
-rw-r--r--server/tests/fixtures/peertube-plugin-test-id-pass-auth-three/package.json20
-rw-r--r--server/tests/fixtures/peertube-plugin-test-id-pass-auth-two/main.js65
-rw-r--r--server/tests/fixtures/peertube-plugin-test-id-pass-auth-two/package.json20
-rw-r--r--server/tests/fixtures/peertube-plugin-test-native/main.js21
-rw-r--r--server/tests/fixtures/peertube-plugin-test-native/package.json23
-rw-r--r--server/tests/fixtures/peertube-plugin-test-podcast-custom-tags/main.js82
-rw-r--r--server/tests/fixtures/peertube-plugin-test-podcast-custom-tags/package.json19
-rw-r--r--server/tests/fixtures/peertube-plugin-test-six/main.js46
-rw-r--r--server/tests/fixtures/peertube-plugin-test-six/package.json20
-rw-r--r--server/tests/fixtures/peertube-plugin-test-transcoding-one/main.js92
-rw-r--r--server/tests/fixtures/peertube-plugin-test-transcoding-one/package.json20
-rw-r--r--server/tests/fixtures/peertube-plugin-test-transcoding-two/main.js38
-rw-r--r--server/tests/fixtures/peertube-plugin-test-transcoding-two/package.json20
-rw-r--r--server/tests/fixtures/peertube-plugin-test-unloading/lib.js2
-rw-r--r--server/tests/fixtures/peertube-plugin-test-unloading/main.js14
-rw-r--r--server/tests/fixtures/peertube-plugin-test-unloading/package.json20
-rw-r--r--server/tests/fixtures/peertube-plugin-test-video-constants/main.js46
-rw-r--r--server/tests/fixtures/peertube-plugin-test-video-constants/package.json20
-rw-r--r--server/tests/fixtures/peertube-plugin-test-websocket/main.js36
-rw-r--r--server/tests/fixtures/peertube-plugin-test-websocket/package.json20
-rw-r--r--server/tests/fixtures/peertube-plugin-test/languages/fr.json3
-rw-r--r--server/tests/fixtures/peertube-plugin-test/main.js477
-rw-r--r--server/tests/fixtures/peertube-plugin-test/package.json22
-rw-r--r--server/tests/fixtures/rtmps.cert21
-rw-r--r--server/tests/fixtures/rtmps.key28
-rw-r--r--server/tests/fixtures/sample.oggbin105243 -> 0 bytes
-rw-r--r--server/tests/fixtures/subtitle-bad.txt11
-rw-r--r--server/tests/fixtures/subtitle-good.srt11
-rw-r--r--server/tests/fixtures/subtitle-good1.vtt8
-rw-r--r--server/tests/fixtures/subtitle-good2.vtt8
-rw-r--r--server/tests/fixtures/thumbnail-playlist.jpgbin5040 -> 0 bytes
-rw-r--r--server/tests/fixtures/video-720p.torrentbin2644 -> 0 bytes
-rw-r--r--server/tests/fixtures/video_import_preview.jpgbin9551 -> 0 bytes
-rw-r--r--server/tests/fixtures/video_import_preview_yt_dlp.jpgbin15844 -> 0 bytes
-rw-r--r--server/tests/fixtures/video_import_thumbnail.jpgbin10980 -> 0 bytes
-rw-r--r--server/tests/fixtures/video_import_thumbnail_yt_dlp.jpgbin10676 -> 0 bytes
-rw-r--r--server/tests/fixtures/video_short.avibin584656 -> 0 bytes
-rw-r--r--server/tests/fixtures/video_short.mkvbin40642 -> 0 bytes
-rw-r--r--server/tests/fixtures/video_short.mp4bin38783 -> 0 bytes
-rw-r--r--server/tests/fixtures/video_short.mp4.jpgbin5028 -> 0 bytes
-rw-r--r--server/tests/fixtures/video_short.ogvbin140849 -> 0 bytes
-rw-r--r--server/tests/fixtures/video_short.ogv.jpgbin5023 -> 0 bytes
-rw-r--r--server/tests/fixtures/video_short.webmbin218910 -> 0 bytes
-rw-r--r--server/tests/fixtures/video_short.webm.jpgbin5028 -> 0 bytes
-rw-r--r--server/tests/fixtures/video_short1-preview.webm.jpgbin31188 -> 0 bytes
-rw-r--r--server/tests/fixtures/video_short1.webmbin572456 -> 0 bytes
-rw-r--r--server/tests/fixtures/video_short1.webm.jpgbin6334 -> 0 bytes
-rw-r--r--server/tests/fixtures/video_short2.webmbin942961 -> 0 bytes
-rw-r--r--server/tests/fixtures/video_short2.webm.jpgbin6607 -> 0 bytes
-rw-r--r--server/tests/fixtures/video_short3.webmbin292677 -> 0 bytes
-rw-r--r--server/tests/fixtures/video_short3.webm.jpgbin5674 -> 0 bytes
-rw-r--r--server/tests/fixtures/video_short_0p.mp4bin3051 -> 0 bytes
-rw-r--r--server/tests/fixtures/video_short_144p.m3u813
-rw-r--r--server/tests/fixtures/video_short_144p.mp4bin15634 -> 0 bytes
-rw-r--r--server/tests/fixtures/video_short_240p.m3u813
-rw-r--r--server/tests/fixtures/video_short_240p.mp4bin23084 -> 0 bytes
-rw-r--r--server/tests/fixtures/video_short_360p.m3u813
-rw-r--r--server/tests/fixtures/video_short_360p.mp4bin30620 -> 0 bytes
-rw-r--r--server/tests/fixtures/video_short_480.webmbin69217 -> 0 bytes
-rw-r--r--server/tests/fixtures/video_short_480p.m3u813
-rw-r--r--server/tests/fixtures/video_short_480p.mp4bin39881 -> 0 bytes
-rw-r--r--server/tests/fixtures/video_short_4k.mp4bin618949 -> 0 bytes
-rw-r--r--server/tests/fixtures/video_short_720p.m3u813
-rw-r--r--server/tests/fixtures/video_short_720p.mp4bin59109 -> 0 bytes
-rw-r--r--server/tests/fixtures/video_short_fake.webm1
-rw-r--r--server/tests/fixtures/video_short_mp3_256k.mp4bin194985 -> 0 bytes
-rw-r--r--server/tests/fixtures/video_short_no_audio.mp4bin34259 -> 0 bytes
-rw-r--r--server/tests/fixtures/video_very_long_10p.mp4bin185338 -> 0 bytes
-rw-r--r--server/tests/fixtures/video_very_short_240p.mp4bin9352 -> 0 bytes
130 files changed, 0 insertions, 2639 deletions
diff --git a/server/tests/fixtures/60fps_720p_small.mp4 b/server/tests/fixtures/60fps_720p_small.mp4
deleted file mode 100644
index 74bf968a4..000000000
--- a/server/tests/fixtures/60fps_720p_small.mp4
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/ap-json/mastodon/bad-body-http-signature.json b/server/tests/fixtures/ap-json/mastodon/bad-body-http-signature.json
deleted file mode 100644
index 4e7bc3af5..000000000
--- a/server/tests/fixtures/ap-json/mastodon/bad-body-http-signature.json
+++ /dev/null
@@ -1,93 +0,0 @@
1{
2 "headers": {
3 "user-agent": "http.rb/3.3.0 (Mastodon/2.5.0; +http://localhost:3000/)",
4 "host": "localhost",
5 "date": "Mon, 22 Oct 2018 13:34:22 GMT",
6 "accept-encoding": "gzip",
7 "digest": "SHA-256=FEr5j2WSSfdEMcG3NTOXuGU0lUchfTJx4+BtUlWOwDk=",
8 "content-type": "application/activity+json",
9 "signature": "keyId=\"http://localhost:3000/users/ronan2#main-key\",algorithm=\"rsa-sha256\",headers=\"(request-target) host date digest content-type\",signature=\"oLKbgxdFXdXsHJ3x/UsG9Svu7oa8Dyqiy6Jif4wqNuhAqRVMRaG18f+dd2OcfFX3XRGF8p8flZkU6vvoEQBauTwGRGcgXAJuKC1zYIWGk+PeiW8lNUnE4qGapWcTiFnIo7FKauNdsgqg/tvgs1pQIdHkDDjZMI64twP7sTN/4vG1PCq+kyqi/DM+ORLi/W7vFuLVHt2Iz7ikfw/R3/mMtS4FwLops+tVYBQ2iQ9DVRhTwLKVbeL/LLVB/tdGzNZ4F4nImBAQQ9I7WpPM6J/k+cBmoEbrUKs8ptx9gbX3OSsl5wlvPVMNzU9F9yb2MrB/Y/J4qssKz+LbiaktKGj7OQ==\"",
10 "content-length": "2815"
11 },
12 "body": {
13 "@context": [
14 "https://www.w3.org/ns/activitystreams",
15 "https://w3id.org/security/v1",
16 {
17 "manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
18 "sensitive": "as:sensitive",
19 "movedTo": {
20 "@id": "as:movedTo",
21 "@type": "@id"
22 },
23 "Hashtag": "as:Hashtag",
24 "ostatus": "http://ostatus.org#",
25 "atomUri": "ostatus:atomUri",
26 "inReplyToAtomUri": "ostatus:inReplyToAtomUri",
27 "conversation": "ostatus:conversation",
28 "toot": "http://joinmastodon.org/ns#",
29 "Emoji": "toot:Emoji",
30 "focalPoint": {
31 "@container": "@list",
32 "@id": "toot:focalPoint"
33 },
34 "featured": {
35 "@id": "toot:featured",
36 "@type": "@id"
37 },
38 "schema": "http://schema.org#",
39 "PropertyValue": "schema:PropertyValue",
40 "value": "schema:value"
41 }
42 ],
43 "id": "http://localhost:3000/users/ronan2/statuses/100939547203370948/activity",
44 "type": "Create",
45 "actor": "http://localhost:3000/users/ronan2",
46 "published": "2018-10-22T13:34:18Z",
47 "to": [
48 "https://www.w3.org/ns/activitystreams#Public"
49 ],
50 "cc": [
51 "http://localhost:3000/users/ronan2/followers",
52 "http://localhost:9000/accounts/ronan"
53 ],
54 "object": {
55 "id": "http://localhost:3000/users/ronan2/statuses/100939547203370948",
56 "type": "Note",
57 "summary": null,
58 "inReplyTo": "http://localhost:9000/videos/watch/90e6f8ed-b369-423c-b0c8-f44e5350c752",
59 "published": "2018-10-22T13:34:18Z",
60 "url": "http://localhost:3000/@ronan2/100939547203370948",
61 "attributedTo": "http://localhost:3000/users/ronan2",
62 "to": [
63 "https://www.w3.org/ns/activitystreams#Public"
64 ],
65 "cc": [
66 "http://localhost:3000/users/ronan2/followers",
67 "http://localhost:9000/accounts/ronan"
68 ],
69 "sensitive": false,
70 "atomUri": "http://localhost:3000/users/ronan2/statuses/100939547203370948",
71 "inReplyToAtomUri": "http://localhost:9000/videos/watch/90e6f8ed-b369-423c-b0c8-f44e5350c752",
72 "conversation": "tag:localhost:3000,2018-10-19:objectId=72:objectType=Conversation",
73 "content": "<p><span class=\"h-card\"><a href=\"http://localhost:9000/accounts/ronan\" class=\"u-url mention\">@<span>ronan</span></a></span> zergzerg</p>",
74 "contentMap": {
75 "en": "<p><span class=\"h-card\"><a href=\"http://localhost:9000/accounts/ronan\" class=\"u-url mention\">@<span>ronan</span></a></span> zergzerg</p>"
76 },
77 "attachment": [],
78 "tag": [
79 {
80 "type": "Mention",
81 "href": "http://localhost:9000/accounts/ronan",
82 "name": "@ronan@localhost:9000"
83 }
84 ]
85 },
86 "signature": {
87 "type": "RsaSignature2017",
88 "creator": "http://localhost:3000/users/ronan2#main-key",
89 "created": "2018-10-22T13:34:19Z",
90 "signatureValue": "x+xL4l8ERziYVhwEafHJyBQOInvNZ0gV4ccYd9AtFYeGJagc8fY6jjjhbDRCD7yMhgTjBX69z20MXnDuwpmM6wej3dt1wLKdIyXVViO84nAlqFz7KmNxtk5lDnAVX/vttscT5YUFvw4dbPT2mQiEd1lKbaLftRiIPEomZpQ37+fUkQdcPrnhruPAISO/Sof1n1LFW4mYIffozteQSZBH6HaCVp+MRMIhdMi5e8w7PD48/cZz8D/EU8Vqi91FM76/3tMqg6nLqQ+8bq74Jvt2kzwZlIufe+I55QMpZOmF6hGIJEt+R0JXdjQbtgcELONmNj2dr8sAlzu7zKlAGuJ24Q=="
91 }
92 }
93}
diff --git a/server/tests/fixtures/ap-json/mastodon/bad-http-signature.json b/server/tests/fixtures/ap-json/mastodon/bad-http-signature.json
deleted file mode 100644
index 098597db0..000000000
--- a/server/tests/fixtures/ap-json/mastodon/bad-http-signature.json
+++ /dev/null
@@ -1,93 +0,0 @@
1{
2 "headers": {
3 "user-agent": "http.rb/3.3.0 (Mastodon/2.5.0; +http://localhost:3000/)",
4 "host": "localhost",
5 "date": "Mon, 22 Oct 2018 13:34:22 GMT",
6 "accept-encoding": "gzip",
7 "digest": "SHA-256=FEr5j2WSSfdEMcG3NTOXuGU0lUchfTJx4+BtUlWOwDk=",
8 "content-type": "application/activity+json",
9 "signature": "keyId=\"http://localhost:3000/users/ronan2#main-key\",algorithm=\"rsa-sha256\",headers=\"(request-target) host date digest content-type\",signature=\"oLKbgxdFXdXsHJ3x/UsG9Svu7oa8Dyqiy6Jif4wqNuhAqRVMRaG18f+dd2OcfFX3XRGF8p8flZkU6vvoEQBauTwGRGcgXAJuKC1zYIWGk+PeiW8lNUnE4qGapWcTiFnIo7FKauNdsgqg/tvgs1pQIdHkDDjZMI64twP7sTN/4vG1PCq+kyqi/DM+ORLi/W7vFuLVHt2Iz7ikfw/R3/mMtS4FwLops+tVYBQ2iQ9DVRhTwLKVbeL/LLVB/tdGzNZ4F4nImBAQQ9I7WpPM6J/k+cBmoEbrUKs8ptx9gbX3OSsl4wlvPVMNzU9F9yb2MrB/Y/J4qssKz+LbiaktKGj7OQ==\"",
10 "content-length": "2815"
11 },
12 "body": {
13 "@context": [
14 "https://www.w3.org/ns/activitystreams",
15 "https://w3id.org/security/v1",
16 {
17 "manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
18 "sensitive": "as:sensitive",
19 "movedTo": {
20 "@id": "as:movedTo",
21 "@type": "@id"
22 },
23 "Hashtag": "as:Hashtag",
24 "ostatus": "http://ostatus.org#",
25 "atomUri": "ostatus:atomUri",
26 "inReplyToAtomUri": "ostatus:inReplyToAtomUri",
27 "conversation": "ostatus:conversation",
28 "toot": "http://joinmastodon.org/ns#",
29 "Emoji": "toot:Emoji",
30 "focalPoint": {
31 "@container": "@list",
32 "@id": "toot:focalPoint"
33 },
34 "featured": {
35 "@id": "toot:featured",
36 "@type": "@id"
37 },
38 "schema": "http://schema.org#",
39 "PropertyValue": "schema:PropertyValue",
40 "value": "schema:value"
41 }
42 ],
43 "id": "http://localhost:3000/users/ronan2/statuses/100939547203370948/activity",
44 "type": "Create",
45 "actor": "http://localhost:3000/users/ronan2",
46 "published": "2018-10-22T13:34:18Z",
47 "to": [
48 "https://www.w3.org/ns/activitystreams#Public"
49 ],
50 "cc": [
51 "http://localhost:3000/users/ronan2/followers",
52 "http://localhost:9000/accounts/ronan"
53 ],
54 "object": {
55 "id": "http://localhost:3000/users/ronan2/statuses/100939547203370948",
56 "type": "Note",
57 "summary": null,
58 "inReplyTo": "http://localhost:9000/videos/watch/90e6f8ed-b369-423c-b0c8-f44e5350c752",
59 "published": "2018-10-22T13:34:18Z",
60 "url": "http://localhost:3000/@ronan2/100939547203370948",
61 "attributedTo": "http://localhost:3000/users/ronan2",
62 "to": [
63 "https://www.w3.org/ns/activitystreams#Public"
64 ],
65 "cc": [
66 "http://localhost:3000/users/ronan2/followers",
67 "http://localhost:9000/accounts/ronan"
68 ],
69 "sensitive": false,
70 "atomUri": "http://localhost:3000/users/ronan2/statuses/100939547203370948",
71 "inReplyToAtomUri": "http://localhost:9000/videos/watch/90e6f8ed-b369-423c-b0c8-f44e5350c752",
72 "conversation": "tag:localhost:3000,2018-10-19:objectId=72:objectType=Conversation",
73 "content": "<p><span class=\"h-card\"><a href=\"http://localhost:9000/accounts/ronan\" class=\"u-url mention\">@<span>ronan</span></a></span> zergzerg</p>",
74 "contentMap": {
75 "en": "<p><span class=\"h-card\"><a href=\"http://localhost:9000/accounts/ronan\" class=\"u-url mention\">@<span>ronan</span></a></span> zergzerg</p>"
76 },
77 "attachment": [],
78 "tag": [
79 {
80 "type": "Mention",
81 "href": "http://localhost:9000/accounts/ronan",
82 "name": "@ronan@localhost:9000"
83 }
84 ]
85 },
86 "signature": {
87 "type": "RsaSignature2017",
88 "creator": "http://localhost:3000/users/ronan2#main-key",
89 "created": "2018-10-22T13:34:19Z",
90 "signatureValue": "x+xL4l8ERziYVhwEafHJyBQOInvNZ0gV4ccYd9AtFYeGJagc8fY6jjjhbDRCD7yMhgTjBX69z20MXnDuwpmM6wej3dt1wLKdIyXVViO84nAlqFz7KmNxtk5lDnAVX/vttscT5YUFvw4dbPT2mQiEd1lKbaLftRiIPEomZpQ37+fUkQdcPrnhruPAISO/Sof1n1LFW4mYIffozteQSZBH6HaCVp+MRMIhdMi5e8w7PD48/cZz8D/EU8Vqi91FM76/3tMqg6nLqQ+8bq74Jvt2kzwZlIufe+I55QMpZOmF6hGIJEt+R0JXdjQbtgcELONmNj2dr8sAlzu7zKlAGuJ24Q=="
91 }
92 }
93}
diff --git a/server/tests/fixtures/ap-json/mastodon/bad-public-key.json b/server/tests/fixtures/ap-json/mastodon/bad-public-key.json
deleted file mode 100644
index 73d18b3ad..000000000
--- a/server/tests/fixtures/ap-json/mastodon/bad-public-key.json
+++ /dev/null
@@ -1,3 +0,0 @@
1{
2 "publicKey": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0YyuthHtWWgDe0Fdgdp2\ndC5dTJsRqW6pFw5omIYYYjoES/WRewhVxEA54BhmxD3L1zChfx131N1TS8jVowhW\nm999jpUffKCCvLgYKIXETJDHiDeMONVx8wp7v9fS1HiFXo/E5und39gUMs14CMFZ\n6PE5jRV3r4XIKQJHQl7/X5n5FOb2934K+1TKUeBkbft/AushlKatYQakt3qHxpwx\nFvE+JjGo7QTnzdjaOx/e5QvojdGi2Kx4+jl77j2WVcSo5lOBz04OAVJtChtn82vS\nulPdDh3hZcDn+WK67yAhGP6AnzvOybZZS4zowlKiQ3kqjVVXKdl8gAsL4Y7MZ40R\nJQIDAQAB\n-----END PUBLIC KEY-----\n"
3}
diff --git a/server/tests/fixtures/ap-json/mastodon/create-bad-signature.json b/server/tests/fixtures/ap-json/mastodon/create-bad-signature.json
deleted file mode 100644
index 2cd037241..000000000
--- a/server/tests/fixtures/ap-json/mastodon/create-bad-signature.json
+++ /dev/null
@@ -1,81 +0,0 @@
1{
2 "@context": [
3 "https://www.w3.org/ns/activitystreams",
4 "https://w3id.org/security/v1",
5 {
6 "manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
7 "sensitive": "as:sensitive",
8 "movedTo": {
9 "@id": "as:movedTo",
10 "@type": "@id"
11 },
12 "Hashtag": "as:Hashtag",
13 "ostatus": "http://ostatus.org#",
14 "atomUri": "ostatus:atomUri",
15 "inReplyToAtomUri": "ostatus:inReplyToAtomUri",
16 "conversation": "ostatus:conversation",
17 "toot": "http://joinmastodon.org/ns#",
18 "Emoji": "toot:Emoji",
19 "focalPoint": {
20 "@container": "@list",
21 "@id": "toot:focalPoint"
22 },
23 "featured": {
24 "@id": "toot:featured",
25 "@type": "@id"
26 },
27 "schema": "http://schema.org#",
28 "PropertyValue": "schema:PropertyValue",
29 "value": "schema:value"
30 }
31 ],
32 "id": "http://localhost:3000/users/ronan2/statuses/100939345950887698/activity",
33 "type": "Create",
34 "actor": "http://localhost:3000/users/ronan2",
35 "published": "2018-10-22T12:43:07Z",
36 "to": [
37 "https://www.w3.org/ns/activitystreams#Public"
38 ],
39 "cc": [
40 "http://localhost:3000/users/ronan2/followers",
41 "http://localhost:9000/accounts/ronan"
42 ],
43 "object": {
44 "id": "http://localhost:3000/users/ronan2/statuses/100939345950887698",
45 "type": "Note",
46 "summary": null,
47 "inReplyTo": "http://localhost:9000/videos/watch/90e6f8ed-b369-423c-b0c8-f44e5350c752",
48 "published": "2018-10-22T12:43:07Z",
49 "url": "http://localhost:3000/@ronan2/100939345950887698",
50 "attributedTo": "http://localhost:3000/users/ronan2",
51 "to": [
52 "https://www.w3.org/ns/activitystreams#Public"
53 ],
54 "cc": [
55 "http://localhost:3000/users/ronan2/followers",
56 "http://localhost:9000/accounts/ronan"
57 ],
58 "sensitive": false,
59 "atomUri": "http://localhost:3000/users/ronan2/statuses/100939345950887698",
60 "inReplyToAtomUri": "http://localhost:9000/videos/watch/90e6f8ed-b369-423c-b0c8-f44e5350c752",
61 "conversation": "tag:localhost:3000,2018-10-19:objectId=72:objectType=Conversation",
62 "content": "<p><span class=\"h-card\"><a href=\"http://localhost:9000/accounts/ronan\" class=\"u-url mention\">@<span>ronan</span></a></span> zerg</p>",
63 "contentMap": {
64 "en": "<p><span class=\"h-card\"><a href=\"http://localhost:9000/accounts/ronan\" class=\"u-url mention\">@<span>ronan</span></a></span> zerg</p>"
65 },
66 "attachment": [],
67 "tag": [
68 {
69 "type": "Mention",
70 "href": "http://localhost:9000/accounts/ronan",
71 "name": "@ronan@localhost:9000"
72 }
73 ]
74 },
75 "signature": {
76 "type": "RsaSignature2017",
77 "creator": "http://localhost:3000/users/ronan2#main-key",
78 "created": "2018-10-22T12:43:08Z",
79 "signatureValue": "Vgr8nA0agPr9TcA4BlX+MWhmuE+rBcoIJLpnPbm3E5SnOCXbgjEfEaTLqfuzzkKNsR3PBbkvi3YWK4/DxJ0zmpzSB7yy4NRzluQMVQHqJiFKXAX3Sr3fIrK24xkWW9/F207c1NpFajSGbgnFKBdtFE0e5VqwSrSoOJkZukZW/2ATSnsyzblieuUmvTWpD0PqpUOsynPjw+RqZnqPn0cjw1z2Dm7ZRt3trnyMTXFYZw5U/YuqMY2kpadD6vq780md8kXlJIylxG6ZrlO2jz9fJdnfuVq43d4QFNsBm1K1r2WtNqX+i+wiqh+u3PjF4pzXtl/a3hJOH18IfZnK7I21mQ=="
80 }
81}
diff --git a/server/tests/fixtures/ap-json/mastodon/create.json b/server/tests/fixtures/ap-json/mastodon/create.json
deleted file mode 100644
index 0be271bb8..000000000
--- a/server/tests/fixtures/ap-json/mastodon/create.json
+++ /dev/null
@@ -1,81 +0,0 @@
1{
2 "@context": [
3 "https://www.w3.org/ns/activitystreams",
4 "https://w3id.org/security/v1",
5 {
6 "manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
7 "sensitive": "as:sensitive",
8 "movedTo": {
9 "@id": "as:movedTo",
10 "@type": "@id"
11 },
12 "Hashtag": "as:Hashtag",
13 "ostatus": "http://ostatus.org#",
14 "atomUri": "ostatus:atomUri",
15 "inReplyToAtomUri": "ostatus:inReplyToAtomUri",
16 "conversation": "ostatus:conversation",
17 "toot": "http://joinmastodon.org/ns#",
18 "Emoji": "toot:Emoji",
19 "focalPoint": {
20 "@container": "@list",
21 "@id": "toot:focalPoint"
22 },
23 "featured": {
24 "@id": "toot:featured",
25 "@type": "@id"
26 },
27 "schema": "http://schema.org#",
28 "PropertyValue": "schema:PropertyValue",
29 "value": "schema:value"
30 }
31 ],
32 "id": "http://localhost:3000/users/ronan2/statuses/100939345950887698/activity",
33 "type": "Create",
34 "actor": "http://localhost:3000/users/ronan2",
35 "published": "2018-10-22T12:43:07Z",
36 "to": [
37 "https://www.w3.org/ns/activitystreams#Public"
38 ],
39 "cc": [
40 "http://localhost:3000/users/ronan2/followers",
41 "http://localhost:9000/accounts/ronan"
42 ],
43 "object": {
44 "id": "http://localhost:3000/users/ronan2/statuses/100939345950887698",
45 "type": "Note",
46 "summary": null,
47 "inReplyTo": "http://localhost:9000/videos/watch/90e6f8ed-b369-423c-b0c8-f44e5350c752",
48 "published": "2018-10-22T12:43:07Z",
49 "url": "http://localhost:3000/@ronan2/100939345950887698",
50 "attributedTo": "http://localhost:3000/users/ronan2",
51 "to": [
52 "https://www.w3.org/ns/activitystreams#Public"
53 ],
54 "cc": [
55 "http://localhost:3000/users/ronan2/followers",
56 "http://localhost:9000/accounts/ronan"
57 ],
58 "sensitive": false,
59 "atomUri": "http://localhost:3000/users/ronan2/statuses/100939345950887698",
60 "inReplyToAtomUri": "http://localhost:9000/videos/watch/90e6f8ed-b369-423c-b0c8-f44e5350c752",
61 "conversation": "tag:localhost:3000,2018-10-19:objectId=72:objectType=Conversation",
62 "content": "<p><span class=\"h-card\"><a href=\"http://localhost:9000/accounts/ronan\" class=\"u-url mention\">@<span>ronan</span></a></span> zerg</p>",
63 "contentMap": {
64 "en": "<p><span class=\"h-card\"><a href=\"http://localhost:9000/accounts/ronan\" class=\"u-url mention\">@<span>ronan</span></a></span> zerg</p>"
65 },
66 "attachment": [],
67 "tag": [
68 {
69 "type": "Mention",
70 "href": "http://localhost:9000/accounts/ronan",
71 "name": "@ronan@localhost:9000"
72 }
73 ]
74 },
75 "signature": {
76 "type": "RsaSignature2017",
77 "creator": "http://localhost:3000/users/ronan2#main-key",
78 "created": "2018-10-22T12:43:08Z",
79 "signatureValue": "VgR8nA0agPr9TcA4BlX+MWhmuE+rBcoIJLpnPbm3E5SnOCXbgjEfEaTLqfuzzkKNsR3PBbkvi3YWK4/DxJ0zmpzSB7yy4NRzluQMVQHqJiFKXAX3Sr3fIrK24xkWW9/F207c1NpFajSGbgnFKBdtFE0e5VqwSrSoOJkZukZW/2ATSnsyzblieuUmvTWpD0PqpUOsynPjw+RqZnqPn0cjw1z2Dm7ZRt3trnyMTXFYZw5U/YuqMY2kpadD6vq780md8kXlJIylxG6ZrlO2jz9fJdnfuVq43d4QFNsBm1K1r2WtNqX+i+wiqh+u3PjF4pzXtl/a3hJOH18IfZnK7I21mQ=="
80 }
81}
diff --git a/server/tests/fixtures/ap-json/mastodon/http-signature.json b/server/tests/fixtures/ap-json/mastodon/http-signature.json
deleted file mode 100644
index 4e7bc3af5..000000000
--- a/server/tests/fixtures/ap-json/mastodon/http-signature.json
+++ /dev/null
@@ -1,93 +0,0 @@
1{
2 "headers": {
3 "user-agent": "http.rb/3.3.0 (Mastodon/2.5.0; +http://localhost:3000/)",
4 "host": "localhost",
5 "date": "Mon, 22 Oct 2018 13:34:22 GMT",
6 "accept-encoding": "gzip",
7 "digest": "SHA-256=FEr5j2WSSfdEMcG3NTOXuGU0lUchfTJx4+BtUlWOwDk=",
8 "content-type": "application/activity+json",
9 "signature": "keyId=\"http://localhost:3000/users/ronan2#main-key\",algorithm=\"rsa-sha256\",headers=\"(request-target) host date digest content-type\",signature=\"oLKbgxdFXdXsHJ3x/UsG9Svu7oa8Dyqiy6Jif4wqNuhAqRVMRaG18f+dd2OcfFX3XRGF8p8flZkU6vvoEQBauTwGRGcgXAJuKC1zYIWGk+PeiW8lNUnE4qGapWcTiFnIo7FKauNdsgqg/tvgs1pQIdHkDDjZMI64twP7sTN/4vG1PCq+kyqi/DM+ORLi/W7vFuLVHt2Iz7ikfw/R3/mMtS4FwLops+tVYBQ2iQ9DVRhTwLKVbeL/LLVB/tdGzNZ4F4nImBAQQ9I7WpPM6J/k+cBmoEbrUKs8ptx9gbX3OSsl5wlvPVMNzU9F9yb2MrB/Y/J4qssKz+LbiaktKGj7OQ==\"",
10 "content-length": "2815"
11 },
12 "body": {
13 "@context": [
14 "https://www.w3.org/ns/activitystreams",
15 "https://w3id.org/security/v1",
16 {
17 "manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
18 "sensitive": "as:sensitive",
19 "movedTo": {
20 "@id": "as:movedTo",
21 "@type": "@id"
22 },
23 "Hashtag": "as:Hashtag",
24 "ostatus": "http://ostatus.org#",
25 "atomUri": "ostatus:atomUri",
26 "inReplyToAtomUri": "ostatus:inReplyToAtomUri",
27 "conversation": "ostatus:conversation",
28 "toot": "http://joinmastodon.org/ns#",
29 "Emoji": "toot:Emoji",
30 "focalPoint": {
31 "@container": "@list",
32 "@id": "toot:focalPoint"
33 },
34 "featured": {
35 "@id": "toot:featured",
36 "@type": "@id"
37 },
38 "schema": "http://schema.org#",
39 "PropertyValue": "schema:PropertyValue",
40 "value": "schema:value"
41 }
42 ],
43 "id": "http://localhost:3000/users/ronan2/statuses/100939547203370948/activity",
44 "type": "Create",
45 "actor": "http://localhost:3000/users/ronan2",
46 "published": "2018-10-22T13:34:18Z",
47 "to": [
48 "https://www.w3.org/ns/activitystreams#Public"
49 ],
50 "cc": [
51 "http://localhost:3000/users/ronan2/followers",
52 "http://localhost:9000/accounts/ronan"
53 ],
54 "object": {
55 "id": "http://localhost:3000/users/ronan2/statuses/100939547203370948",
56 "type": "Note",
57 "summary": null,
58 "inReplyTo": "http://localhost:9000/videos/watch/90e6f8ed-b369-423c-b0c8-f44e5350c752",
59 "published": "2018-10-22T13:34:18Z",
60 "url": "http://localhost:3000/@ronan2/100939547203370948",
61 "attributedTo": "http://localhost:3000/users/ronan2",
62 "to": [
63 "https://www.w3.org/ns/activitystreams#Public"
64 ],
65 "cc": [
66 "http://localhost:3000/users/ronan2/followers",
67 "http://localhost:9000/accounts/ronan"
68 ],
69 "sensitive": false,
70 "atomUri": "http://localhost:3000/users/ronan2/statuses/100939547203370948",
71 "inReplyToAtomUri": "http://localhost:9000/videos/watch/90e6f8ed-b369-423c-b0c8-f44e5350c752",
72 "conversation": "tag:localhost:3000,2018-10-19:objectId=72:objectType=Conversation",
73 "content": "<p><span class=\"h-card\"><a href=\"http://localhost:9000/accounts/ronan\" class=\"u-url mention\">@<span>ronan</span></a></span> zergzerg</p>",
74 "contentMap": {
75 "en": "<p><span class=\"h-card\"><a href=\"http://localhost:9000/accounts/ronan\" class=\"u-url mention\">@<span>ronan</span></a></span> zergzerg</p>"
76 },
77 "attachment": [],
78 "tag": [
79 {
80 "type": "Mention",
81 "href": "http://localhost:9000/accounts/ronan",
82 "name": "@ronan@localhost:9000"
83 }
84 ]
85 },
86 "signature": {
87 "type": "RsaSignature2017",
88 "creator": "http://localhost:3000/users/ronan2#main-key",
89 "created": "2018-10-22T13:34:19Z",
90 "signatureValue": "x+xL4l8ERziYVhwEafHJyBQOInvNZ0gV4ccYd9AtFYeGJagc8fY6jjjhbDRCD7yMhgTjBX69z20MXnDuwpmM6wej3dt1wLKdIyXVViO84nAlqFz7KmNxtk5lDnAVX/vttscT5YUFvw4dbPT2mQiEd1lKbaLftRiIPEomZpQ37+fUkQdcPrnhruPAISO/Sof1n1LFW4mYIffozteQSZBH6HaCVp+MRMIhdMi5e8w7PD48/cZz8D/EU8Vqi91FM76/3tMqg6nLqQ+8bq74Jvt2kzwZlIufe+I55QMpZOmF6hGIJEt+R0JXdjQbtgcELONmNj2dr8sAlzu7zKlAGuJ24Q=="
91 }
92 }
93}
diff --git a/server/tests/fixtures/ap-json/mastodon/public-key.json b/server/tests/fixtures/ap-json/mastodon/public-key.json
deleted file mode 100644
index b7b9b8308..000000000
--- a/server/tests/fixtures/ap-json/mastodon/public-key.json
+++ /dev/null
@@ -1,3 +0,0 @@
1{
2 "publicKey": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0YyuthHtWWgDe0Fdgdp2\ndC5dTJsRqW6pFw5omIYYYjoES/WRewhVxEA54BhmxD3L1zChfx131N1TS8jVowhW\nm999jpUffKCCvLgYKIXETJDHiDeMONVx8wp7v9fS1HiFXo/E5und39gUMs14CMFZ\n6PE5jRV3r4XIKQJHQl7/X5n5FOb2934K+1TKUeBkbft/AushlKatYQakt3qHxpwx\nFvE+JjGo7QTnzdjaOx/e5QvojdGi2Kx4+jl87j2WVcSo5lOBz04OAVJtChtn82vS\nulPdDh3hZcDn+WK67yAhGP6AnzvOybZZS4zowlKiQ3kqjVVXKdl8gAsL4Y7MZ40R\nJQIDAQAB\n-----END PUBLIC KEY-----\n"
3}
diff --git a/server/tests/fixtures/ap-json/peertube/announce-without-context.json b/server/tests/fixtures/ap-json/peertube/announce-without-context.json
deleted file mode 100644
index cda1c514c..000000000
--- a/server/tests/fixtures/ap-json/peertube/announce-without-context.json
+++ /dev/null
@@ -1,13 +0,0 @@
1{
2 "type": "Announce",
3 "id": "http://127.0.0.1:9002/videos/watch/997111d4-e8d8-4f45-99d3-857905785d05/announces/1",
4 "actor": "http://127.0.0.1:9002/accounts/peertube",
5 "object": "http://127.0.0.1:9002/videos/watch/997111d4-e8d8-4f45-99d3-857905785d05",
6 "to": [
7 "https://www.w3.org/ns/activitystreams#Public",
8 "http://127.0.0.1:9002/accounts/peertube/followers",
9 "http://127.0.0.1:9002/video-channels/root_channel/followers",
10 "http://127.0.0.1:9002/accounts/root/followers"
11 ],
12 "cc": []
13}
diff --git a/server/tests/fixtures/ap-json/peertube/invalid-keys.json b/server/tests/fixtures/ap-json/peertube/invalid-keys.json
deleted file mode 100644
index 0544e96b9..000000000
--- a/server/tests/fixtures/ap-json/peertube/invalid-keys.json
+++ /dev/null
@@ -1,6 +0,0 @@
1{
2 "publicKey": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqjQGdH6D3naKmSbbr/Df\nEh1H42F3WlHYXuxKLkm5Bemjdde+GwHYdz5m3fcIWw3HTzfA+y9Of8epGdfSrtYO\nwAyc3Zoy7afPNa4bZXqhJ1Im41rMGieiCuUn4uTPPucIjC0gCkVwvuQr3Elbk55s\nIkczDkseJuadTvG+A1e4uNY2lnRmVhf4g5B90u6CLe2KdbPpifRoKlw9zaUBj4/F\npP5S75TS5l1DfJQIq2lp8RwrH6FvGKLnWlbGeNYX96DDvlA5Sxoxz6a+bTV9OopM\n7mS7eP8zF8lKXYUu8cjIscKm+XqGmyRoPyw2Pp53tew29idRUocVQHGBnlNbpKdd\naQIDAQAB\n-----END PUBLIC KEY-----\n",
3 "privateKey": "-----BEGIN RSA PRIVATE KEY-----\nMIIEpAIBAAKCAQEAqjQGdH6D3naKmSbbr/DfEh1H42F3WlHYXuxKLkm5Bemjdde+\nGwHYdz5m3fcIWw3HTzfA+y9Of8epGdfSrtYOwAyc3Zoy7afPNa4bZXqhJ1Im41rM\nGieiCuUn4uTPPucIjC0gCkVwvuQr3Elbk55sIkczDkseJuadTvG+A1e4uNY2lnRm\nVhf4g5B90u6CLe2KdbPpifRoKlw9zaUBj4/FpP5S75TS5l1DfJQIq2lp8RwrH6Fv\nGKLnWlbGeNYX96DDvlA5Sxoxz6a+bTV9OopM7mS7eP8zF8lKXYUu8cjIscKm+XqG\nmyRoPyw3Pp53tew29idRUocVQHGBnlNbpKddaQIDAQABAoIBAQCnBZawCtbtH/ay\ng+dhqEW/SOyavbKZ92cU/1tsQPxISRYXNjdf2VfK7HmVqC2S7NqBanz+AVZPHmda\n7OfamkSvQbFN5VvEy8ATNV+9HbG3HG78/MT9hZcGigmyJkcZuy4wILgoXCxfpxlD\netla60PB/4yioiRcmEIWjjOgpByphDJ7RuuuptyEvgjUjpPtvHK47O/loaD2HFJk\nbIYbRirbjUjITRjQxGVIvanqiwPG9pB26YDLxDOoXEumcnzRcEFWNdvoleaLgquS\nn/zVsXWEq4+1i7t44DDstWUt/2Bw5ksIkSdayQ6oy3vzre3YFHwvbVZ7qtQQgpru\nx+NIolZhAoGBAN1RgNj8zy9Py3SJdsoXtnuCItfD7eo7LWXUa06cM/NS695Q+/to\naa5i3cJnRlv+b+b3VvnhkhIBLfFQW+hWwPnnxJEehcm09ddN9zbWrZ4Yv9yYu+8d\nTLGyWL8kPFF1dz+29DcrSv3tXEOwxByX/O4U/X/i3wl2WhkybxVFnCuvAoGBAMTf\n91BgLzvcYKOxH+vRPOJY7g2HKGFe35R91M4E+9Eq1rq4LUQHBb3fhRh4+scNu0yb\nNfN1Zdx2nbgCXdTKomF1Ahxp58/A2iU65vVzL6hYfWXEGSmoBqsGCIpIxQ9jgB9k\nCl7t/Ban8Z/ORHTjI9fpHlSZyCWJ3ajepiM2a1ZnAoGAPpDO6wi1DXvyWVSPF1yS\nwuGsNfD2rjPihpoBZ+yypwP3GBcu1QjUb28Vn+KQOmt4eQPNO8DwCVT6BvEfulPk\nJAHISPom+jnFEgPBcmhIFpyKiLNI1bUjvExd2FNHFgQuHP38ligQAC782Un8dtTk\ntO2MKH4bbVJe8CaYzpuqJZMCgYABZyMpBHZxs8FQiUuT75rCdiXEHOlxwC5RrY/d\no/VzaR28mOFhsbcdwkD9iqcm0fc6tYRt5rFCH+pBzGqEwKjljuLj9vE67sHfMAtD\nRn3Zcj/6gKo5PMRHZbSb36bf1DKuhpT4VjPMqYe0PtEIEDJKMJQRwELH2bKlqGiA\nqbucEwKBgQCkS85JnpHEV/tSylsEEn2W3CQCx58zl7iZNV7h/tWMR4AyrcI0HqP6\nllJ7V/Cfw66MgelPnosKgagwLVI6gsqDtjnzYo3XuMRVlYIySJ/jV3eiUNkV2Ky2\nfp/gA9sVgp38QSr+xB9E0LNStcbqDzoCCcDRws/SK7PbkQH9KV47tQ==\n-----END RSA PRIVATE KEY-----"
4}
5
6
diff --git a/server/tests/fixtures/ap-json/peertube/keys.json b/server/tests/fixtures/ap-json/peertube/keys.json
deleted file mode 100644
index 1a7700865..000000000
--- a/server/tests/fixtures/ap-json/peertube/keys.json
+++ /dev/null
@@ -1,4 +0,0 @@
1{
2 "publicKey": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqjQGdH6D3naKmSbbr/Df\nEh1H42F3WlHYXuxKLkm5Bemjdde+GwHYdz5m3fcIWw3HTzfA+y9Of8epGdfSrtYO\nwAyc3Zoy7afPNa4bZXqhJ1Im41rMGieiCuUn4uTPPucIjC0gCkVwvuQr3Elbk55s\nIkczDkseJuadTvG+A1e4uNY2lnRmVhf4g5B90u6CLe2KdbPpifRoKlw9zaUBj4/F\npP5S75TS5l1DfJQIq2lp8RwrH6FvGKLnWlbGeNYX96DDvlA5Sxoxz6a+bTV9OopM\n7mS7eP8zF8lKXYUu8cjIscKm+XqGmyRoPyw3Pp53tew29idRUocVQHGBnlNbpKdd\naQIDAQAB\n-----END PUBLIC KEY-----\n",
3 "privateKey": "-----BEGIN RSA PRIVATE KEY-----\nMIIEpAIBAAKCAQEAqjQGdH6D3naKmSbbr/DfEh1H42F3WlHYXuxKLkm5Bemjdde+\nGwHYdz5m3fcIWw3HTzfA+y9Of8epGdfSrtYOwAyc3Zoy7afPNa4bZXqhJ1Im41rM\nGieiCuUn4uTPPucIjC0gCkVwvuQr3Elbk55sIkczDkseJuadTvG+A1e4uNY2lnRm\nVhf4g5B90u6CLe2KdbPpifRoKlw9zaUBj4/FpP5S75TS5l1DfJQIq2lp8RwrH6Fv\nGKLnWlbGeNYX96DDvlA5Sxoxz6a+bTV9OopM7mS7eP8zF8lKXYUu8cjIscKm+XqG\nmyRoPyw3Pp53tew29idRUocVQHGBnlNbpKddaQIDAQABAoIBAQCnBZawCtbtH/ay\ng+dhqEW/SOyavbKZ92cU/1tsQPxISRYXNjdf2VfK7HmVqC2S7NqBanz+AVZPHmda\n7OfamkSvQbFN5VvEy8ATNV+9HbG3HG78/MT9hZcGigmyJkcZuy4wILgoXCxfpxlD\netla60PB/4yioiRcmEIWjjOgpByphDJ7RuuuptyEvgjUjpPtvHK47O/loaD2HFJk\nbIYbRirbjUjITRjQxGVIvanqiwPG9pB26YDLxDOoXEumcnzRcEFWNdvoleaLgquS\nn/zVsXWEq4+1i7t44DDstWUt/2Bw5ksIkSdayQ6oy3vzre3YFHwvbVZ7qtQQgpru\nx+NIolZhAoGBAN1RgNj8zy9Py3SJdsoXtnuCItfD7eo7LWXUa06cM/NS695Q+/to\naa5i3cJnRlv+b+b3VvnhkhIBLfFQW+hWwPnnxJEehcm09ddN9zbWrZ4Yv9yYu+8d\nTLGyWL8kPFF1dz+29DcrSv3tXEOwxByX/O4U/X/i3wl2WhkybxVFnCuvAoGBAMTf\n91BgLzvcYKOxH+vRPOJY7g2HKGFe35R91M4E+9Eq1rq4LUQHBb3fhRh4+scNu0yb\nNfN1Zdx2nbgCXdTKomF1Ahxp58/A2iU65vVzL6hYfWXEGSmoBqsGCIpIxQ9jgB9k\nCl7t/Ban8Z/ORHTjI9fpHlSZyCWJ3ajepiM2a1ZnAoGAPpDO6wi1DXvyWVSPF1yS\nwuGsNfD2rjPihpoBZ+yypwP3GBcu1QjUb28Vn+KQOmt4eQPNO8DwCVT6BvEfulPk\nJAHISPom+jnFEgPBcmhIFpyKiLNI1bUjvExd2FNHFgQuHP38ligQAC782Un8dtTk\ntO2MKH4bbVJe8CaYzpuqJZMCgYABZyMpBHZxs8FQiUuT75rCdiXEHOlxwC5RrY/d\no/VzaR28mOFhsbcdwkD9iqcm0fc6tYRt5rFCH+pBzGqEwKjljuLj9vE67sHfMAtD\nRn3Zcj/6gKo5PMRHZbSb36bf1DKuhpT4VjPMqYe0PtEIEDJKMJQRwELH2bKlqGiA\nqbucEwKBgQCkS85JnpHEV/tSylsEEn2W3CQCx58zl7iZNV7h/tWMR4AyrcI0HqP6\nllJ7V/Cfw66MgelPnosKgagwLVI6gsqDtjnzYo3XuMRVlYIySJ/jV3eiUNkV2Ky2\nfp/gA9sVgp38QSr+xB9E0LNStcbqDzoCCcDRws/SK7PbkQH9KV47tQ==\n-----END RSA PRIVATE KEY-----"
4}
diff --git a/server/tests/fixtures/avatar-big.png b/server/tests/fixtures/avatar-big.png
deleted file mode 100644
index e593e40da..000000000
--- a/server/tests/fixtures/avatar-big.png
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/avatar-resized-120x120.gif b/server/tests/fixtures/avatar-resized-120x120.gif
deleted file mode 100644
index 81a82189e..000000000
--- a/server/tests/fixtures/avatar-resized-120x120.gif
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/avatar-resized-120x120.png b/server/tests/fixtures/avatar-resized-120x120.png
deleted file mode 100644
index 9d84151f8..000000000
--- a/server/tests/fixtures/avatar-resized-120x120.png
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/avatar-resized-48x48.gif b/server/tests/fixtures/avatar-resized-48x48.gif
deleted file mode 100644
index 5900ff12e..000000000
--- a/server/tests/fixtures/avatar-resized-48x48.gif
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/avatar-resized-48x48.png b/server/tests/fixtures/avatar-resized-48x48.png
deleted file mode 100644
index 9e5f3b490..000000000
--- a/server/tests/fixtures/avatar-resized-48x48.png
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/avatar.gif b/server/tests/fixtures/avatar.gif
deleted file mode 100644
index f29707760..000000000
--- a/server/tests/fixtures/avatar.gif
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/avatar.png b/server/tests/fixtures/avatar.png
deleted file mode 100644
index 4b7fd2c0a..000000000
--- a/server/tests/fixtures/avatar.png
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/avatar2-resized-120x120.png b/server/tests/fixtures/avatar2-resized-120x120.png
deleted file mode 100644
index 44149facb..000000000
--- a/server/tests/fixtures/avatar2-resized-120x120.png
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/avatar2-resized-48x48.png b/server/tests/fixtures/avatar2-resized-48x48.png
deleted file mode 100644
index bb3939b1a..000000000
--- a/server/tests/fixtures/avatar2-resized-48x48.png
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/avatar2.png b/server/tests/fixtures/avatar2.png
deleted file mode 100644
index dae702190..000000000
--- a/server/tests/fixtures/avatar2.png
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/banner-resized.jpg b/server/tests/fixtures/banner-resized.jpg
deleted file mode 100644
index 952732d61..000000000
--- a/server/tests/fixtures/banner-resized.jpg
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/banner.jpg b/server/tests/fixtures/banner.jpg
deleted file mode 100644
index e5f284f59..000000000
--- a/server/tests/fixtures/banner.jpg
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/custom-preview-big.png b/server/tests/fixtures/custom-preview-big.png
deleted file mode 100644
index 03d171af3..000000000
--- a/server/tests/fixtures/custom-preview-big.png
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/custom-preview.jpg b/server/tests/fixtures/custom-preview.jpg
deleted file mode 100644
index 5a039d830..000000000
--- a/server/tests/fixtures/custom-preview.jpg
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/custom-thumbnail-big.jpg b/server/tests/fixtures/custom-thumbnail-big.jpg
deleted file mode 100644
index 08375e425..000000000
--- a/server/tests/fixtures/custom-thumbnail-big.jpg
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/custom-thumbnail.jpg b/server/tests/fixtures/custom-thumbnail.jpg
deleted file mode 100644
index ef818442d..000000000
--- a/server/tests/fixtures/custom-thumbnail.jpg
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/custom-thumbnail.png b/server/tests/fixtures/custom-thumbnail.png
deleted file mode 100644
index 9f34daec1..000000000
--- a/server/tests/fixtures/custom-thumbnail.png
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/exif.jpg b/server/tests/fixtures/exif.jpg
deleted file mode 100644
index 2997b38e9..000000000
--- a/server/tests/fixtures/exif.jpg
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/exif.png b/server/tests/fixtures/exif.png
deleted file mode 100644
index a1a0113f8..000000000
--- a/server/tests/fixtures/exif.png
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/live/0-000067.ts b/server/tests/fixtures/live/0-000067.ts
deleted file mode 100644
index a59f41a63..000000000
--- a/server/tests/fixtures/live/0-000067.ts
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/live/0-000068.ts b/server/tests/fixtures/live/0-000068.ts
deleted file mode 100644
index 83dcbbb4c..000000000
--- a/server/tests/fixtures/live/0-000068.ts
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/live/0-000069.ts b/server/tests/fixtures/live/0-000069.ts
deleted file mode 100644
index cafd4e978..000000000
--- a/server/tests/fixtures/live/0-000069.ts
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/live/0-000070.ts b/server/tests/fixtures/live/0-000070.ts
deleted file mode 100644
index 0936199ea..000000000
--- a/server/tests/fixtures/live/0-000070.ts
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/live/0.m3u8 b/server/tests/fixtures/live/0.m3u8
deleted file mode 100644
index c3be19d26..000000000
--- a/server/tests/fixtures/live/0.m3u8
+++ /dev/null
@@ -1,14 +0,0 @@
1#EXTM3U
2#EXT-X-VERSION:6
3#EXT-X-TARGETDURATION:2
4#EXT-X-MEDIA-SEQUENCE:68
5#EXT-X-INDEPENDENT-SEGMENTS
6#EXTINF:2.000000,
7#EXT-X-PROGRAM-DATE-TIME:2023-04-18T13:38:39.019+0200
80-000068.ts
9#EXTINF:2.000000,
10#EXT-X-PROGRAM-DATE-TIME:2023-04-18T13:38:41.019+0200
110-000069.ts
12#EXTINF:2.000000,
13#EXT-X-PROGRAM-DATE-TIME:2023-04-18T13:38:43.019+0200
140-000070.
diff --git a/server/tests/fixtures/live/1-000067.ts b/server/tests/fixtures/live/1-000067.ts
deleted file mode 100644
index 17db8f81e..000000000
--- a/server/tests/fixtures/live/1-000067.ts
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/live/1-000068.ts b/server/tests/fixtures/live/1-000068.ts
deleted file mode 100644
index f7bb97040..000000000
--- a/server/tests/fixtures/live/1-000068.ts
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/live/1-000069.ts b/server/tests/fixtures/live/1-000069.ts
deleted file mode 100644
index 64c791337..000000000
--- a/server/tests/fixtures/live/1-000069.ts
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/live/1-000070.ts b/server/tests/fixtures/live/1-000070.ts
deleted file mode 100644
index a5f04f109..000000000
--- a/server/tests/fixtures/live/1-000070.ts
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/live/1.m3u8 b/server/tests/fixtures/live/1.m3u8
deleted file mode 100644
index 26d7fa6b0..000000000
--- a/server/tests/fixtures/live/1.m3u8
+++ /dev/null
@@ -1,14 +0,0 @@
1#EXTM3U
2#EXT-X-VERSION:6
3#EXT-X-TARGETDURATION:2
4#EXT-X-MEDIA-SEQUENCE:68
5#EXT-X-INDEPENDENT-SEGMENTS
6#EXTINF:2.000000,
7#EXT-X-PROGRAM-DATE-TIME:2023-04-18T13:38:39.019+0200
81-000068.ts
9#EXTINF:2.000000,
10#EXT-X-PROGRAM-DATE-TIME:2023-04-18T13:38:41.019+0200
111-000069.ts
12#EXTINF:2.000000,
13#EXT-X-PROGRAM-DATE-TIME:2023-04-18T13:38:43.019+0200
141-000070.ts
diff --git a/server/tests/fixtures/live/master.m3u8 b/server/tests/fixtures/live/master.m3u8
deleted file mode 100644
index 7e52f33cf..000000000
--- a/server/tests/fixtures/live/master.m3u8
+++ /dev/null
@@ -1,8 +0,0 @@
1#EXTM3U
2#EXT-X-VERSION:6
3#EXT-X-STREAM-INF:BANDWIDTH=1287342,RESOLUTION=640x360,CODECS="avc1.64001f,mp4a.40.2"
40.m3u8
5
6#EXT-X-STREAM-INF:BANDWIDTH=3051742,RESOLUTION=1280x720,CODECS="avc1.64001f,mp4a.40.2"
71.m3u8
8
diff --git a/server/tests/fixtures/low-bitrate.mp4 b/server/tests/fixtures/low-bitrate.mp4
deleted file mode 100644
index 69004eccc..000000000
--- a/server/tests/fixtures/low-bitrate.mp4
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/peertube-plugin-test-broken/main.js b/server/tests/fixtures/peertube-plugin-test-broken/main.js
deleted file mode 100644
index afdb6f7a0..000000000
--- a/server/tests/fixtures/peertube-plugin-test-broken/main.js
+++ /dev/null
@@ -1,12 +0,0 @@
1async function register (options) {
2 options.unknownFunction()
3}
4
5async function unregister () {
6 return
7}
8
9module.exports = {
10 register,
11 unregister
12}
diff --git a/server/tests/fixtures/peertube-plugin-test-broken/package.json b/server/tests/fixtures/peertube-plugin-test-broken/package.json
deleted file mode 100644
index fd03df216..000000000
--- a/server/tests/fixtures/peertube-plugin-test-broken/package.json
+++ /dev/null
@@ -1,20 +0,0 @@
1{
2 "name": "peertube-plugin-test-broken",
3 "version": "0.0.1",
4 "description": "Plugin test broken",
5 "engine": {
6 "peertube": ">=1.3.0"
7 },
8 "keywords": [
9 "peertube",
10 "plugin"
11 ],
12 "homepage": "https://github.com/Chocobozzz/PeerTube",
13 "author": "Chocobozzz",
14 "bugs": "https://github.com/Chocobozzz/PeerTube/issues",
15 "library": "./main.js",
16 "staticDirs": {},
17 "css": [],
18 "clientScripts": [],
19 "translations": {}
20}
diff --git a/server/tests/fixtures/peertube-plugin-test-external-auth-one/main.js b/server/tests/fixtures/peertube-plugin-test-external-auth-one/main.js
deleted file mode 100644
index 58bc27661..000000000
--- a/server/tests/fixtures/peertube-plugin-test-external-auth-one/main.js
+++ /dev/null
@@ -1,85 +0,0 @@
1async function register ({
2 registerExternalAuth,
3 peertubeHelpers,
4 settingsManager,
5 unregisterExternalAuth
6}) {
7 {
8 const result = registerExternalAuth({
9 authName: 'external-auth-1',
10 authDisplayName: () => 'External Auth 1',
11 onLogout: user => peertubeHelpers.logger.info('On logout %s', user.username),
12 onAuthRequest: (req, res) => {
13 const username = req.query.username
14
15 result.userAuthenticated({
16 req,
17 res,
18 username,
19 email: username + '@example.com'
20 })
21 }
22 })
23 }
24
25 {
26 const result = registerExternalAuth({
27 authName: 'external-auth-2',
28 authDisplayName: () => 'External Auth 2',
29 onAuthRequest: (req, res) => {
30 result.userAuthenticated({
31 req,
32 res,
33 username: 'kefka',
34 email: 'kefka@example.com',
35 role: 0,
36 displayName: 'Kefka Palazzo',
37 adminFlags: 1,
38 videoQuota: 42000,
39 videoQuotaDaily: 42100,
40
41 // Always use new value except for videoQuotaDaily field
42 userUpdater: ({ fieldName, currentValue, newValue }) => {
43 if (fieldName === 'videoQuotaDaily') return currentValue
44
45 return newValue
46 }
47 })
48 },
49 hookTokenValidity: (options) => {
50 if (options.type === 'refresh') {
51 return { valid: false }
52 }
53
54 if (options.type === 'access') {
55 const token = options.token
56 const now = new Date()
57 now.setTime(now.getTime() - 5000)
58
59 const createdAt = new Date(token.createdAt)
60
61 return { valid: createdAt.getTime() >= now.getTime() }
62 }
63
64 return { valid: true }
65 }
66 })
67 }
68
69 settingsManager.onSettingsChange(settings => {
70 if (settings.disableKefka) {
71 unregisterExternalAuth('external-auth-2')
72 }
73 })
74}
75
76async function unregister () {
77 return
78}
79
80module.exports = {
81 register,
82 unregister
83}
84
85// ###########################################################################
diff --git a/server/tests/fixtures/peertube-plugin-test-external-auth-one/package.json b/server/tests/fixtures/peertube-plugin-test-external-auth-one/package.json
deleted file mode 100644
index 22814b047..000000000
--- a/server/tests/fixtures/peertube-plugin-test-external-auth-one/package.json
+++ /dev/null
@@ -1,20 +0,0 @@
1{
2 "name": "peertube-plugin-test-external-auth-one",
3 "version": "0.0.1",
4 "description": "External auth one",
5 "engine": {
6 "peertube": ">=1.3.0"
7 },
8 "keywords": [
9 "peertube",
10 "plugin"
11 ],
12 "homepage": "https://github.com/Chocobozzz/PeerTube",
13 "author": "Chocobozzz",
14 "bugs": "https://github.com/Chocobozzz/PeerTube/issues",
15 "library": "./main.js",
16 "staticDirs": {},
17 "css": [],
18 "clientScripts": [],
19 "translations": {}
20}
diff --git a/server/tests/fixtures/peertube-plugin-test-external-auth-three/main.js b/server/tests/fixtures/peertube-plugin-test-external-auth-three/main.js
deleted file mode 100644
index 30cedccc6..000000000
--- a/server/tests/fixtures/peertube-plugin-test-external-auth-three/main.js
+++ /dev/null
@@ -1,53 +0,0 @@
1async function register ({
2 registerExternalAuth,
3 peertubeHelpers
4}) {
5 {
6 const result = registerExternalAuth({
7 authName: 'external-auth-7',
8 authDisplayName: () => 'External Auth 7',
9 onAuthRequest: (req, res) => {
10 result.userAuthenticated({
11 req,
12 res,
13 username: 'cid',
14 email: 'cid@example.com',
15 displayName: 'Cid Marquez'
16 })
17 },
18 onLogout: (user, req) => {
19 return 'https://example.com/redirectUrl'
20 }
21 })
22 }
23
24 {
25 const result = registerExternalAuth({
26 authName: 'external-auth-8',
27 authDisplayName: () => 'External Auth 8',
28 onAuthRequest: (req, res) => {
29 result.userAuthenticated({
30 req,
31 res,
32 username: 'cid',
33 email: 'cid@example.com',
34 displayName: 'Cid Marquez'
35 })
36 },
37 onLogout: (user, req) => {
38 return 'https://example.com/redirectUrl?access_token=' + req.headers['authorization'].split(' ')[1]
39 }
40 })
41 }
42}
43
44async function unregister () {
45
46}
47
48module.exports = {
49 register,
50 unregister
51}
52
53// ###########################################################################
diff --git a/server/tests/fixtures/peertube-plugin-test-external-auth-three/package.json b/server/tests/fixtures/peertube-plugin-test-external-auth-three/package.json
deleted file mode 100644
index f323d189d..000000000
--- a/server/tests/fixtures/peertube-plugin-test-external-auth-three/package.json
+++ /dev/null
@@ -1,20 +0,0 @@
1{
2 "name": "peertube-plugin-test-external-auth-three",
3 "version": "0.0.1",
4 "description": "External auth three",
5 "engine": {
6 "peertube": ">=1.3.0"
7 },
8 "keywords": [
9 "peertube",
10 "plugin"
11 ],
12 "homepage": "https://github.com/Chocobozzz/PeerTube",
13 "author": "Chocobozzz",
14 "bugs": "https://github.com/Chocobozzz/PeerTube/issues",
15 "library": "./main.js",
16 "staticDirs": {},
17 "css": [],
18 "clientScripts": [],
19 "translations": {}
20}
diff --git a/server/tests/fixtures/peertube-plugin-test-external-auth-two/main.js b/server/tests/fixtures/peertube-plugin-test-external-auth-two/main.js
deleted file mode 100644
index 755dbb62b..000000000
--- a/server/tests/fixtures/peertube-plugin-test-external-auth-two/main.js
+++ /dev/null
@@ -1,95 +0,0 @@
1async function register ({
2 registerExternalAuth,
3 peertubeHelpers
4}) {
5 {
6 const result = registerExternalAuth({
7 authName: 'external-auth-3',
8 authDisplayName: () => 'External Auth 3',
9 onAuthRequest: (req, res) => {
10 result.userAuthenticated({
11 req,
12 res,
13 username: 'cid',
14 email: 'cid@example.com',
15 displayName: 'Cid Marquez'
16 })
17 }
18 })
19 }
20
21 {
22 const result = registerExternalAuth({
23 authName: 'external-auth-4',
24 authDisplayName: () => 'External Auth 4',
25 onAuthRequest: (req, res) => {
26 result.userAuthenticated({
27 req,
28 res,
29 username: 'kefka2',
30 email: 'kefka@example.com',
31 displayName: 'Kefka duplication'
32 })
33 }
34 })
35 }
36
37 {
38 const result = registerExternalAuth({
39 authName: 'external-auth-5',
40 authDisplayName: () => 'External Auth 5',
41 onAuthRequest: (req, res) => {
42 result.userAuthenticated({
43 req,
44 res,
45 username: 'kefka',
46 email: 'kefka@example.com',
47 displayName: 'Kefka duplication'
48 })
49 }
50 })
51 }
52
53 {
54 const result = registerExternalAuth({
55 authName: 'external-auth-6',
56 authDisplayName: () => 'External Auth 6',
57 onAuthRequest: (req, res) => {
58 result.userAuthenticated({
59 req,
60 res,
61 username: 'existing_user',
62 email: 'existing_user@example.com',
63 displayName: 'Existing user'
64 })
65 }
66 })
67 }
68
69 {
70 const result = registerExternalAuth({
71 authName: 'external-auth-7',
72 authDisplayName: () => 'External Auth 7',
73 onAuthRequest: (req, res) => {
74 result.userAuthenticated({
75 req,
76 res,
77 username: 'existing_user2',
78 email: 'custom_email_existing_user2@example.com',
79 displayName: 'Existing user 2'
80 })
81 }
82 })
83 }
84}
85
86async function unregister () {
87 return
88}
89
90module.exports = {
91 register,
92 unregister
93}
94
95// ###########################################################################
diff --git a/server/tests/fixtures/peertube-plugin-test-external-auth-two/package.json b/server/tests/fixtures/peertube-plugin-test-external-auth-two/package.json
deleted file mode 100644
index a5ca4d07a..000000000
--- a/server/tests/fixtures/peertube-plugin-test-external-auth-two/package.json
+++ /dev/null
@@ -1,20 +0,0 @@
1{
2 "name": "peertube-plugin-test-external-auth-two",
3 "version": "0.0.1",
4 "description": "External auth two",
5 "engine": {
6 "peertube": ">=1.3.0"
7 },
8 "keywords": [
9 "peertube",
10 "plugin"
11 ],
12 "homepage": "https://github.com/Chocobozzz/PeerTube",
13 "author": "Chocobozzz",
14 "bugs": "https://github.com/Chocobozzz/PeerTube/issues",
15 "library": "./main.js",
16 "staticDirs": {},
17 "css": [],
18 "clientScripts": [],
19 "translations": {}
20}
diff --git a/server/tests/fixtures/peertube-plugin-test-filter-translations/languages/fr.json b/server/tests/fixtures/peertube-plugin-test-filter-translations/languages/fr.json
deleted file mode 100644
index 52d8313df..000000000
--- a/server/tests/fixtures/peertube-plugin-test-filter-translations/languages/fr.json
+++ /dev/null
@@ -1,3 +0,0 @@
1{
2 "Hello world": "Bonjour le monde"
3}
diff --git a/server/tests/fixtures/peertube-plugin-test-filter-translations/languages/it.json b/server/tests/fixtures/peertube-plugin-test-filter-translations/languages/it.json
deleted file mode 100644
index 9e187d83b..000000000
--- a/server/tests/fixtures/peertube-plugin-test-filter-translations/languages/it.json
+++ /dev/null
@@ -1,3 +0,0 @@
1{
2 "Hello world": "Ciao, mondo!"
3}
diff --git a/server/tests/fixtures/peertube-plugin-test-filter-translations/main.js b/server/tests/fixtures/peertube-plugin-test-filter-translations/main.js
deleted file mode 100644
index 71c11b2ba..000000000
--- a/server/tests/fixtures/peertube-plugin-test-filter-translations/main.js
+++ /dev/null
@@ -1,21 +0,0 @@
1async function register ({ registerHook, registerSetting, settingsManager, storageManager, peertubeHelpers }) {
2 registerHook({
3 target: 'filter:api.videos.list.params',
4 handler: obj => addToCount(obj)
5 })
6}
7
8async function unregister () {
9 return
10}
11
12module.exports = {
13 register,
14 unregister
15}
16
17// ############################################################################
18
19function addToCount (obj) {
20 return Object.assign({}, obj, { count: obj.count + 1 })
21}
diff --git a/server/tests/fixtures/peertube-plugin-test-filter-translations/package.json b/server/tests/fixtures/peertube-plugin-test-filter-translations/package.json
deleted file mode 100644
index 2adce4743..000000000
--- a/server/tests/fixtures/peertube-plugin-test-filter-translations/package.json
+++ /dev/null
@@ -1,23 +0,0 @@
1{
2 "name": "peertube-plugin-test-filter-translations",
3 "version": "0.0.1",
4 "description": "Plugin test filter and translations",
5 "engine": {
6 "peertube": ">=1.3.0"
7 },
8 "keywords": [
9 "peertube",
10 "plugin"
11 ],
12 "homepage": "https://github.com/Chocobozzz/PeerTube",
13 "author": "Chocobozzz",
14 "bugs": "https://github.com/Chocobozzz/PeerTube/issues",
15 "library": "./main.js",
16 "staticDirs": {},
17 "css": [],
18 "clientScripts": [],
19 "translations": {
20 "fr-FR": "./languages/fr.json",
21 "it-IT": "./languages/it.json"
22 }
23}
diff --git a/server/tests/fixtures/peertube-plugin-test-five/main.js b/server/tests/fixtures/peertube-plugin-test-five/main.js
deleted file mode 100644
index 07dd18654..000000000
--- a/server/tests/fixtures/peertube-plugin-test-five/main.js
+++ /dev/null
@@ -1,23 +0,0 @@
1async function register ({
2 getRouter
3}) {
4 const router = getRouter()
5 router.get('/ping', (req, res) => res.json({ message: 'pong' }))
6
7 router.get('/is-authenticated', (req, res) => res.json({ isAuthenticated: res.locals.authenticated }))
8
9 router.post('/form/post/mirror', (req, res) => {
10 res.json(req.body)
11 })
12}
13
14async function unregister () {
15 return
16}
17
18module.exports = {
19 register,
20 unregister
21}
22
23// ###########################################################################
diff --git a/server/tests/fixtures/peertube-plugin-test-five/package.json b/server/tests/fixtures/peertube-plugin-test-five/package.json
deleted file mode 100644
index 1f5d65d9d..000000000
--- a/server/tests/fixtures/peertube-plugin-test-five/package.json
+++ /dev/null
@@ -1,20 +0,0 @@
1{
2 "name": "peertube-plugin-test-five",
3 "version": "0.0.1",
4 "description": "Plugin test 5",
5 "engine": {
6 "peertube": ">=1.3.0"
7 },
8 "keywords": [
9 "peertube",
10 "plugin"
11 ],
12 "homepage": "https://github.com/Chocobozzz/PeerTube",
13 "author": "Chocobozzz",
14 "bugs": "https://github.com/Chocobozzz/PeerTube/issues",
15 "library": "./main.js",
16 "staticDirs": {},
17 "css": [],
18 "clientScripts": [],
19 "translations": {}
20}
diff --git a/server/tests/fixtures/peertube-plugin-test-four/main.js b/server/tests/fixtures/peertube-plugin-test-four/main.js
deleted file mode 100644
index b10177b45..000000000
--- a/server/tests/fixtures/peertube-plugin-test-four/main.js
+++ /dev/null
@@ -1,201 +0,0 @@
1async function register ({
2 peertubeHelpers,
3 registerHook,
4 getRouter
5}) {
6 const logger = peertubeHelpers.logger
7
8 logger.info('Hello world from plugin four')
9
10 {
11 const username = 'root'
12 const results = await peertubeHelpers.database.query(
13 'SELECT "email" from "user" WHERE "username" = $username',
14 {
15 type: 'SELECT',
16 bind: { username }
17 }
18 )
19
20 logger.info('root email is ' + results[0]['email'])
21 }
22
23 {
24 registerHook({
25 target: 'action:api.video.viewed',
26 handler: async ({ video }) => {
27 const videoFromDB1 = await peertubeHelpers.videos.loadByUrl(video.url)
28 const videoFromDB2 = await peertubeHelpers.videos.loadByIdOrUUID(video.id)
29 const videoFromDB3 = await peertubeHelpers.videos.loadByIdOrUUID(video.uuid)
30
31 if (videoFromDB1.uuid !== videoFromDB2.uuid || videoFromDB2.uuid !== videoFromDB3.uuid) return
32
33 logger.info('video from DB uuid is %s.', videoFromDB1.uuid)
34
35 await peertubeHelpers.videos.removeVideo(video.id)
36
37 logger.info('Video deleted by plugin four.')
38 }
39 })
40 }
41
42 {
43 const serverActor = await peertubeHelpers.server.getServerActor()
44 logger.info('server actor name is %s', serverActor.preferredUsername)
45 }
46
47 {
48 logger.info('server url is %s', peertubeHelpers.config.getWebserverUrl())
49 }
50
51 {
52 const actions = {
53 blockServer,
54 unblockServer,
55 blockAccount,
56 unblockAccount,
57 blacklist,
58 unblacklist
59 }
60
61 const router = getRouter()
62 router.post('/commander', async (req, res) => {
63 try {
64 await actions[req.body.command](peertubeHelpers, req.body)
65
66 res.sendStatus(204)
67 } catch (err) {
68 logger.error('Error in commander.', { err })
69 res.sendStatus(500)
70 }
71 })
72
73 router.get('/server-config', async (req, res) => {
74 const serverConfig = await peertubeHelpers.config.getServerConfig()
75
76 return res.json({ serverConfig })
77 })
78
79 router.get('/server-listening-config', async (req, res) => {
80 const config = await peertubeHelpers.config.getServerListeningConfig()
81
82 return res.json({ config })
83 })
84
85 router.get('/static-route', async (req, res) => {
86 const staticRoute = peertubeHelpers.plugin.getBaseStaticRoute()
87
88 return res.json({ staticRoute })
89 })
90
91 router.get('/router-route', async (req, res) => {
92 const routerRoute = peertubeHelpers.plugin.getBaseRouterRoute()
93
94 return res.json({ routerRoute })
95 })
96
97 router.get('/user/:id', async (req, res) => {
98 const user = await peertubeHelpers.user.loadById(req.params.id)
99 if (!user) return res.status(404).end()
100
101 return res.json({
102 username: user.username
103 })
104 })
105
106 router.get('/user', async (req, res) => {
107 const user = await peertubeHelpers.user.getAuthUser(res)
108 if (!user) return res.sendStatus(404)
109
110 const isAdmin = user.role === 0
111 const isModerator = user.role === 1
112 const isUser = user.role === 2
113
114 return res.json({
115 id: user.id,
116 username: user.username,
117 displayName: user.Account.name,
118 isAdmin,
119 isModerator,
120 isUser
121 })
122 })
123
124 router.get('/video-files/:id', async (req, res) => {
125 const details = await peertubeHelpers.videos.getFiles(req.params.id)
126 if (!details) return res.sendStatus(404)
127
128 return res.json(details)
129 })
130
131 router.get('/ffprobe', async (req, res) => {
132 const result = await peertubeHelpers.videos.ffprobe(req.query.path)
133 if (!result) return res.sendStatus(404)
134
135 return res.json(result)
136 })
137
138 router.post('/send-notification', async (req, res) => {
139 peertubeHelpers.socket.sendNotification(req.body.userId, {
140 type: 1,
141 userId: req.body.userId
142 })
143
144 return res.sendStatus(201)
145 })
146
147 router.post('/send-video-live-new-state/:uuid', async (req, res) => {
148 const video = await peertubeHelpers.videos.loadByIdOrUUID(req.params.uuid)
149 peertubeHelpers.socket.sendVideoLiveNewState(video)
150
151 return res.sendStatus(201)
152 })
153 }
154
155}
156
157async function unregister () {
158 return
159}
160
161module.exports = {
162 register,
163 unregister
164}
165
166// ###########################################################################
167
168async function blockServer (peertubeHelpers, body) {
169 const serverActor = await peertubeHelpers.server.getServerActor()
170
171 await peertubeHelpers.moderation.blockServer({ byAccountId: serverActor.Account.id, hostToBlock: body.hostToBlock })
172}
173
174async function unblockServer (peertubeHelpers, body) {
175 const serverActor = await peertubeHelpers.server.getServerActor()
176
177 await peertubeHelpers.moderation.unblockServer({ byAccountId: serverActor.Account.id, hostToUnblock: body.hostToUnblock })
178}
179
180async function blockAccount (peertubeHelpers, body) {
181 const serverActor = await peertubeHelpers.server.getServerActor()
182
183 await peertubeHelpers.moderation.blockAccount({ byAccountId: serverActor.Account.id, handleToBlock: body.handleToBlock })
184}
185
186async function unblockAccount (peertubeHelpers, body) {
187 const serverActor = await peertubeHelpers.server.getServerActor()
188
189 await peertubeHelpers.moderation.unblockAccount({ byAccountId: serverActor.Account.id, handleToUnblock: body.handleToUnblock })
190}
191
192async function blacklist (peertubeHelpers, body) {
193 await peertubeHelpers.moderation.blacklistVideo({
194 videoIdOrUUID: body.videoUUID,
195 createOptions: body
196 })
197}
198
199async function unblacklist (peertubeHelpers, body) {
200 await peertubeHelpers.moderation.unblacklistVideo({ videoIdOrUUID: body.videoUUID })
201}
diff --git a/server/tests/fixtures/peertube-plugin-test-four/package.json b/server/tests/fixtures/peertube-plugin-test-four/package.json
deleted file mode 100644
index dda3c7f37..000000000
--- a/server/tests/fixtures/peertube-plugin-test-four/package.json
+++ /dev/null
@@ -1,20 +0,0 @@
1{
2 "name": "peertube-plugin-test-four",
3 "version": "0.0.1",
4 "description": "Plugin test 4",
5 "engine": {
6 "peertube": ">=1.3.0"
7 },
8 "keywords": [
9 "peertube",
10 "plugin"
11 ],
12 "homepage": "https://github.com/Chocobozzz/PeerTube",
13 "author": "Chocobozzz",
14 "bugs": "https://github.com/Chocobozzz/PeerTube/issues",
15 "library": "./main.js",
16 "staticDirs": {},
17 "css": [],
18 "clientScripts": [],
19 "translations": {}
20}
diff --git a/server/tests/fixtures/peertube-plugin-test-id-pass-auth-one/main.js b/server/tests/fixtures/peertube-plugin-test-id-pass-auth-one/main.js
deleted file mode 100644
index f58faa847..000000000
--- a/server/tests/fixtures/peertube-plugin-test-id-pass-auth-one/main.js
+++ /dev/null
@@ -1,69 +0,0 @@
1async function register ({
2 registerIdAndPassAuth,
3 peertubeHelpers,
4 settingsManager,
5 unregisterIdAndPassAuth
6}) {
7 registerIdAndPassAuth({
8 authName: 'spyro-auth',
9
10 onLogout: () => {
11 peertubeHelpers.logger.info('On logout for auth 1 - 1')
12 },
13
14 getWeight: () => 15,
15
16 login (body) {
17 if (body.id === 'spyro' && body.password === 'spyro password') {
18 return Promise.resolve({
19 username: 'spyro',
20 email: 'spyro@example.com',
21 role: 2,
22 displayName: 'Spyro the Dragon'
23 })
24 }
25
26 return null
27 }
28 })
29
30 registerIdAndPassAuth({
31 authName: 'crash-auth',
32
33 onLogout: () => {
34 peertubeHelpers.logger.info('On logout for auth 1 - 2')
35 },
36
37 getWeight: () => 50,
38
39 login (body) {
40 if (body.id === 'crash' && body.password === 'crash password') {
41 return Promise.resolve({
42 username: 'crash',
43 email: 'crash@example.com',
44 role: 1,
45 displayName: 'Crash Bandicoot'
46 })
47 }
48
49 return null
50 }
51 })
52
53 settingsManager.onSettingsChange(settings => {
54 if (settings.disableSpyro) {
55 unregisterIdAndPassAuth('spyro-auth')
56 }
57 })
58}
59
60async function unregister () {
61 return
62}
63
64module.exports = {
65 register,
66 unregister
67}
68
69// ###########################################################################
diff --git a/server/tests/fixtures/peertube-plugin-test-id-pass-auth-one/package.json b/server/tests/fixtures/peertube-plugin-test-id-pass-auth-one/package.json
deleted file mode 100644
index f8ad18a90..000000000
--- a/server/tests/fixtures/peertube-plugin-test-id-pass-auth-one/package.json
+++ /dev/null
@@ -1,20 +0,0 @@
1{
2 "name": "peertube-plugin-test-id-pass-auth-one",
3 "version": "0.0.1",
4 "description": "Id and pass auth one",
5 "engine": {
6 "peertube": ">=1.3.0"
7 },
8 "keywords": [
9 "peertube",
10 "plugin"
11 ],
12 "homepage": "https://github.com/Chocobozzz/PeerTube",
13 "author": "Chocobozzz",
14 "bugs": "https://github.com/Chocobozzz/PeerTube/issues",
15 "library": "./main.js",
16 "staticDirs": {},
17 "css": [],
18 "clientScripts": [],
19 "translations": {}
20}
diff --git a/server/tests/fixtures/peertube-plugin-test-id-pass-auth-three/main.js b/server/tests/fixtures/peertube-plugin-test-id-pass-auth-three/main.js
deleted file mode 100644
index 1200acfbd..000000000
--- a/server/tests/fixtures/peertube-plugin-test-id-pass-auth-three/main.js
+++ /dev/null
@@ -1,106 +0,0 @@
1async function register ({
2 registerIdAndPassAuth,
3 peertubeHelpers
4}) {
5 registerIdAndPassAuth({
6 authName: 'laguna-bad-auth',
7
8 onLogout: () => {
9 peertubeHelpers.logger.info('On logout for auth 3 - 1')
10 },
11
12 getWeight: () => 5,
13
14 login (body) {
15 if (body.id === 'laguna' && body.password === 'laguna password') {
16 return Promise.resolve({
17 username: 'laguna',
18 email: 'laguna@example.com',
19 displayName: 'Laguna Loire'
20 })
21 }
22
23 return null
24 }
25 })
26
27 registerIdAndPassAuth({
28 authName: 'ward-auth',
29
30 getWeight: () => 5,
31
32 login (body) {
33 if (body.id === 'ward') {
34 return Promise.resolve({
35 username: '-ward-42',
36 email: 'ward@example.com'
37 })
38 }
39
40 return null
41 }
42 })
43
44 registerIdAndPassAuth({
45 authName: 'kiros-auth',
46
47 getWeight: () => 5,
48
49 login (body) {
50 if (body.id === 'kiros') {
51 return Promise.resolve({
52 username: 'kiros',
53 email: 'kiros@example.com',
54 displayName: 'a'.repeat(5000)
55 })
56 }
57
58 return null
59 }
60 })
61
62 registerIdAndPassAuth({
63 authName: 'raine-auth',
64
65 getWeight: () => 5,
66
67 login (body) {
68 if (body.id === 'raine') {
69 return Promise.resolve({
70 username: 'raine',
71 email: 'raine@example.com',
72 role: 42
73 })
74 }
75
76 return null
77 }
78 })
79
80 registerIdAndPassAuth({
81 authName: 'ellone-auth',
82
83 getWeight: () => 5,
84
85 login (body) {
86 if (body.id === 'ellone') {
87 return Promise.resolve({
88 username: 'ellone'
89 })
90 }
91
92 return null
93 }
94 })
95}
96
97async function unregister () {
98 return
99}
100
101module.exports = {
102 register,
103 unregister
104}
105
106// ###########################################################################
diff --git a/server/tests/fixtures/peertube-plugin-test-id-pass-auth-three/package.json b/server/tests/fixtures/peertube-plugin-test-id-pass-auth-three/package.json
deleted file mode 100644
index f9f107b1a..000000000
--- a/server/tests/fixtures/peertube-plugin-test-id-pass-auth-three/package.json
+++ /dev/null
@@ -1,20 +0,0 @@
1{
2 "name": "peertube-plugin-test-id-pass-auth-three",
3 "version": "0.0.1",
4 "description": "Id and pass auth three",
5 "engine": {
6 "peertube": ">=1.3.0"
7 },
8 "keywords": [
9 "peertube",
10 "plugin"
11 ],
12 "homepage": "https://github.com/Chocobozzz/PeerTube",
13 "author": "Chocobozzz",
14 "bugs": "https://github.com/Chocobozzz/PeerTube/issues",
15 "library": "./main.js",
16 "staticDirs": {},
17 "css": [],
18 "clientScripts": [],
19 "translations": {}
20}
diff --git a/server/tests/fixtures/peertube-plugin-test-id-pass-auth-two/main.js b/server/tests/fixtures/peertube-plugin-test-id-pass-auth-two/main.js
deleted file mode 100644
index fad5abf60..000000000
--- a/server/tests/fixtures/peertube-plugin-test-id-pass-auth-two/main.js
+++ /dev/null
@@ -1,65 +0,0 @@
1async function register ({
2 registerIdAndPassAuth,
3 peertubeHelpers
4}) {
5 registerIdAndPassAuth({
6 authName: 'laguna-auth',
7
8 onLogout: () => {
9 peertubeHelpers.logger.info('On logout for auth 2 - 1')
10 },
11
12 getWeight: () => 30,
13
14 hookTokenValidity: (options) => {
15 if (options.type === 'refresh') {
16 return { valid: false }
17 }
18
19 if (options.type === 'access') {
20 const token = options.token
21 const now = new Date()
22 now.setTime(now.getTime() - 5000)
23
24 const createdAt = new Date(token.createdAt)
25
26 return { valid: createdAt.getTime() >= now.getTime() }
27 }
28
29 return { valid: true }
30 },
31
32 login (body) {
33 if (body.id === 'laguna' && body.password === 'laguna password') {
34 return Promise.resolve({
35 username: 'laguna',
36 email: 'laguna@example.com',
37 displayName: 'Laguna Loire',
38 adminFlags: 1,
39 videoQuota: 42000,
40 videoQuotaDaily: 42100,
41
42 // Always use new value except for videoQuotaDaily field
43 userUpdater: ({ fieldName, currentValue, newValue }) => {
44 if (fieldName === 'videoQuotaDaily') return currentValue
45
46 return newValue
47 }
48 })
49 }
50
51 return null
52 }
53 })
54}
55
56async function unregister () {
57 return
58}
59
60module.exports = {
61 register,
62 unregister
63}
64
65// ###########################################################################
diff --git a/server/tests/fixtures/peertube-plugin-test-id-pass-auth-two/package.json b/server/tests/fixtures/peertube-plugin-test-id-pass-auth-two/package.json
deleted file mode 100644
index 5df15fac1..000000000
--- a/server/tests/fixtures/peertube-plugin-test-id-pass-auth-two/package.json
+++ /dev/null
@@ -1,20 +0,0 @@
1{
2 "name": "peertube-plugin-test-id-pass-auth-two",
3 "version": "0.0.1",
4 "description": "Id and pass auth two",
5 "engine": {
6 "peertube": ">=1.3.0"
7 },
8 "keywords": [
9 "peertube",
10 "plugin"
11 ],
12 "homepage": "https://github.com/Chocobozzz/PeerTube",
13 "author": "Chocobozzz",
14 "bugs": "https://github.com/Chocobozzz/PeerTube/issues",
15 "library": "./main.js",
16 "staticDirs": {},
17 "css": [],
18 "clientScripts": [],
19 "translations": {}
20}
diff --git a/server/tests/fixtures/peertube-plugin-test-native/main.js b/server/tests/fixtures/peertube-plugin-test-native/main.js
deleted file mode 100644
index 0390faea9..000000000
--- a/server/tests/fixtures/peertube-plugin-test-native/main.js
+++ /dev/null
@@ -1,21 +0,0 @@
1const print = require('a-native-example')
2
3async function register ({ getRouter }) {
4 print('hello world')
5
6 const router = getRouter()
7
8 router.get('/', (req, res) => {
9 print('hello world')
10 res.sendStatus(204)
11 })
12}
13
14async function unregister () {
15 return
16}
17
18module.exports = {
19 register,
20 unregister
21}
diff --git a/server/tests/fixtures/peertube-plugin-test-native/package.json b/server/tests/fixtures/peertube-plugin-test-native/package.json
deleted file mode 100644
index a6525720b..000000000
--- a/server/tests/fixtures/peertube-plugin-test-native/package.json
+++ /dev/null
@@ -1,23 +0,0 @@
1{
2 "name": "peertube-plugin-test-native",
3 "version": "0.0.1",
4 "description": "Plugin test-native",
5 "engine": {
6 "peertube": ">=4.3.0"
7 },
8 "keywords": [
9 "peertube",
10 "plugin"
11 ],
12 "homepage": "https://github.com/Chocobozzz/PeerTube",
13 "author": "Chocobozzz",
14 "bugs": "https://github.com/Chocobozzz/PeerTube/issues",
15 "library": "./main.js",
16 "staticDirs": {},
17 "css": [],
18 "clientScripts": [],
19 "translations": {},
20 "dependencies": {
21 "a-native-example": "^1.0.0"
22 }
23}
diff --git a/server/tests/fixtures/peertube-plugin-test-podcast-custom-tags/main.js b/server/tests/fixtures/peertube-plugin-test-podcast-custom-tags/main.js
deleted file mode 100644
index ada4a70fe..000000000
--- a/server/tests/fixtures/peertube-plugin-test-podcast-custom-tags/main.js
+++ /dev/null
@@ -1,82 +0,0 @@
1async function register ({ registerHook, registerSetting, settingsManager, storageManager, peertubeHelpers }) {
2 registerHook({
3 target: 'filter:feed.podcast.rss.create-custom-xmlns.result',
4 handler: (result, params) => {
5 return result.concat([
6 {
7 name: "biz",
8 value: "https://example.com/biz-xmlns",
9 },
10 ])
11 }
12 })
13
14 registerHook({
15 target: 'filter:feed.podcast.channel.create-custom-tags.result',
16 handler: (result, params) => {
17 const { videoChannel } = params
18 return result.concat([
19 {
20 name: "fooTag",
21 attributes: { "bar": "baz" },
22 value: "42",
23 },
24 {
25 name: "biz:videoChannel",
26 attributes: { "name": videoChannel.name, "id": videoChannel.id },
27 },
28 {
29 name: "biz:buzzItem",
30 value: [
31 {
32 name: "nestedTag",
33 value: "example nested tag",
34 },
35 ],
36 },
37 ])
38 }
39 })
40
41 registerHook({
42 target: 'filter:feed.podcast.video.create-custom-tags.result',
43 handler: (result, params) => {
44 const { video, liveItem } = params
45 return result.concat([
46 {
47 name: "fizzTag",
48 attributes: { "bar": "baz" },
49 value: "21",
50 },
51 {
52 name: "biz:video",
53 attributes: { "name": video.name, "id": video.id, "isLive": liveItem },
54 },
55 {
56 name: "biz:buzz",
57 value: [
58 {
59 name: "nestedTag",
60 value: "example nested tag",
61 },
62 ],
63 }
64 ])
65 }
66 })
67}
68
69async function unregister () {
70 return
71}
72
73module.exports = {
74 register,
75 unregister
76}
77
78// ############################################################################
79
80function addToCount (obj) {
81 return Object.assign({}, obj, { count: obj.count + 1 })
82}
diff --git a/server/tests/fixtures/peertube-plugin-test-podcast-custom-tags/package.json b/server/tests/fixtures/peertube-plugin-test-podcast-custom-tags/package.json
deleted file mode 100644
index 0f5a05a79..000000000
--- a/server/tests/fixtures/peertube-plugin-test-podcast-custom-tags/package.json
+++ /dev/null
@@ -1,19 +0,0 @@
1{
2 "name": "peertube-plugin-test-podcast-custom-tags",
3 "version": "0.0.1",
4 "description": "Plugin test custom tags in Podcast RSS feeds",
5 "engine": {
6 "peertube": ">=1.3.0"
7 },
8 "keywords": [
9 "peertube",
10 "plugin"
11 ],
12 "homepage": "https://github.com/Chocobozzz/PeerTube",
13 "author": "Chocobozzz",
14 "bugs": "https://github.com/Chocobozzz/PeerTube/issues",
15 "library": "./main.js",
16 "staticDirs": {},
17 "css": [],
18 "clientScripts": []
19}
diff --git a/server/tests/fixtures/peertube-plugin-test-six/main.js b/server/tests/fixtures/peertube-plugin-test-six/main.js
deleted file mode 100644
index 243b041e7..000000000
--- a/server/tests/fixtures/peertube-plugin-test-six/main.js
+++ /dev/null
@@ -1,46 +0,0 @@
1const fs = require('fs')
2const path = require('path')
3
4async function register ({
5 storageManager,
6 peertubeHelpers,
7 getRouter
8}) {
9 const { logger } = peertubeHelpers
10
11 {
12 await storageManager.storeData('superkey', { value: 'toto' })
13 await storageManager.storeData('anotherkey', { value: 'toto2' })
14 await storageManager.storeData('storedArrayKey', ['toto', 'toto2'])
15
16 const result = await storageManager.getData('superkey')
17 logger.info('superkey stored value is %s', result.value)
18
19 const storedArrayValue = await storageManager.getData('storedArrayKey')
20 logger.info('storedArrayKey isArray is %s', Array.isArray(storedArrayValue) ? 'true' : 'false')
21 logger.info('storedArrayKey stored value is %s', storedArrayValue.join(', '))
22 }
23
24 {
25 getRouter().get('/create-file', async (req, res) => {
26 const basePath = peertubeHelpers.plugin.getDataDirectoryPath()
27
28 fs.writeFile(path.join(basePath, 'Aladdin.txt'), 'Prince Ali', function (err) {
29 if (err) return res.sendStatus(500)
30
31 res.sendStatus(200)
32 })
33 })
34 }
35}
36
37async function unregister () {
38 return
39}
40
41module.exports = {
42 register,
43 unregister
44}
45
46// ###########################################################################
diff --git a/server/tests/fixtures/peertube-plugin-test-six/package.json b/server/tests/fixtures/peertube-plugin-test-six/package.json
deleted file mode 100644
index 8c97826b0..000000000
--- a/server/tests/fixtures/peertube-plugin-test-six/package.json
+++ /dev/null
@@ -1,20 +0,0 @@
1{
2 "name": "peertube-plugin-test-six",
3 "version": "0.0.1",
4 "description": "Plugin test 6",
5 "engine": {
6 "peertube": ">=1.3.0"
7 },
8 "keywords": [
9 "peertube",
10 "plugin"
11 ],
12 "homepage": "https://github.com/Chocobozzz/PeerTube",
13 "author": "Chocobozzz",
14 "bugs": "https://github.com/Chocobozzz/PeerTube/issues",
15 "library": "./main.js",
16 "staticDirs": {},
17 "css": [],
18 "clientScripts": [],
19 "translations": {}
20}
diff --git a/server/tests/fixtures/peertube-plugin-test-transcoding-one/main.js b/server/tests/fixtures/peertube-plugin-test-transcoding-one/main.js
deleted file mode 100644
index c4ae777f5..000000000
--- a/server/tests/fixtures/peertube-plugin-test-transcoding-one/main.js
+++ /dev/null
@@ -1,92 +0,0 @@
1async function register ({ transcodingManager }) {
2
3 // Output options
4 {
5 {
6 const builder = () => {
7 return {
8 outputOptions: [
9 '-r 10'
10 ]
11 }
12 }
13
14 transcodingManager.addVODProfile('libx264', 'low-vod', builder)
15 }
16
17 {
18 const builder = (options) => {
19 return {
20 outputOptions: [
21 '-r:' + options.streamNum + ' 50'
22 ]
23 }
24 }
25
26 transcodingManager.addLiveProfile('libx264', 'high-live', builder)
27 }
28 }
29
30 // Input options
31 {
32 {
33 const builder = () => {
34 return {
35 inputOptions: [
36 '-r 5'
37 ]
38 }
39 }
40
41 transcodingManager.addVODProfile('libx264', 'input-options-vod', builder)
42 }
43
44 {
45 const builder = () => {
46 return {
47 inputOptions: [
48 '-r 50'
49 ]
50 }
51 }
52
53 transcodingManager.addLiveProfile('libx264', 'input-options-live', builder)
54 }
55 }
56
57 // Scale filters
58 {
59 {
60 const builder = () => {
61 return {
62 scaleFilter: {
63 name: 'Glomgold'
64 }
65 }
66 }
67
68 transcodingManager.addVODProfile('libx264', 'bad-scale-vod', builder)
69 }
70
71 {
72 const builder = () => {
73 return {
74 scaleFilter: {
75 name: 'Flintheart'
76 }
77 }
78 }
79
80 transcodingManager.addLiveProfile('libx264', 'bad-scale-live', builder)
81 }
82 }
83}
84
85async function unregister () {
86 return
87}
88
89module.exports = {
90 register,
91 unregister
92}
diff --git a/server/tests/fixtures/peertube-plugin-test-transcoding-one/package.json b/server/tests/fixtures/peertube-plugin-test-transcoding-one/package.json
deleted file mode 100644
index bedbfa051..000000000
--- a/server/tests/fixtures/peertube-plugin-test-transcoding-one/package.json
+++ /dev/null
@@ -1,20 +0,0 @@
1{
2 "name": "peertube-plugin-test-transcoding-one",
3 "version": "0.0.1",
4 "description": "Plugin test transcoding 1",
5 "engine": {
6 "peertube": ">=1.3.0"
7 },
8 "keywords": [
9 "peertube",
10 "plugin"
11 ],
12 "homepage": "https://github.com/Chocobozzz/PeerTube",
13 "author": "Chocobozzz",
14 "bugs": "https://github.com/Chocobozzz/PeerTube/issues",
15 "library": "./main.js",
16 "staticDirs": {},
17 "css": [],
18 "clientScripts": [],
19 "translations": {}
20}
diff --git a/server/tests/fixtures/peertube-plugin-test-transcoding-two/main.js b/server/tests/fixtures/peertube-plugin-test-transcoding-two/main.js
deleted file mode 100644
index a914bce49..000000000
--- a/server/tests/fixtures/peertube-plugin-test-transcoding-two/main.js
+++ /dev/null
@@ -1,38 +0,0 @@
1async function register ({ transcodingManager }) {
2
3 {
4 const builder = () => {
5 return {
6 outputOptions: []
7 }
8 }
9
10 transcodingManager.addVODProfile('libopus', 'test-vod-profile', builder)
11 transcodingManager.addVODProfile('libvpx-vp9', 'test-vod-profile', builder)
12
13 transcodingManager.addVODEncoderPriority('audio', 'libopus', 1000)
14 transcodingManager.addVODEncoderPriority('video', 'libvpx-vp9', 1000)
15 }
16
17 {
18 const builder = (options) => {
19 return {
20 outputOptions: [
21 '-b:' + options.streamNum + ' 10K'
22 ]
23 }
24 }
25
26 transcodingManager.addLiveProfile('libopus', 'test-live-profile', builder)
27 transcodingManager.addLiveEncoderPriority('audio', 'libopus', 1000)
28 }
29}
30
31async function unregister () {
32 return
33}
34
35module.exports = {
36 register,
37 unregister
38}
diff --git a/server/tests/fixtures/peertube-plugin-test-transcoding-two/package.json b/server/tests/fixtures/peertube-plugin-test-transcoding-two/package.json
deleted file mode 100644
index 34be0454b..000000000
--- a/server/tests/fixtures/peertube-plugin-test-transcoding-two/package.json
+++ /dev/null
@@ -1,20 +0,0 @@
1{
2 "name": "peertube-plugin-test-transcoding-two",
3 "version": "0.0.1",
4 "description": "Plugin test transcoding 2",
5 "engine": {
6 "peertube": ">=1.3.0"
7 },
8 "keywords": [
9 "peertube",
10 "plugin"
11 ],
12 "homepage": "https://github.com/Chocobozzz/PeerTube",
13 "author": "Chocobozzz",
14 "bugs": "https://github.com/Chocobozzz/PeerTube/issues",
15 "library": "./main.js",
16 "staticDirs": {},
17 "css": [],
18 "clientScripts": [],
19 "translations": {}
20}
diff --git a/server/tests/fixtures/peertube-plugin-test-unloading/lib.js b/server/tests/fixtures/peertube-plugin-test-unloading/lib.js
deleted file mode 100644
index f57e7cb01..000000000
--- a/server/tests/fixtures/peertube-plugin-test-unloading/lib.js
+++ /dev/null
@@ -1,2 +0,0 @@
1const d = new Date()
2exports.value = d.getTime()
diff --git a/server/tests/fixtures/peertube-plugin-test-unloading/main.js b/server/tests/fixtures/peertube-plugin-test-unloading/main.js
deleted file mode 100644
index 5c8457cef..000000000
--- a/server/tests/fixtures/peertube-plugin-test-unloading/main.js
+++ /dev/null
@@ -1,14 +0,0 @@
1const lib = require('./lib')
2
3async function register ({ getRouter }) {
4 const router = getRouter()
5 router.get('/get', (req, res) => res.json({ message: lib.value }))
6}
7
8async function unregister () {
9}
10
11module.exports = {
12 register,
13 unregister
14}
diff --git a/server/tests/fixtures/peertube-plugin-test-unloading/package.json b/server/tests/fixtures/peertube-plugin-test-unloading/package.json
deleted file mode 100644
index 7076d4b6f..000000000
--- a/server/tests/fixtures/peertube-plugin-test-unloading/package.json
+++ /dev/null
@@ -1,20 +0,0 @@
1{
2 "name": "peertube-plugin-test-unloading",
3 "version": "0.0.1",
4 "description": "Plugin test (modules unloading)",
5 "engine": {
6 "peertube": ">=1.3.0"
7 },
8 "keywords": [
9 "peertube",
10 "plugin"
11 ],
12 "homepage": "https://github.com/Chocobozzz/PeerTube",
13 "author": "Chocobozzz",
14 "bugs": "https://github.com/Chocobozzz/PeerTube/issues",
15 "library": "./main.js",
16 "staticDirs": {},
17 "css": [],
18 "clientScripts": [],
19 "translations": {}
20}
diff --git a/server/tests/fixtures/peertube-plugin-test-video-constants/main.js b/server/tests/fixtures/peertube-plugin-test-video-constants/main.js
deleted file mode 100644
index 06527bd35..000000000
--- a/server/tests/fixtures/peertube-plugin-test-video-constants/main.js
+++ /dev/null
@@ -1,46 +0,0 @@
1async function register ({
2 videoCategoryManager,
3 videoLicenceManager,
4 videoLanguageManager,
5 videoPrivacyManager,
6 playlistPrivacyManager,
7 getRouter
8}) {
9 videoLanguageManager.addConstant('al_bhed', 'Al Bhed')
10 videoLanguageManager.addLanguage('al_bhed2', 'Al Bhed 2')
11 videoLanguageManager.addConstant('al_bhed3', 'Al Bhed 3')
12 videoLanguageManager.deleteConstant('en')
13 videoLanguageManager.deleteLanguage('fr')
14 videoLanguageManager.deleteConstant('al_bhed3')
15
16 videoCategoryManager.addCategory(42, 'Best category')
17 videoCategoryManager.addConstant(43, 'High best category')
18 videoCategoryManager.deleteConstant(1) // Music
19 videoCategoryManager.deleteCategory(2) // Films
20
21 videoLicenceManager.addLicence(42, 'Best licence')
22 videoLicenceManager.addConstant(43, 'High best licence')
23 videoLicenceManager.deleteConstant(1) // Attribution
24 videoLicenceManager.deleteConstant(7) // Public domain
25
26 videoPrivacyManager.deleteConstant(2)
27 videoPrivacyManager.deletePrivacy(2)
28 playlistPrivacyManager.deleteConstant(3)
29 playlistPrivacyManager.deletePlaylistPrivacy(3)
30
31 {
32 const router = getRouter()
33 router.get('/reset-categories', (req, res) => {
34 videoCategoryManager.resetConstants()
35
36 res.sendStatus(204)
37 })
38 }
39}
40
41async function unregister () {}
42
43module.exports = {
44 register,
45 unregister
46}
diff --git a/server/tests/fixtures/peertube-plugin-test-video-constants/package.json b/server/tests/fixtures/peertube-plugin-test-video-constants/package.json
deleted file mode 100644
index 0fcf39933..000000000
--- a/server/tests/fixtures/peertube-plugin-test-video-constants/package.json
+++ /dev/null
@@ -1,20 +0,0 @@
1{
2 "name": "peertube-plugin-test-video-constants",
3 "version": "0.0.1",
4 "description": "Plugin test video constants",
5 "engine": {
6 "peertube": ">=1.3.0"
7 },
8 "keywords": [
9 "peertube",
10 "plugin"
11 ],
12 "homepage": "https://github.com/Chocobozzz/PeerTube",
13 "author": "Chocobozzz",
14 "bugs": "https://github.com/Chocobozzz/PeerTube/issues",
15 "library": "./main.js",
16 "staticDirs": {},
17 "css": [],
18 "clientScripts": [],
19 "translations": {}
20}
diff --git a/server/tests/fixtures/peertube-plugin-test-websocket/main.js b/server/tests/fixtures/peertube-plugin-test-websocket/main.js
deleted file mode 100644
index 3fde76cfe..000000000
--- a/server/tests/fixtures/peertube-plugin-test-websocket/main.js
+++ /dev/null
@@ -1,36 +0,0 @@
1const WebSocketServer = require('ws').WebSocketServer
2
3async function register ({
4 registerWebSocketRoute
5}) {
6 const wss = new WebSocketServer({ noServer: true })
7
8 wss.on('connection', function connection(ws) {
9 ws.on('message', function message(data) {
10 if (data.toString() === 'ping') {
11 ws.send('pong')
12 }
13 })
14 })
15
16 registerWebSocketRoute({
17 route: '/toto',
18
19 handler: (request, socket, head) => {
20 wss.handleUpgrade(request, socket, head, ws => {
21 wss.emit('connection', ws, request)
22 })
23 }
24 })
25}
26
27async function unregister () {
28 return
29}
30
31module.exports = {
32 register,
33 unregister
34}
35
36// ###########################################################################
diff --git a/server/tests/fixtures/peertube-plugin-test-websocket/package.json b/server/tests/fixtures/peertube-plugin-test-websocket/package.json
deleted file mode 100644
index 89c8baa04..000000000
--- a/server/tests/fixtures/peertube-plugin-test-websocket/package.json
+++ /dev/null
@@ -1,20 +0,0 @@
1{
2 "name": "peertube-plugin-test-websocket",
3 "version": "0.0.1",
4 "description": "Plugin test websocket",
5 "engine": {
6 "peertube": ">=1.3.0"
7 },
8 "keywords": [
9 "peertube",
10 "plugin"
11 ],
12 "homepage": "https://github.com/Chocobozzz/PeerTube",
13 "author": "Chocobozzz",
14 "bugs": "https://github.com/Chocobozzz/PeerTube/issues",
15 "library": "./main.js",
16 "staticDirs": {},
17 "css": [],
18 "clientScripts": [],
19 "translations": {}
20}
diff --git a/server/tests/fixtures/peertube-plugin-test/languages/fr.json b/server/tests/fixtures/peertube-plugin-test/languages/fr.json
deleted file mode 100644
index 9e52f7065..000000000
--- a/server/tests/fixtures/peertube-plugin-test/languages/fr.json
+++ /dev/null
@@ -1,3 +0,0 @@
1{
2 "Hi": "Coucou"
3}
diff --git a/server/tests/fixtures/peertube-plugin-test/main.js b/server/tests/fixtures/peertube-plugin-test/main.js
deleted file mode 100644
index e16bf0ca3..000000000
--- a/server/tests/fixtures/peertube-plugin-test/main.js
+++ /dev/null
@@ -1,477 +0,0 @@
1async function register ({ registerHook, registerSetting, settingsManager, storageManager, peertubeHelpers }) {
2 {
3 const actionHooks = [
4 'action:application.listening',
5 'action:notifier.notification.created',
6
7 'action:api.video.updated',
8 'action:api.video.deleted',
9 'action:api.video.uploaded',
10 'action:api.video.viewed',
11
12 'action:api.video.file-updated',
13
14 'action:api.video-channel.created',
15 'action:api.video-channel.updated',
16 'action:api.video-channel.deleted',
17
18 'action:api.live-video.created',
19 'action:live.video.state.updated',
20
21 'action:api.video-thread.created',
22 'action:api.video-comment-reply.created',
23 'action:api.video-comment.deleted',
24
25 'action:api.video-caption.created',
26 'action:api.video-caption.deleted',
27
28 'action:api.user.blocked',
29 'action:api.user.unblocked',
30 'action:api.user.registered',
31 'action:api.user.created',
32 'action:api.user.deleted',
33 'action:api.user.updated',
34 'action:api.user.oauth2-got-token',
35
36 'action:api.video-playlist-element.created'
37 ]
38
39 for (const h of actionHooks) {
40 registerHook({
41 target: h,
42 handler: () => peertubeHelpers.logger.debug('Run hook %s.', h)
43 })
44 }
45
46 for (const h of [ 'action:activity-pub.remote-video.created', 'action:activity-pub.remote-video.updated' ]) {
47 registerHook({
48 target: h,
49 handler: ({ video, videoAPObject }) => {
50 peertubeHelpers.logger.debug('Run hook %s - AP %s - video %s.', h, video.name, videoAPObject.name )
51 }
52 })
53 }
54 }
55
56 registerHook({
57 target: 'filter:api.videos.list.params',
58 handler: obj => addToCount(obj)
59 })
60
61 registerHook({
62 target: 'filter:api.videos.list.result',
63 handler: obj => addToTotal(obj)
64 })
65
66 registerHook({
67 target: 'filter:api.video-playlist.videos.list.params',
68 handler: obj => addToCount(obj)
69 })
70
71 registerHook({
72 target: 'filter:api.video-playlist.videos.list.result',
73 handler: obj => addToTotal(obj)
74 })
75
76 registerHook({
77 target: 'filter:api.accounts.videos.list.params',
78 handler: obj => addToCount(obj)
79 })
80
81 registerHook({
82 target: 'filter:api.accounts.videos.list.result',
83 handler: obj => addToTotal(obj, 2)
84 })
85
86 registerHook({
87 target: 'filter:api.video-channels.videos.list.params',
88 handler: obj => addToCount(obj, 3)
89 })
90
91 registerHook({
92 target: 'filter:api.video-channels.videos.list.result',
93 handler: obj => addToTotal(obj, 3)
94 })
95
96 registerHook({
97 target: 'filter:api.user.me.videos.list.params',
98 handler: obj => addToCount(obj, 4)
99 })
100
101 registerHook({
102 target: 'filter:api.user.me.videos.list.result',
103 handler: obj => addToTotal(obj, 4)
104 })
105
106 registerHook({
107 target: 'filter:api.user.me.subscription-videos.list.params',
108 handler: obj => addToCount(obj)
109 })
110
111 registerHook({
112 target: 'filter:api.user.me.subscription-videos.list.result',
113 handler: obj => addToTotal(obj, 4)
114 })
115
116 registerHook({
117 target: 'filter:api.video.get.result',
118 handler: video => {
119 video.name += ' <3'
120
121 return video
122 }
123 })
124
125 // ---------------------------------------------------------------------------
126
127 registerHook({
128 target: 'filter:api.video-channels.list.params',
129 handler: obj => addToCount(obj, 1)
130 })
131
132 registerHook({
133 target: 'filter:api.video-channels.list.result',
134 handler: obj => addToTotal(obj, 1)
135 })
136
137 registerHook({
138 target: 'filter:api.video-channel.get.result',
139 handler: channel => {
140 channel.name += ' <3'
141
142 return channel
143 }
144 })
145
146 // ---------------------------------------------------------------------------
147
148 for (const hook of [ 'filter:api.video.upload.accept.result', 'filter:api.live-video.create.accept.result' ]) {
149 registerHook({
150 target: hook,
151 handler: ({ accepted }, { videoBody, liveVideoBody }) => {
152 if (!accepted) return { accepted: false }
153
154 const name = videoBody
155 ? videoBody.name
156 : liveVideoBody.name
157
158 if (name.indexOf('bad word') !== -1) return { accepted: false, errorMessage: 'bad word' }
159
160 return { accepted: true }
161 }
162 })
163 }
164
165 registerHook({
166 target: 'filter:api.video.update-file.accept.result',
167 handler: ({ accepted }, { videoFile }) => {
168 if (!accepted) return { accepted: false }
169 if (videoFile.filename.includes('webm')) return { accepted: false, errorMessage: 'no webm' }
170
171 return { accepted: true }
172 }
173 })
174
175 registerHook({
176 target: 'filter:api.video.pre-import-url.accept.result',
177 handler: ({ accepted }, { videoImportBody }) => {
178 if (!accepted) return { accepted: false }
179 if (videoImportBody.targetUrl.includes('bad')) return { accepted: false, errorMessage: 'bad target url' }
180
181 return { accepted: true }
182 }
183 })
184
185 registerHook({
186 target: 'filter:api.video.pre-import-torrent.accept.result',
187 handler: ({ accepted }, { videoImportBody }) => {
188 if (!accepted) return { accepted: false }
189 if (videoImportBody.name.includes('bad torrent')) return { accepted: false, errorMessage: 'bad torrent' }
190
191 return { accepted: true }
192 }
193 })
194
195 registerHook({
196 target: 'filter:api.video.post-import-url.accept.result',
197 handler: ({ accepted }, { video }) => {
198 if (!accepted) return { accepted: false }
199 if (video.name.includes('bad word')) return { accepted: false, errorMessage: 'bad word' }
200
201 return { accepted: true }
202 }
203 })
204
205 registerHook({
206 target: 'filter:api.video.post-import-torrent.accept.result',
207 handler: ({ accepted }, { video }) => {
208 if (!accepted) return { accepted: false }
209 if (video.name.includes('bad word')) return { accepted: false, errorMessage: 'bad word' }
210
211 return { accepted: true }
212 }
213 })
214
215 // ---------------------------------------------------------------------------
216
217 registerHook({
218 target: 'filter:api.video-thread.create.accept.result',
219 handler: ({ accepted }, { commentBody }) => checkCommentBadWord(accepted, commentBody)
220 })
221
222 registerHook({
223 target: 'filter:api.video-comment-reply.create.accept.result',
224 handler: ({ accepted }, { commentBody }) => checkCommentBadWord(accepted, commentBody)
225 })
226
227 registerHook({
228 target: 'filter:activity-pub.remote-video-comment.create.accept.result',
229 handler: ({ accepted }, { comment }) => checkCommentBadWord(accepted, comment)
230 })
231
232 // ---------------------------------------------------------------------------
233
234 registerHook({
235 target: 'filter:activity-pub.activity.context.build.result',
236 handler: context => context.concat([ { recordedAt: 'https://schema.org/recordedAt' } ])
237 })
238
239 registerHook({
240 target: 'filter:activity-pub.video.json-ld.build.result',
241 handler: (jsonld, { video }) => ({ ...jsonld, videoName: video.name })
242 })
243
244 // ---------------------------------------------------------------------------
245
246 registerHook({
247 target: 'filter:api.video-threads.list.params',
248 handler: obj => addToCount(obj)
249 })
250
251 registerHook({
252 target: 'filter:api.video-threads.list.result',
253 handler: obj => addToTotal(obj)
254 })
255
256 registerHook({
257 target: 'filter:api.video-thread-comments.list.result',
258 handler: obj => {
259 obj.data.forEach(c => c.text += ' <3')
260
261 return obj
262 }
263 })
264
265 registerHook({
266 target: 'filter:video.auto-blacklist.result',
267 handler: (blacklisted, { video }) => {
268 if (blacklisted) return true
269 if (video.name.includes('please blacklist me')) return true
270
271 return false
272 }
273 })
274
275 {
276 registerHook({
277 target: 'filter:api.user.signup.allowed.result',
278 handler: (result, params) => {
279 if (params && params.body && params.body.email && params.body.email.includes('jma 1')) {
280 return { allowed: false, errorMessage: 'No jma 1' }
281 }
282
283 return result
284 }
285 })
286
287 registerHook({
288 target: 'filter:api.user.request-signup.allowed.result',
289 handler: (result, params) => {
290 if (params && params.body && params.body.email && params.body.email.includes('jma 2')) {
291 return { allowed: false, errorMessage: 'No jma 2' }
292 }
293
294 return result
295 }
296 })
297 }
298
299 registerHook({
300 target: 'filter:api.download.torrent.allowed.result',
301 handler: (result, params) => {
302 if (params && params.downloadName.includes('bad torrent')) {
303 return { allowed: false, errorMessage: 'Liu Bei' }
304 }
305
306 return result
307 }
308 })
309
310 registerHook({
311 target: 'filter:api.download.video.allowed.result',
312 handler: async (result, params) => {
313 const loggedInUser = await peertubeHelpers.user.getAuthUser(params.res)
314 if (loggedInUser) return { allowed: true }
315
316 if (params && !params.streamingPlaylist && params.video.name.includes('bad file')) {
317 return { allowed: false, errorMessage: 'Cao Cao' }
318 }
319
320 if (params && params.streamingPlaylist && params.video.name.includes('bad playlist file')) {
321 return { allowed: false, errorMessage: 'Sun Jian' }
322 }
323
324 return result
325 }
326 })
327
328 // ---------------------------------------------------------------------------
329
330 registerHook({
331 target: 'filter:html.embed.video.allowed.result',
332 handler: (result, params) => {
333 return {
334 allowed: false,
335 html: 'Lu Bu'
336 }
337 }
338 })
339
340 registerHook({
341 target: 'filter:html.embed.video-playlist.allowed.result',
342 handler: (result, params) => {
343 return {
344 allowed: false,
345 html: 'Diao Chan'
346 }
347 }
348 })
349
350 // ---------------------------------------------------------------------------
351
352 registerHook({
353 target: 'filter:html.client.json-ld.result',
354 handler: (jsonld, context) => {
355 if (!context || !context.video) return jsonld
356
357 return Object.assign(jsonld, { recordedAt: 'http://example.com/recordedAt' })
358 }
359 })
360
361 // ---------------------------------------------------------------------------
362
363 registerHook({
364 target: 'filter:api.server.stats.get.result',
365 handler: (result) => {
366 return { ...result, customStats: 14 }
367 }
368 })
369
370 registerHook({
371 target: 'filter:job-queue.process.params',
372 handler: (object, context) => {
373 if (context.type !== 'video-studio-edition') return object
374
375 object.data.tasks = [
376 {
377 name: 'cut',
378 options: {
379 start: 0,
380 end: 1
381 }
382 }
383 ]
384
385 return object
386 }
387 })
388
389 registerHook({
390 target: 'filter:transcoding.auto.resolutions-to-transcode.result',
391 handler: (object, context) => {
392 if (context.video.name.includes('transcode-filter')) {
393 object = [ 100 ]
394 }
395
396 return object
397 }
398 })
399
400 // Upload/import/live attributes
401 for (const target of [
402 'filter:api.video.upload.video-attribute.result',
403 'filter:api.video.import-url.video-attribute.result',
404 'filter:api.video.import-torrent.video-attribute.result',
405 'filter:api.video.live.video-attribute.result'
406 ]) {
407 registerHook({
408 target,
409 handler: (result) => {
410 return { ...result, description: result.description + ' - ' + target }
411 }
412 })
413 }
414
415 {
416 const filterHooks = [
417 'filter:api.search.videos.local.list.params',
418 'filter:api.search.videos.local.list.result',
419 'filter:api.search.videos.index.list.params',
420 'filter:api.search.videos.index.list.result',
421 'filter:api.search.video-channels.local.list.params',
422 'filter:api.search.video-channels.local.list.result',
423 'filter:api.search.video-channels.index.list.params',
424 'filter:api.search.video-channels.index.list.result',
425 'filter:api.search.video-playlists.local.list.params',
426 'filter:api.search.video-playlists.local.list.result',
427 'filter:api.search.video-playlists.index.list.params',
428 'filter:api.search.video-playlists.index.list.result',
429
430 'filter:api.overviews.videos.list.params',
431 'filter:api.overviews.videos.list.result',
432
433 'filter:job-queue.process.params',
434 'filter:job-queue.process.result'
435 ]
436
437 for (const h of filterHooks) {
438 registerHook({
439 target: h,
440 handler: (obj) => {
441 peertubeHelpers.logger.debug('Run hook %s.', h)
442
443 return obj
444 }
445 })
446 }
447 }
448}
449
450async function unregister () {
451 return
452}
453
454module.exports = {
455 register,
456 unregister
457}
458
459// ############################################################################
460
461function addToCount (obj, amount = 1) {
462 return Object.assign({}, obj, { count: obj.count + amount })
463}
464
465function addToTotal (result, amount = 1) {
466 return {
467 data: result.data,
468 total: result.total + amount
469 }
470}
471
472function checkCommentBadWord (accepted, commentBody) {
473 if (!accepted) return { accepted: false }
474 if (commentBody.text.indexOf('bad word') !== -1) return { accepted: false, errorMessage: 'bad word '}
475
476 return { accepted: true }
477}
diff --git a/server/tests/fixtures/peertube-plugin-test/package.json b/server/tests/fixtures/peertube-plugin-test/package.json
deleted file mode 100644
index 108f21fd6..000000000
--- a/server/tests/fixtures/peertube-plugin-test/package.json
+++ /dev/null
@@ -1,22 +0,0 @@
1{
2 "name": "peertube-plugin-test",
3 "version": "0.0.1",
4 "description": "Plugin test",
5 "engine": {
6 "peertube": ">=1.3.0"
7 },
8 "keywords": [
9 "peertube",
10 "plugin"
11 ],
12 "homepage": "https://github.com/Chocobozzz/PeerTube",
13 "author": "Chocobozzz",
14 "bugs": "https://github.com/Chocobozzz/PeerTube/issues",
15 "library": "./main.js",
16 "staticDirs": {},
17 "css": [],
18 "clientScripts": [],
19 "translations": {
20 "fr-FR": "./languages/fr.json"
21 }
22}
diff --git a/server/tests/fixtures/rtmps.cert b/server/tests/fixtures/rtmps.cert
deleted file mode 100644
index 3ef606c52..000000000
--- a/server/tests/fixtures/rtmps.cert
+++ /dev/null
@@ -1,21 +0,0 @@
1-----BEGIN CERTIFICATE-----
2MIIDazCCAlOgAwIBAgIUKNycLAZUs2jFsWUW+zZhBkpLB2wwDQYJKoZIhvcNAQEL
3BQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM
4GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDAeFw0yMTExMDUxMDA4MzhaFw0yMTEy
5MDUxMDA4MzhaMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEw
6HwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwggEiMA0GCSqGSIb3DQEB
7AQUAA4IBDwAwggEKAoIBAQDak20d81KG/9mVLU6Qw/uRniC935yf9Rlp8FVCDxUd
8zLbfHjrnIOv8kqinUI0nuEQC4DnF7Rbafe88WDU33Q8ixU/R0czUGq1AEwIjyN30
95NjokCb26xWIly7RCfc/Ot6tjguHwKvcxqJMNC0Lit9Go9MDVnGFLkgHia68P72T
10ZDVV44YpzwYDicwQs5C4nZ4yzAeclia07qfUY0VAEZlxJ/9zjwYHCT0AKaEPH35E
11dUvjuvJ1OSHSN1S4acR+TPR3FwKQh3H/M/GWIqoiIOpdjFUBLs80QOM2aNrLmlyP
12JtyFJLxCP7Ery9fGY/yzHeSxpgOKwZopD6uHZKi5yazNAgMBAAGjUzBRMB0GA1Ud
13DgQWBBSSjhRQdWsybNQMLMhkwV+xiP2uoDAfBgNVHSMEGDAWgBSSjhRQdWsybNQM
14LMhkwV+xiP2uoDAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQC8
15rJu3J5sqVKNQaXOmLPd49RM7KG3Y1KPqbQi1lh+sW6aefZ9daeh3JDYGBZGPG/Fi
16IMMP+LhGG0WqDm4ClK00wyNhBuNPEyzvuN/WMRX5djPxO1IZi+KogFwXsn853Ov9
17oV3nxArNNjDu2n92FiB7RTlXRXPIoRo2zEBcLvveGySn9XUazRzlqx6FAxYe2xsw
18U3cZ6/wwU1YsEZa5bwIQk+gkFj3zDsTyEkn2ntcE2NlR+AhCHKa/yAxgPFycAVPX
192o+wNnc6H4syP98mMGj9hEE3RSJyCPgGBlgi7Swl64G3YygFPJzfLX9YTuxwr/eI
20oitEjF9ljtmdEnf0RdOj
21-----END CERTIFICATE-----
diff --git a/server/tests/fixtures/rtmps.key b/server/tests/fixtures/rtmps.key
deleted file mode 100644
index 14a85e70a..000000000
--- a/server/tests/fixtures/rtmps.key
+++ /dev/null
@@ -1,28 +0,0 @@
1-----BEGIN PRIVATE KEY-----
2MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDak20d81KG/9mV
3LU6Qw/uRniC935yf9Rlp8FVCDxUdzLbfHjrnIOv8kqinUI0nuEQC4DnF7Rbafe88
4WDU33Q8ixU/R0czUGq1AEwIjyN305NjokCb26xWIly7RCfc/Ot6tjguHwKvcxqJM
5NC0Lit9Go9MDVnGFLkgHia68P72TZDVV44YpzwYDicwQs5C4nZ4yzAeclia07qfU
6Y0VAEZlxJ/9zjwYHCT0AKaEPH35EdUvjuvJ1OSHSN1S4acR+TPR3FwKQh3H/M/GW
7IqoiIOpdjFUBLs80QOM2aNrLmlyPJtyFJLxCP7Ery9fGY/yzHeSxpgOKwZopD6uH
8ZKi5yazNAgMBAAECggEAND7C+UK8+jnTl13CBsZhrnfemaQGexGJ5pGkv2p9gKb7
9Gy/Nooty/OdNWtjdNJ5N22YfSRkXulgZxBHNfrHfOU9yedOtIxHRUZx5iXYs36mH
1002cJeUHN3t1MOnkoWTvIGDH4vZUnP1lXV+Gs1rJ2Fht4h7a04cGjQ/H8C1EtDjqX
11kzH2T/gwo5hdGrxifRTs5wCVoP/iUwNtBI4WrY2rfC6sV+NOICgp0xX0NvGWZ8UT
12K1Ntpl8IxnxmeBd26d+Gbjc9d9fIRDtyXby4YOIlDZxnIiZEI0I452JqGl/jrXaP
13F3Troet4OBj5uH5s374d6ubKq66XogiLMIjEj2tYfQKBgQDtuaOu+y549bFJKVc9
14TCiWSOl/0j2kKKG8UG23zMC//AT13WqZDT5ObfOAuMhy70au/PD84D9RU/+gRVWb
15ptfybD9ugRNC8PkmdT82uYtZpS4+Xw4qyWVRgqQFmjSYz63cLcULVi8kiG8XmG5u
16QGgT/tNv5mxhOMUGSxhClOpLBwKBgQDrYO9UrLs+gDVKbHF4Dh+YJpaLnwwF+TFA
17j3ZbkE0XEeeXp/YDgyClmWwEkteJeNljtreCZ9gMkx3JdR9i8uecUQ2tFDBg3cN0
18BZAex2jFwSb0QbfzHNnE07I+aEIfHHjYXjzABl+1Yt95giKjce0Ke+8Zzahue0+9
19lYcAHemQiwKBgQCs9JAbIdJo3NBUW0iGZ19sH7YKciq4wXsSaC27OLPPugrd2m7Q
201arMIwCzWT01KdLyQ0MNqBVJFWT49RjYuuWIEauAuVYLMQkEKu+H4Cx7V0syw7Op
21+4bEa9jr3op/1zE17PLcUaLQ4JZ6w0Ms4Z0XVyH72thlT4lBD+ehoXhohwKBgEtJ
22LAPnY9Sv6Vuup/SAf/aIkSqDarMWa3x85pyO4Tl5zpuha3zgGjcdhYFI/ovIDbBp
23JvUdBeuvup1PSwS5MP+8pSUxCfBRvkyD4v8VRRvLlgwWYSHvnm/oTmDLtCqDTtvV
24+JRq9X3s7BHPYAjrTahGz8lvEGqWIoE/LHkLGEPVAoGAaF3VHuqDfmD9PJUAlsU1
25qxN7yfOd2ve0+66Ghus24DVqUFqwp5f2AxZXYUtSaNUp8fVbqIi+Yq3YDTU2KfId
265QNA/AiKi4VUNLElsG5DZlbszsE5KNp9fWQoggdQ5LND7AGEKeFERHOVQ7C5sc/C
27omIqK5/PsZmaf4OZLyecxJY=
28-----END PRIVATE KEY-----
diff --git a/server/tests/fixtures/sample.ogg b/server/tests/fixtures/sample.ogg
deleted file mode 100644
index 0d7f43eb7..000000000
--- a/server/tests/fixtures/sample.ogg
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/subtitle-bad.txt b/server/tests/fixtures/subtitle-bad.txt
deleted file mode 100644
index a2a30ae47..000000000
--- a/server/tests/fixtures/subtitle-bad.txt
+++ /dev/null
@@ -1,11 +0,0 @@
11
200:00:01,600 --> 00:00:04,200
3English (US)
4
52
600:00:05,900 --> 00:00:07,999
7This is a subtitle in American English
8
93
1000:00:10,000 --> 00:00:14,000
11Adding subtitles is very easy to do \ No newline at end of file
diff --git a/server/tests/fixtures/subtitle-good.srt b/server/tests/fixtures/subtitle-good.srt
deleted file mode 100644
index a2a30ae47..000000000
--- a/server/tests/fixtures/subtitle-good.srt
+++ /dev/null
@@ -1,11 +0,0 @@
11
200:00:01,600 --> 00:00:04,200
3English (US)
4
52
600:00:05,900 --> 00:00:07,999
7This is a subtitle in American English
8
93
1000:00:10,000 --> 00:00:14,000
11Adding subtitles is very easy to do \ No newline at end of file
diff --git a/server/tests/fixtures/subtitle-good1.vtt b/server/tests/fixtures/subtitle-good1.vtt
deleted file mode 100644
index 04cd23946..000000000
--- a/server/tests/fixtures/subtitle-good1.vtt
+++ /dev/null
@@ -1,8 +0,0 @@
1WEBVTT
2
300:01.000 --> 00:04.000
4Subtitle good 1.
5
600:05.000 --> 00:09.000
7- It will perforate your stomach.
8- You could die. \ No newline at end of file
diff --git a/server/tests/fixtures/subtitle-good2.vtt b/server/tests/fixtures/subtitle-good2.vtt
deleted file mode 100644
index 4d3256def..000000000
--- a/server/tests/fixtures/subtitle-good2.vtt
+++ /dev/null
@@ -1,8 +0,0 @@
1WEBVTT
2
300:01.000 --> 00:04.000
4Subtitle good 2.
5
600:05.000 --> 00:09.000
7- It will perforate your stomach.
8- You could die. \ No newline at end of file
diff --git a/server/tests/fixtures/thumbnail-playlist.jpg b/server/tests/fixtures/thumbnail-playlist.jpg
deleted file mode 100644
index 12de5817b..000000000
--- a/server/tests/fixtures/thumbnail-playlist.jpg
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/video-720p.torrent b/server/tests/fixtures/video-720p.torrent
deleted file mode 100644
index 64bfd5220..000000000
--- a/server/tests/fixtures/video-720p.torrent
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/video_import_preview.jpg b/server/tests/fixtures/video_import_preview.jpg
deleted file mode 100644
index a98da178f..000000000
--- a/server/tests/fixtures/video_import_preview.jpg
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/video_import_preview_yt_dlp.jpg b/server/tests/fixtures/video_import_preview_yt_dlp.jpg
deleted file mode 100644
index 9e8833bf9..000000000
--- a/server/tests/fixtures/video_import_preview_yt_dlp.jpg
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/video_import_thumbnail.jpg b/server/tests/fixtures/video_import_thumbnail.jpg
deleted file mode 100644
index 9ee1bc382..000000000
--- a/server/tests/fixtures/video_import_thumbnail.jpg
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/video_import_thumbnail_yt_dlp.jpg b/server/tests/fixtures/video_import_thumbnail_yt_dlp.jpg
deleted file mode 100644
index a10e07207..000000000
--- a/server/tests/fixtures/video_import_thumbnail_yt_dlp.jpg
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/video_short.avi b/server/tests/fixtures/video_short.avi
deleted file mode 100644
index 88979cab2..000000000
--- a/server/tests/fixtures/video_short.avi
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/video_short.mkv b/server/tests/fixtures/video_short.mkv
deleted file mode 100644
index a67f4f806..000000000
--- a/server/tests/fixtures/video_short.mkv
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/video_short.mp4 b/server/tests/fixtures/video_short.mp4
deleted file mode 100644
index 35678362b..000000000
--- a/server/tests/fixtures/video_short.mp4
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/video_short.mp4.jpg b/server/tests/fixtures/video_short.mp4.jpg
deleted file mode 100644
index 7ac29122c..000000000
--- a/server/tests/fixtures/video_short.mp4.jpg
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/video_short.ogv b/server/tests/fixtures/video_short.ogv
deleted file mode 100644
index 9e253da82..000000000
--- a/server/tests/fixtures/video_short.ogv
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/video_short.ogv.jpg b/server/tests/fixtures/video_short.ogv.jpg
deleted file mode 100644
index 5bc63969b..000000000
--- a/server/tests/fixtures/video_short.ogv.jpg
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/video_short.webm b/server/tests/fixtures/video_short.webm
deleted file mode 100644
index bf4b0ab6c..000000000
--- a/server/tests/fixtures/video_short.webm
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/video_short.webm.jpg b/server/tests/fixtures/video_short.webm.jpg
deleted file mode 100644
index 7ac29122c..000000000
--- a/server/tests/fixtures/video_short.webm.jpg
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/video_short1-preview.webm.jpg b/server/tests/fixtures/video_short1-preview.webm.jpg
deleted file mode 100644
index 15454942d..000000000
--- a/server/tests/fixtures/video_short1-preview.webm.jpg
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/video_short1.webm b/server/tests/fixtures/video_short1.webm
deleted file mode 100644
index 70ac0c644..000000000
--- a/server/tests/fixtures/video_short1.webm
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/video_short1.webm.jpg b/server/tests/fixtures/video_short1.webm.jpg
deleted file mode 100644
index b2740d73d..000000000
--- a/server/tests/fixtures/video_short1.webm.jpg
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/video_short2.webm b/server/tests/fixtures/video_short2.webm
deleted file mode 100644
index 13d72dff7..000000000
--- a/server/tests/fixtures/video_short2.webm
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/video_short2.webm.jpg b/server/tests/fixtures/video_short2.webm.jpg
deleted file mode 100644
index afe476c7f..000000000
--- a/server/tests/fixtures/video_short2.webm.jpg
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/video_short3.webm b/server/tests/fixtures/video_short3.webm
deleted file mode 100644
index cde5dcd58..000000000
--- a/server/tests/fixtures/video_short3.webm
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/video_short3.webm.jpg b/server/tests/fixtures/video_short3.webm.jpg
deleted file mode 100644
index b572f676e..000000000
--- a/server/tests/fixtures/video_short3.webm.jpg
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/video_short_0p.mp4 b/server/tests/fixtures/video_short_0p.mp4
deleted file mode 100644
index 2069a49b8..000000000
--- a/server/tests/fixtures/video_short_0p.mp4
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/video_short_144p.m3u8 b/server/tests/fixtures/video_short_144p.m3u8
deleted file mode 100644
index 96568625b..000000000
--- a/server/tests/fixtures/video_short_144p.m3u8
+++ /dev/null
@@ -1,13 +0,0 @@
1#EXTM3U
2#EXT-X-VERSION:7
3#EXT-X-TARGETDURATION:4
4#EXT-X-MEDIA-SEQUENCE:0
5#EXT-X-PLAYLIST-TYPE:VOD
6#EXT-X-MAP:URI="3dd13e27-1ae1-441c-9b77-48c6b95603be-144-fragmented.mp4",BYTERANGE="1375@0"
7#EXTINF:4.000000,
8#EXT-X-BYTERANGE:10518@1375
93dd13e27-1ae1-441c-9b77-48c6b95603be-144-fragmented.mp4
10#EXTINF:1.000000,
11#EXT-X-BYTERANGE:3741@11893
123dd13e27-1ae1-441c-9b77-48c6b95603be-144-fragmented.mp4
13#EXT-X-ENDLIST
diff --git a/server/tests/fixtures/video_short_144p.mp4 b/server/tests/fixtures/video_short_144p.mp4
deleted file mode 100644
index 047d43c17..000000000
--- a/server/tests/fixtures/video_short_144p.mp4
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/video_short_240p.m3u8 b/server/tests/fixtures/video_short_240p.m3u8
deleted file mode 100644
index 96568625b..000000000
--- a/server/tests/fixtures/video_short_240p.m3u8
+++ /dev/null
@@ -1,13 +0,0 @@
1#EXTM3U
2#EXT-X-VERSION:7
3#EXT-X-TARGETDURATION:4
4#EXT-X-MEDIA-SEQUENCE:0
5#EXT-X-PLAYLIST-TYPE:VOD
6#EXT-X-MAP:URI="3dd13e27-1ae1-441c-9b77-48c6b95603be-144-fragmented.mp4",BYTERANGE="1375@0"
7#EXTINF:4.000000,
8#EXT-X-BYTERANGE:10518@1375
93dd13e27-1ae1-441c-9b77-48c6b95603be-144-fragmented.mp4
10#EXTINF:1.000000,
11#EXT-X-BYTERANGE:3741@11893
123dd13e27-1ae1-441c-9b77-48c6b95603be-144-fragmented.mp4
13#EXT-X-ENDLIST
diff --git a/server/tests/fixtures/video_short_240p.mp4 b/server/tests/fixtures/video_short_240p.mp4
deleted file mode 100644
index 46609e81a..000000000
--- a/server/tests/fixtures/video_short_240p.mp4
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/video_short_360p.m3u8 b/server/tests/fixtures/video_short_360p.m3u8
deleted file mode 100644
index f7072dc6d..000000000
--- a/server/tests/fixtures/video_short_360p.m3u8
+++ /dev/null
@@ -1,13 +0,0 @@
1#EXTM3U
2#EXT-X-VERSION:7
3#EXT-X-TARGETDURATION:4
4#EXT-X-MEDIA-SEQUENCE:0
5#EXT-X-PLAYLIST-TYPE:VOD
6#EXT-X-MAP:URI="05c40acd-3e94-4d25-ade8-97f7ff2cf0ac-360-fragmented.mp4",BYTERANGE="1376@0"
7#EXTINF:4.000000,
8#EXT-X-BYTERANGE:19987@1376
905c40acd-3e94-4d25-ade8-97f7ff2cf0ac-360-fragmented.mp4
10#EXTINF:1.000000,
11#EXT-X-BYTERANGE:9147@21363
1205c40acd-3e94-4d25-ade8-97f7ff2cf0ac-360-fragmented.mp4
13#EXT-X-ENDLIST
diff --git a/server/tests/fixtures/video_short_360p.mp4 b/server/tests/fixtures/video_short_360p.mp4
deleted file mode 100644
index 7a8189bbc..000000000
--- a/server/tests/fixtures/video_short_360p.mp4
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/video_short_480.webm b/server/tests/fixtures/video_short_480.webm
deleted file mode 100644
index 3145105e1..000000000
--- a/server/tests/fixtures/video_short_480.webm
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/video_short_480p.m3u8 b/server/tests/fixtures/video_short_480p.m3u8
deleted file mode 100644
index 5ff30dfa7..000000000
--- a/server/tests/fixtures/video_short_480p.m3u8
+++ /dev/null
@@ -1,13 +0,0 @@
1#EXTM3U
2#EXT-X-VERSION:7
3#EXT-X-TARGETDURATION:4
4#EXT-X-MEDIA-SEQUENCE:0
5#EXT-X-PLAYLIST-TYPE:VOD
6#EXT-X-MAP:URI="f9377e69-d8f2-4de8-8087-ddbca6629829-480-fragmented.mp4",BYTERANGE="1376@0"
7#EXTINF:4.000000,
8#EXT-X-BYTERANGE:26042@1376
9f9377e69-d8f2-4de8-8087-ddbca6629829-480-fragmented.mp4
10#EXTINF:1.000000,
11#EXT-X-BYTERANGE:12353@27418
12f9377e69-d8f2-4de8-8087-ddbca6629829-480-fragmented.mp4
13#EXT-X-ENDLIST
diff --git a/server/tests/fixtures/video_short_480p.mp4 b/server/tests/fixtures/video_short_480p.mp4
deleted file mode 100644
index e05b58b6b..000000000
--- a/server/tests/fixtures/video_short_480p.mp4
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/video_short_4k.mp4 b/server/tests/fixtures/video_short_4k.mp4
deleted file mode 100644
index 402479743..000000000
--- a/server/tests/fixtures/video_short_4k.mp4
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/video_short_720p.m3u8 b/server/tests/fixtures/video_short_720p.m3u8
deleted file mode 100644
index 7cee94032..000000000
--- a/server/tests/fixtures/video_short_720p.m3u8
+++ /dev/null
@@ -1,13 +0,0 @@
1#EXTM3U
2#EXT-X-VERSION:7
3#EXT-X-TARGETDURATION:4
4#EXT-X-MEDIA-SEQUENCE:0
5#EXT-X-PLAYLIST-TYPE:VOD
6#EXT-X-MAP:URI="c1014aa4-d1f4-4b66-927b-c23d283fcae0-720-fragmented.mp4",BYTERANGE="1356@0"
7#EXTINF:4.000000,
8#EXT-X-BYTERANGE:39260@1356
9c1014aa4-d1f4-4b66-927b-c23d283fcae0-720-fragmented.mp4
10#EXTINF:1.000000,
11#EXT-X-BYTERANGE:18493@40616
12c1014aa4-d1f4-4b66-927b-c23d283fcae0-720-fragmented.mp4
13#EXT-X-ENDLIST
diff --git a/server/tests/fixtures/video_short_720p.mp4 b/server/tests/fixtures/video_short_720p.mp4
deleted file mode 100644
index 35e8f69a7..000000000
--- a/server/tests/fixtures/video_short_720p.mp4
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/video_short_fake.webm b/server/tests/fixtures/video_short_fake.webm
deleted file mode 100644
index d85290ae5..000000000
--- a/server/tests/fixtures/video_short_fake.webm
+++ /dev/null
@@ -1 +0,0 @@
1this is a fake video mouahahah
diff --git a/server/tests/fixtures/video_short_mp3_256k.mp4 b/server/tests/fixtures/video_short_mp3_256k.mp4
deleted file mode 100644
index 4c1c7b45e..000000000
--- a/server/tests/fixtures/video_short_mp3_256k.mp4
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/video_short_no_audio.mp4 b/server/tests/fixtures/video_short_no_audio.mp4
deleted file mode 100644
index 329d20fba..000000000
--- a/server/tests/fixtures/video_short_no_audio.mp4
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/video_very_long_10p.mp4 b/server/tests/fixtures/video_very_long_10p.mp4
deleted file mode 100644
index 852297933..000000000
--- a/server/tests/fixtures/video_very_long_10p.mp4
+++ /dev/null
Binary files differ
diff --git a/server/tests/fixtures/video_very_short_240p.mp4 b/server/tests/fixtures/video_very_short_240p.mp4
deleted file mode 100644
index 95b6be92a..000000000
--- a/server/tests/fixtures/video_very_short_240p.mp4
+++ /dev/null
Binary files differ