Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Use more specific name

Chocobozzz798d8d37eef1
diff --git a/packages/tests/src/api/check-params/channel-import-videos.ts b/packages/tests/src/api/check-params/channel-import-videos.ts
index 678ad8ff59..0250c87825 100644
--- a/packages/tests/src/api/check-params/channel-import-videos.ts
+++ b/packages/tests/src/api/check-params/channel-import-videos.ts
@@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
-import { FIXTURE_URLS } from '@tests/shared/tests.js'
+import { FIXTURE_URLS } from '@tests/shared/fixture-urls.js'
import { areHttpImportTestsDisabled } from '@peertube/peertube-node-utils'
import { HttpStatusCode } from '@peertube/peertube-models'
import {
diff --git a/packages/tests/src/api/check-params/upload-quota.ts b/packages/tests/src/api/check-params/upload-quota.ts
index 89c9a25ee5..9a540f6ebd 100644
--- a/packages/tests/src/api/check-params/upload-quota.ts
+++ b/packages/tests/src/api/check-params/upload-quota.ts
@@ -1,7 +1,7 @@
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
import { expect } from 'chai'
-import { FIXTURE_URLS } from '@tests/shared/tests.js'
+import { FIXTURE_URLS } from '@tests/shared/fixture-urls.js'
import { randomInt } from '@peertube/peertube-core-utils'
import { HttpStatusCode, VideoImportState, VideoPrivacy } from '@peertube/peertube-models'
import {
diff --git a/packages/tests/src/api/check-params/video-channel-syncs.ts b/packages/tests/src/api/check-params/video-channel-syncs.ts
index edb0ab13f8..00c3f3b66b 100644
--- a/packages/tests/src/api/check-params/video-channel-syncs.ts
+++ b/packages/tests/src/api/check-params/video-channel-syncs.ts
@@ -1,5 +1,5 @@
import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination } from '@tests/shared/checks.js'
-import { FIXTURE_URLS } from '@tests/shared/tests.js'
+import { FIXTURE_URLS } from '@tests/shared/fixture-urls.js'
import { HttpStatusCode, VideoChannelSyncCreate } from '@peertube/peertube-models'
import {
ChannelSyncsCommand,
diff --git a/packages/tests/src/api/check-params/video-imports.ts b/packages/tests/src/api/check-params/video-imports.ts
index e183301b37..1ac60fa8cb 100644
--- a/packages/tests/src/api/check-params/video-imports.ts
+++ b/packages/tests/src/api/check-params/video-imports.ts
@@ -3,7 +3,7 @@
import { omit } from '@peertube/peertube-core-utils'
import { HttpStatusCode, VideoPrivacy } from '@peertube/peertube-models'
import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination } from '@tests/shared/checks.js'
-import { FIXTURE_URLS } from '@tests/shared/tests.js'
+import { FIXTURE_URLS } from '@tests/shared/fixture-urls.js'
import { buildAbsoluteFixturePath } from '@peertube/peertube-node-utils'
import {
cleanupTests,
diff --git a/packages/tests/src/api/check-params/video-passwords.ts b/packages/tests/src/api/check-params/video-passwords.ts
index 91db22438e..69b3f50a31 100644
--- a/packages/tests/src/api/check-params/video-passwords.ts
+++ b/packages/tests/src/api/check-params/video-passwords.ts
@@ -16,7 +16,7 @@ import {
setAccessTokensToServers
} from '@peertube/peertube-server-commands'
import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination } from '@tests/shared/checks.js'
-import { FIXTURE_URLS } from '@tests/shared/tests.js'
+import { FIXTURE_URLS } from '@tests/shared/fixture-urls.js'
import { checkUploadVideoParam } from '@tests/shared/videos.js'
describe('Test video passwords validator', function () {
diff --git a/packages/tests/src/api/moderation/video-blacklist.ts b/packages/tests/src/api/moderation/video-blacklist.ts
index 3a19b8204d..2283fbc795 100644
--- a/packages/tests/src/api/moderation/video-blacklist.ts
+++ b/packages/tests/src/api/moderation/video-blacklist.ts
@@ -1,7 +1,7 @@
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
import { expect } from 'chai'
-import { FIXTURE_URLS } from '@tests/shared/tests.js'
+import { FIXTURE_URLS } from '@tests/shared/fixture-urls.js'
import { sortObjectComparator } from '@peertube/peertube-core-utils'
import { UserAdminFlag, UserRole, VideoBlacklist, VideoBlacklistType } from '@peertube/peertube-models'
import {
diff --git a/packages/tests/src/api/notifications/user-notifications.ts b/packages/tests/src/api/notifications/user-notifications.ts
index b62466716c..07438067a5 100644
--- a/packages/tests/src/api/notifications/user-notifications.ts
+++ b/packages/tests/src/api/notifications/user-notifications.ts
@@ -17,7 +17,7 @@ import {
checkNewLiveFromSubscription,
waitUntilNotification
} from '@tests/shared/notifications.js'
-import { FIXTURE_URLS } from '@tests/shared/tests.js'
+import { FIXTURE_URLS } from '@tests/shared/fixture-urls.js'
import { uploadRandomVideoOnServers } from '@tests/shared/videos.js'
describe('Test user notifications', function () {
diff --git a/packages/tests/src/api/object-storage/video-imports.ts b/packages/tests/src/api/object-storage/video-imports.ts
index 78f94bce1c..ec269e7c07 100644
--- a/packages/tests/src/api/object-storage/video-imports.ts
+++ b/packages/tests/src/api/object-storage/video-imports.ts
@@ -2,7 +2,7 @@
import { expect } from 'chai'
import { expectStartWith } from '@tests/shared/checks.js'
-import { FIXTURE_URLS } from '@tests/shared/tests.js'
+import { FIXTURE_URLS } from '@tests/shared/fixture-urls.js'
import { areMockObjectStorageTestsDisabled } from '@peertube/peertube-node-utils'
import { HttpStatusCode, VideoPrivacy } from '@peertube/peertube-models'
import {
diff --git a/packages/tests/src/api/server/config-defaults.ts b/packages/tests/src/api/server/config-defaults.ts
index fe425976b4..c50bd686bd 100644
--- a/packages/tests/src/api/server/config-defaults.ts
+++ b/packages/tests/src/api/server/config-defaults.ts
@@ -9,7 +9,7 @@ import {
setAccessTokensToServers,
setDefaultVideoChannel
} from '@peertube/peertube-server-commands'
-import { FIXTURE_URLS } from '@tests/shared/tests.js'
+import { FIXTURE_URLS } from '@tests/shared/fixture-urls.js'
describe('Test config defaults', function () {
let server: PeerTubeServer
diff --git a/packages/tests/src/api/server/proxy.ts b/packages/tests/src/api/server/proxy.ts
index b958251871..8e1b50e763 100644
--- a/packages/tests/src/api/server/proxy.ts
+++ b/packages/tests/src/api/server/proxy.ts
@@ -13,7 +13,7 @@ import {
setDefaultVideoChannel,
waitJobs
} from '@peertube/peertube-server-commands'
-import { FIXTURE_URLS } from '@tests/shared/tests.js'
+import { FIXTURE_URLS } from '@tests/shared/fixture-urls.js'
import { expectStartWith, expectNotStartWith } from '@tests/shared/checks.js'
import { MockProxy } from '@tests/shared/mock-servers/mock-proxy.js'
diff --git a/packages/tests/src/api/videos/channel-import-videos.ts b/packages/tests/src/api/videos/channel-import-videos.ts
index b37b680650..8827f07829 100644
--- a/packages/tests/src/api/videos/channel-import-videos.ts
+++ b/packages/tests/src/api/videos/channel-import-videos.ts
@@ -1,7 +1,7 @@
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
import { expect } from 'chai'
-import { FIXTURE_URLS } from '@tests/shared/tests.js'
+import { FIXTURE_URLS } from '@tests/shared/fixture-urls.js'
import { areHttpImportTestsDisabled } from '@peertube/peertube-node-utils'
import {
createSingleServer,
diff --git a/packages/tests/src/api/videos/video-channel-syncs.ts b/packages/tests/src/api/videos/video-channel-syncs.ts
index 28f2f80bae..098d33c029 100644
--- a/packages/tests/src/api/videos/video-channel-syncs.ts
+++ b/packages/tests/src/api/videos/video-channel-syncs.ts
@@ -15,7 +15,7 @@ import {
waitJobs
} from '@peertube/peertube-server-commands'
import { SQLCommand } from '@tests/shared/sql-command.js'
-import { FIXTURE_URLS } from '@tests/shared/tests.js'
+import { FIXTURE_URLS } from '@tests/shared/fixture-urls.js'
describe('Test channel synchronizations', function () {
if (areHttpImportTestsDisabled()) return
diff --git a/packages/tests/src/api/videos/video-chapters.ts b/packages/tests/src/api/videos/video-chapters.ts
index 7e7d653f96..5be0e33d64 100644
--- a/packages/tests/src/api/videos/video-chapters.ts
+++ b/packages/tests/src/api/videos/video-chapters.ts
@@ -9,7 +9,7 @@ import {
setDefaultVideoChannel,
waitJobs
} from '@peertube/peertube-server-commands'
-import { FIXTURE_URLS } from '@tests/shared/tests.js'
+import { FIXTURE_URLS } from '@tests/shared/fixture-urls.js'
import { expect } from 'chai'
describe('Test video chapters', function () {
diff --git a/packages/tests/src/api/videos/video-imports.ts b/packages/tests/src/api/videos/video-imports.ts
index 6cfae80b47..90d9e21745 100644
--- a/packages/tests/src/api/videos/video-imports.ts
+++ b/packages/tests/src/api/videos/video-imports.ts
@@ -20,7 +20,7 @@ import {
import { DeepPartial } from '@peertube/peertube-typescript-utils'
import { testCaptionFile } from '@tests/shared/captions.js'
import { testImageGeneratedByFFmpeg } from '@tests/shared/checks.js'
-import { FIXTURE_URLS } from '@tests/shared/tests.js'
+import { FIXTURE_URLS } from '@tests/shared/fixture-urls.js'
async function checkVideosServer1 (server: PeerTubeServer, idHttp: string, idMagnet: string, idTorrent: string) {
const videoHttp = await server.videos.get({ id: idHttp })
diff --git a/packages/tests/src/api/videos/video-source.ts b/packages/tests/src/api/videos/video-source.ts
index 73d620aa17..6ecb04ea2c 100644
--- a/packages/tests/src/api/videos/video-source.ts
+++ b/packages/tests/src/api/videos/video-source.ts
@@ -16,7 +16,7 @@ import {
} from '@peertube/peertube-server-commands'
import { expectStartWith } from '@tests/shared/checks.js'
import { checkDirectoryIsEmpty } from '@tests/shared/directories.js'
-import { FIXTURE_URLS } from '@tests/shared/tests.js'
+import { FIXTURE_URLS } from '@tests/shared/fixture-urls.js'
import { checkSourceFile } from '@tests/shared/videos.js'
import { expect } from 'chai'
diff --git a/packages/tests/src/api/videos/video-storyboard.ts b/packages/tests/src/api/videos/video-storyboard.ts
index b5d5d0d8ff..efcb2295b4 100644
--- a/packages/tests/src/api/videos/video-storyboard.ts
+++ b/packages/tests/src/api/videos/video-storyboard.ts
@@ -3,7 +3,7 @@
import { expect } from 'chai'
import { readdir } from 'fs/promises'
import { basename } from 'path'
-import { FIXTURE_URLS } from '@tests/shared/tests.js'
+import { FIXTURE_URLS } from '@tests/shared/fixture-urls.js'
import { areHttpImportTestsDisabled } from '@peertube/peertube-node-utils'
import { HttpStatusCode, VideoPrivacy } from '@peertube/peertube-models'
import {
diff --git a/packages/tests/src/plugins/filter-hooks.ts b/packages/tests/src/plugins/filter-hooks.ts
index 26ba149bec..5ae85e7be9 100644
--- a/packages/tests/src/plugins/filter-hooks.ts
+++ b/packages/tests/src/plugins/filter-hooks.ts
@@ -23,7 +23,7 @@ import {
setDefaultVideoChannel,
waitJobs
} from '@peertube/peertube-server-commands'
-import { FIXTURE_URLS } from '../shared/tests.js'
+import { FIXTURE_URLS } from '../shared/fixture-urls.js'
import { expectEndWith } from '@tests/shared/checks.js'
describe('Test plugin filter hooks', function () {
diff --git a/packages/tests/src/server-helpers/activitypub.ts b/packages/tests/src/server-helpers/activitypub.ts
index 43ecdda564..8b8b7a45b4 100644
--- a/packages/tests/src/server-helpers/activitypub.ts
+++ b/packages/tests/src/server-helpers/activitypub.ts
@@ -4,11 +4,14 @@ import { buildAbsoluteFixturePath } from '@peertube/peertube-node-utils'
import { signAndContextify } from '@peertube/peertube-server/core/helpers/activity-pub-utils.js'
import { isHTTPSignatureVerified, parseHTTPSignature } from '@peertube/peertube-server/core/helpers/peertube-crypto.js'
import { isJsonLDSignatureVerified, signJsonLDObject } from '@peertube/peertube-server/core/helpers/peertube-jsonld.js'
-import { buildRequestStub } from '@tests/shared/tests.js'
import { expect } from 'chai'
import { readJsonSync } from 'fs-extra/esm'
import cloneDeep from 'lodash-es/cloneDeep.js'
+function buildRequestStub (): any {
+ return { }
+}
+
function signJsonLDObjectWithoutAssertion (options: Parameters<typeof signJsonLDObject>[0]) {
return signJsonLDObject({
...options,
diff --git a/packages/tests/src/server-helpers/request.ts b/packages/tests/src/server-helpers/request.ts
index 6045d25596..38a74f6eaa 100644
--- a/packages/tests/src/server-helpers/request.ts
+++ b/packages/tests/src/server-helpers/request.ts
@@ -7,7 +7,7 @@ import { wait } from '@peertube/peertube-core-utils'
import { root } from '@peertube/peertube-node-utils'
import { doRequest, doRequestAndSaveToFile } from '@peertube/peertube-server/core/helpers/requests.js'
import { Mock429 } from '@tests/shared/mock-servers/mock-429.js'
-import { FIXTURE_URLS } from '@tests/shared/tests.js'
+import { FIXTURE_URLS } from '@tests/shared/fixture-urls.js'
describe('Request helpers', function () {
const destPath1 = join(root(), 'test-output-1.txt')
diff --git a/packages/tests/src/shared/tests.ts b/packages/tests/src/shared/fixture-urls.ts
similarity index 93%
rename from packages/tests/src/shared/tests.ts
rename to packages/tests/src/shared/fixture-urls.ts
index 554ed0e1f1..56638e13b2 100644
--- a/packages/tests/src/shared/tests.ts
+++ b/packages/tests/src/shared/fixture-urls.ts
@@ -1,4 +1,4 @@
-const FIXTURE_URLS = {
+export const FIXTURE_URLS = {
peertube_long: 'https://peertube2.cpy.re/videos/watch/122d093a-1ede-43bd-bd34-59d2931ffc5e',
peertube_short: 'https://peertube2.cpy.re/w/3fbif9S3WmtTP8gGsC5HBd',
@@ -31,13 +31,3 @@ const FIXTURE_URLS = {
file4K: 'https://download.cpy.re/peertube/4k_file.txt'
}
-
-function buildRequestStub (): any {
- return { }
-}
-
-export {
- FIXTURE_URLS,
-
- buildRequestStub
-}