Use more specific name

pull/6288/head
Chocobozzz 2024-03-18 10:40:06 +01:00
parent 1a8b20ba30
commit 798d8d37ee
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
20 changed files with 23 additions and 30 deletions

View File

@ -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 {

View File

@ -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 {

View File

@ -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,

View File

@ -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,

View File

@ -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 () {

View File

@ -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 {

View File

@ -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 () {

View File

@ -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 {

View File

@ -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

View File

@ -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'

View File

@ -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,

View File

@ -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

View File

@ -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 () {

View File

@ -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 })

View File

@ -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'

View File

@ -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 {

View File

@ -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 () {

View File

@ -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,

View File

@ -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')

View File

@ -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
}