mirror of https://github.com/Chocobozzz/PeerTube
shared/ typescript types dir server-commands
parent
6b5f72beda
commit
bf54587a3e
|
@ -3,7 +3,7 @@ registerTSPaths()
|
|||
|
||||
import autocannon, { printResult } from 'autocannon'
|
||||
import { writeJson } from 'fs-extra'
|
||||
import { createSingleServer, killallServers, PeerTubeServer, setAccessTokensToServers } from '@shared/extra-utils'
|
||||
import { createSingleServer, killallServers, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands'
|
||||
import { Video, VideoPrivacy } from '@shared/models'
|
||||
|
||||
let server: PeerTubeServer
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { registerTSPaths } from '../server/helpers/register-ts-paths'
|
||||
registerTSPaths()
|
||||
|
||||
import { CLICommand } from '@shared/extra-utils'
|
||||
import { CLICommand } from '@shared/server-commands'
|
||||
|
||||
run()
|
||||
.then(() => process.exit(0))
|
||||
|
|
|
@ -10,7 +10,7 @@ import {
|
|||
setAccessTokensToServers,
|
||||
wait,
|
||||
waitJobs
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
|
||||
const expect = chai.expect
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import {
|
|||
PeerTubeServer,
|
||||
setAccessTokensToServers,
|
||||
setDefaultVideoChannel
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { HttpStatusCode, VideoPlaylistPrivacy } from '@shared/models'
|
||||
|
||||
const expect = chai.expect
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
import 'mocha'
|
||||
import * as chai from 'chai'
|
||||
import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/extra-utils'
|
||||
import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands'
|
||||
|
||||
const expect = chai.expect
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
import 'mocha'
|
||||
import { expect } from 'chai'
|
||||
import { cloneDeep } from 'lodash'
|
||||
import { buildAbsoluteFixturePath, buildRequestStub } from '@shared/extra-utils'
|
||||
import { buildAbsoluteFixturePath, buildRequestStub } from '@shared/server-commands'
|
||||
import { buildSignedActivity } from '../../../helpers/activitypub'
|
||||
import { isHTTPSignatureVerified, isJsonLDSignatureVerified, parseHTTPSignature } from '../../../helpers/peertube-crypto'
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ import {
|
|||
setDefaultVideoChannel,
|
||||
wait,
|
||||
waitJobs
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { HttpStatusCode, VideoPlaylistPrivacy } from '@shared/models'
|
||||
|
||||
describe('Test AP refresher', function () {
|
||||
|
|
|
@ -6,7 +6,7 @@ import { activityPubContextify, buildSignedActivity } from '@server/helpers/acti
|
|||
import { buildDigest } from '@server/helpers/peertube-crypto'
|
||||
import { HTTP_SIGNATURE } from '@server/initializers/constants'
|
||||
import { buildGlobalHeaders } from '@server/lib/job-queue/handlers/utils/activitypub-http-utils'
|
||||
import { buildAbsoluteFixturePath, cleanupTests, createMultipleServers, killallServers, PeerTubeServer, wait } from '@shared/extra-utils'
|
||||
import { buildAbsoluteFixturePath, cleanupTests, createMultipleServers, killallServers, PeerTubeServer, wait } from '@shared/server-commands'
|
||||
import { makeFollowRequest, makePOSTAPRequest } from '@server/tests/shared'
|
||||
import { HttpStatusCode } from '@shared/models'
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ import {
|
|||
PeerTubeServer,
|
||||
setAccessTokensToServers,
|
||||
waitJobs
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { AbuseCreate, AbuseState, HttpStatusCode } from '@shared/models'
|
||||
|
||||
describe('Test abuses API validators', function () {
|
||||
|
|
|
@ -8,7 +8,7 @@ import {
|
|||
cleanupTests,
|
||||
createSingleServer,
|
||||
PeerTubeServer
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { HttpStatusCode } from '@shared/models'
|
||||
|
||||
describe('Test accounts API validators', function () {
|
||||
|
|
|
@ -13,7 +13,7 @@ import {
|
|||
makePostBodyRequest,
|
||||
PeerTubeServer,
|
||||
setAccessTokensToServers
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { HttpStatusCode } from '@shared/models'
|
||||
|
||||
describe('Test blocklist API validators', function () {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||
|
||||
import 'mocha'
|
||||
import { cleanupTests, createSingleServer, makePostBodyRequest, PeerTubeServer, setAccessTokensToServers } from '@shared/extra-utils'
|
||||
import { cleanupTests, createSingleServer, makePostBodyRequest, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands'
|
||||
import { HttpStatusCode } from '@shared/models'
|
||||
|
||||
describe('Test bulk API validators', function () {
|
||||
|
|
|
@ -10,7 +10,7 @@ import {
|
|||
makePutBodyRequest,
|
||||
PeerTubeServer,
|
||||
setAccessTokensToServers
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { CustomConfig, HttpStatusCode } from '@shared/models'
|
||||
|
||||
describe('Test config API validators', function () {
|
||||
|
|
|
@ -1,9 +1,15 @@
|
|||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||
|
||||
import 'mocha'
|
||||
import { cleanupTests, createSingleServer, killallServers, MockSmtpServer, PeerTubeServer } from '@shared/extra-utils'
|
||||
import { ContactFormCommand } from '@shared/extra-utils/server'
|
||||
import { HttpStatusCode } from '@shared/models'
|
||||
import {
|
||||
cleanupTests,
|
||||
ContactFormCommand,
|
||||
createSingleServer,
|
||||
killallServers,
|
||||
MockSmtpServer,
|
||||
PeerTubeServer
|
||||
} from '@shared/server-commands'
|
||||
|
||||
describe('Test contact form API validators', function () {
|
||||
let server: PeerTubeServer
|
||||
|
|
|
@ -8,7 +8,7 @@ import {
|
|||
makePutBodyRequest,
|
||||
PeerTubeServer,
|
||||
setAccessTokensToServers
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { HttpStatusCode } from '@shared/models'
|
||||
|
||||
describe('Test custom pages validators', function () {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||
|
||||
import 'mocha'
|
||||
import { cleanupTests, createSingleServer, makeGetRequest, PeerTubeServer, setAccessTokensToServers } from '@shared/extra-utils'
|
||||
import { cleanupTests, createSingleServer, makeGetRequest, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands'
|
||||
import { HttpStatusCode } from '@shared/models'
|
||||
|
||||
describe('Test debug API validators', function () {
|
||||
|
|
|
@ -12,7 +12,7 @@ import {
|
|||
makePostBodyRequest,
|
||||
PeerTubeServer,
|
||||
setAccessTokensToServers
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { HttpStatusCode } from '@shared/models'
|
||||
|
||||
describe('Test server follows API validators', function () {
|
||||
|
|
|
@ -10,7 +10,7 @@ import {
|
|||
makeGetRequest,
|
||||
PeerTubeServer,
|
||||
setAccessTokensToServers
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { HttpStatusCode } from '@shared/models'
|
||||
|
||||
describe('Test jobs API validators', function () {
|
||||
|
|
|
@ -13,7 +13,7 @@ import {
|
|||
sendRTMPStream,
|
||||
setAccessTokensToServers,
|
||||
stopFfmpeg
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { HttpStatusCode, VideoCreateResult, VideoPrivacy } from '@shared/models'
|
||||
|
||||
describe('Test video lives API validator', function () {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||
|
||||
import 'mocha'
|
||||
import { cleanupTests, createSingleServer, makeGetRequest, PeerTubeServer, setAccessTokensToServers } from '@shared/extra-utils'
|
||||
import { cleanupTests, createSingleServer, makeGetRequest, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands'
|
||||
import { HttpStatusCode } from '@shared/models'
|
||||
|
||||
describe('Test logs API validators', function () {
|
||||
|
|
|
@ -15,7 +15,7 @@ import {
|
|||
PeerTubeServer,
|
||||
setAccessTokensToServers,
|
||||
UsersCommand
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { HttpStatusCode, UserRole, VideoCreateResult } from '@shared/models'
|
||||
|
||||
describe('Test my user API validators', function () {
|
||||
|
|
|
@ -12,7 +12,7 @@ import {
|
|||
makePutBodyRequest,
|
||||
PeerTubeServer,
|
||||
setAccessTokensToServers
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { HttpStatusCode, PeerTubePlugin, PluginType } from '@shared/models'
|
||||
|
||||
describe('Test server plugins API validators', function () {
|
||||
|
|
|
@ -15,7 +15,7 @@ import {
|
|||
PeerTubeServer,
|
||||
setAccessTokensToServers,
|
||||
waitJobs
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { HttpStatusCode, VideoCreateResult } from '@shared/models'
|
||||
|
||||
describe('Test server redundancy API validators', function () {
|
||||
|
|
|
@ -10,7 +10,7 @@ import {
|
|||
makeGetRequest,
|
||||
PeerTubeServer,
|
||||
setAccessTokensToServers
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { HttpStatusCode } from '@shared/models'
|
||||
|
||||
function updateSearchIndex (server: PeerTubeServer, enabled: boolean, disableLocalSearch = false) {
|
||||
|
|
|
@ -8,7 +8,7 @@ import {
|
|||
PeerTubeServer,
|
||||
setAccessTokensToServers,
|
||||
setDefaultVideoChannel
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { HttpStatusCode, VideoPlaylistPrivacy } from '@shared/models'
|
||||
|
||||
describe('Test services API validators', function () {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||
|
||||
import 'mocha'
|
||||
import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/extra-utils'
|
||||
import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands'
|
||||
import { HttpStatusCode, UserRole } from '@shared/models'
|
||||
|
||||
describe('Test transcoding API validators', function () {
|
||||
|
|
|
@ -12,7 +12,7 @@ import {
|
|||
setDefaultVideoChannel,
|
||||
VideosCommand,
|
||||
waitJobs
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { HttpStatusCode, VideoImportState, VideoPrivacy } from '@shared/models'
|
||||
|
||||
describe('Test upload quota', function () {
|
||||
|
|
|
@ -14,7 +14,7 @@ import {
|
|||
PeerTubeServer,
|
||||
setAccessTokensToServers,
|
||||
wait
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { HttpStatusCode, UserNotificationSetting, UserNotificationSettingValue } from '@shared/models'
|
||||
|
||||
describe('Test user notifications API validators', function () {
|
||||
|
|
|
@ -13,7 +13,7 @@ import {
|
|||
PeerTubeServer,
|
||||
setAccessTokensToServers,
|
||||
waitJobs
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { HttpStatusCode } from '@shared/models'
|
||||
|
||||
describe('Test user subscriptions API validators', function () {
|
||||
|
|
|
@ -15,7 +15,7 @@ import {
|
|||
MockSmtpServer,
|
||||
PeerTubeServer,
|
||||
setAccessTokensToServers
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { HttpStatusCode, UserAdminFlag, UserRole } from '@shared/models'
|
||||
|
||||
describe('Test users admin API validators', function () {
|
||||
|
|
|
@ -9,7 +9,7 @@ import {
|
|||
MockSmtpServer,
|
||||
PeerTubeServer,
|
||||
setAccessTokensToServers
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { HttpStatusCode, UserRole } from '@shared/models'
|
||||
|
||||
describe('Test users API validators', function () {
|
||||
|
|
|
@ -15,7 +15,7 @@ import {
|
|||
PeerTubeServer,
|
||||
setAccessTokensToServers,
|
||||
waitJobs
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { HttpStatusCode, VideoBlacklistType } from '@shared/models'
|
||||
|
||||
describe('Test video blacklist API validators', function () {
|
||||
|
|
|
@ -10,7 +10,7 @@ import {
|
|||
makeUploadRequest,
|
||||
PeerTubeServer,
|
||||
setAccessTokensToServers
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { HttpStatusCode, VideoCreateResult } from '@shared/models'
|
||||
|
||||
describe('Test video captions API validator', function () {
|
||||
|
|
|
@ -17,7 +17,7 @@ import {
|
|||
makeUploadRequest,
|
||||
PeerTubeServer,
|
||||
setAccessTokensToServers
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { HttpStatusCode, VideoChannelUpdate } from '@shared/models'
|
||||
|
||||
const expect = chai.expect
|
||||
|
|
|
@ -13,7 +13,7 @@ import {
|
|||
makePostBodyRequest,
|
||||
PeerTubeServer,
|
||||
setAccessTokensToServers
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { HttpStatusCode, VideoCreateResult } from '@shared/models'
|
||||
|
||||
const expect = chai.expect
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||
|
||||
import 'mocha'
|
||||
import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/extra-utils'
|
||||
import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands'
|
||||
import { HttpStatusCode, UserRole } from '@shared/models'
|
||||
|
||||
describe('Test videos files', function () {
|
||||
|
|
|
@ -15,7 +15,7 @@ import {
|
|||
makeUploadRequest,
|
||||
PeerTubeServer,
|
||||
setAccessTokensToServers
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { HttpStatusCode, VideoPrivacy } from '@shared/models'
|
||||
|
||||
describe('Test video imports API validator', function () {
|
||||
|
|
|
@ -12,7 +12,7 @@ import {
|
|||
PlaylistsCommand,
|
||||
setAccessTokensToServers,
|
||||
setDefaultVideoChannel
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import {
|
||||
HttpStatusCode,
|
||||
VideoPlaylistCreate,
|
||||
|
|
|
@ -8,7 +8,7 @@ import {
|
|||
PeerTubeServer,
|
||||
setAccessTokensToServers,
|
||||
setDefaultVideoChannel
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { HttpStatusCode, UserRole, VideoInclude, VideoPrivacy } from '@shared/models'
|
||||
|
||||
describe('Test video filters validators', function () {
|
||||
|
|
|
@ -11,7 +11,7 @@ import {
|
|||
makePutBodyRequest,
|
||||
PeerTubeServer,
|
||||
setAccessTokensToServers
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { HttpStatusCode } from '@shared/models'
|
||||
|
||||
describe('Test videos history API validator', function () {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||
|
||||
import 'mocha'
|
||||
import { cleanupTests, createSingleServer, PeerTubeServer } from '@shared/extra-utils'
|
||||
import { cleanupTests, createSingleServer, PeerTubeServer } from '@shared/server-commands'
|
||||
|
||||
describe('Test videos overview', function () {
|
||||
let server: PeerTubeServer
|
||||
|
|
|
@ -19,7 +19,7 @@ import {
|
|||
PeerTubeServer,
|
||||
root,
|
||||
setAccessTokensToServers
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { HttpStatusCode, PeerTubeProblemDocument, VideoCreateResult, VideoPrivacy } from '@shared/models'
|
||||
|
||||
const expect = chai.expect
|
||||
|
|
|
@ -14,7 +14,7 @@ import {
|
|||
setDefaultVideoChannel,
|
||||
wait,
|
||||
waitJobs
|
||||
} from '../../../../shared/extra-utils'
|
||||
} from '../../../../shared/server-commands'
|
||||
|
||||
const expect = chai.expect
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ import {
|
|||
stopFfmpeg,
|
||||
wait,
|
||||
waitJobs
|
||||
} from '../../../../shared/extra-utils'
|
||||
} from '../../../../shared/server-commands'
|
||||
|
||||
const expect = chai.expect
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ import {
|
|||
stopFfmpeg,
|
||||
testFfmpegStreamError,
|
||||
waitUntilLivePublishedOnAllServers
|
||||
} from '../../../../shared/extra-utils'
|
||||
} from '../../../../shared/server-commands'
|
||||
|
||||
const expect = chai.expect
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ import {
|
|||
waitJobs,
|
||||
waitUntilLivePublishedOnAllServers,
|
||||
waitUntilLiveSavedOnAllServers
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { HttpStatusCode, LiveVideoCreate, VideoPrivacy, VideoState } from '@shared/models'
|
||||
|
||||
const expect = chai.expect
|
||||
|
|
|
@ -14,7 +14,7 @@ import {
|
|||
wait,
|
||||
waitJobs,
|
||||
waitUntilLivePublishedOnAllServers
|
||||
} from '../../../../shared/extra-utils'
|
||||
} from '../../../../shared/server-commands'
|
||||
|
||||
const expect = chai.expect
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ import {
|
|||
wait,
|
||||
waitJobs,
|
||||
waitUntilLivePublishedOnAllServers
|
||||
} from '../../../../shared/extra-utils'
|
||||
} from '../../../../shared/server-commands'
|
||||
|
||||
const expect = chai.expect
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ import {
|
|||
wait,
|
||||
waitJobs,
|
||||
waitUntilLivePublishedOnAllServers
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import {
|
||||
HttpStatusCode,
|
||||
LiveVideo,
|
||||
|
|
|
@ -10,7 +10,7 @@ import {
|
|||
PeerTubeServer,
|
||||
setAccessTokensToServers,
|
||||
waitJobs
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { AbuseMessage, AbusePredefinedReasonsString, AbuseState, AdminAbuse, UserAbuse } from '@shared/models'
|
||||
|
||||
const expect = chai.expect
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
import 'mocha'
|
||||
import * as chai from 'chai'
|
||||
import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/extra-utils'
|
||||
import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands'
|
||||
import { UserNotificationType } from '@shared/models'
|
||||
|
||||
const expect = chai.expect
|
||||
|
|
|
@ -11,7 +11,7 @@ import {
|
|||
PeerTubeServer,
|
||||
setAccessTokensToServers,
|
||||
waitJobs
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { UserNotificationType } from '@shared/models'
|
||||
|
||||
const expect = chai.expect
|
||||
|
|
|
@ -13,7 +13,7 @@ import {
|
|||
PeerTubeServer,
|
||||
setAccessTokensToServers,
|
||||
waitJobs
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { UserAdminFlag, UserRole, VideoBlacklist, VideoBlacklistType } from '@shared/models'
|
||||
|
||||
const expect = chai.expect
|
||||
|
|
|
@ -12,7 +12,7 @@ import {
|
|||
PeerTubeServer,
|
||||
prepareNotificationsTest,
|
||||
wait
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { PluginType, UserNotification, UserNotificationType } from '@shared/models'
|
||||
|
||||
describe('Test admin notifications', function () {
|
||||
|
|
|
@ -11,7 +11,7 @@ import {
|
|||
PeerTubeServer,
|
||||
prepareNotificationsTest,
|
||||
waitJobs
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { UserNotification } from '@shared/models'
|
||||
|
||||
const expect = chai.expect
|
||||
|
|
|
@ -23,7 +23,7 @@ import {
|
|||
prepareNotificationsTest,
|
||||
wait,
|
||||
waitJobs
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { AbuseState, CustomConfig, UserNotification, UserRole, VideoPrivacy } from '@shared/models'
|
||||
|
||||
describe('Test moderation notifications', function () {
|
||||
|
|
|
@ -11,7 +11,7 @@ import {
|
|||
PeerTubeServer,
|
||||
prepareNotificationsTest,
|
||||
waitJobs
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { UserNotification, UserNotificationSettingValue } from '@shared/models'
|
||||
|
||||
const expect = chai.expect
|
||||
|
|
|
@ -17,7 +17,7 @@ import {
|
|||
uploadRandomVideoOnServers,
|
||||
wait,
|
||||
waitJobs
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { UserNotification, UserNotificationType, VideoPrivacy } from '@shared/models'
|
||||
|
||||
const expect = chai.expect
|
||||
|
|
|
@ -18,7 +18,7 @@ import {
|
|||
waitJobs,
|
||||
waitUntilLivePublishedOnAllServers,
|
||||
waitUntilLiveSavedOnAllServers
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { HttpStatusCode, LiveVideoCreate, VideoFile, VideoPrivacy } from '@shared/models'
|
||||
|
||||
const expect = chai.expect
|
||||
|
|
|
@ -14,7 +14,7 @@ import {
|
|||
setAccessTokensToServers,
|
||||
setDefaultVideoChannel,
|
||||
waitJobs
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { HttpStatusCode, VideoPrivacy } from '@shared/models'
|
||||
|
||||
const expect = chai.expect
|
||||
|
|
|
@ -20,7 +20,7 @@ import {
|
|||
setAccessTokensToServers,
|
||||
waitJobs,
|
||||
webtorrentAdd
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { HttpStatusCode, VideoDetails } from '@shared/models'
|
||||
|
||||
const expect = chai.expect
|
||||
|
|
|
@ -10,7 +10,7 @@ import {
|
|||
RedundancyCommand,
|
||||
setAccessTokensToServers,
|
||||
waitJobs
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { VideoPrivacy, VideoRedundanciesTarget } from '@shared/models'
|
||||
|
||||
const expect = chai.expect
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
import 'mocha'
|
||||
import { expect } from 'chai'
|
||||
import { cleanupTests, createSingleServer, killallServers, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/extra-utils'
|
||||
import { cleanupTests, createSingleServer, killallServers, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands'
|
||||
import { VideoPrivacy } from '@shared/models'
|
||||
|
||||
describe('Test redundancy constraints', function () {
|
||||
|
|
|
@ -19,7 +19,7 @@ import {
|
|||
setAccessTokensToServers,
|
||||
wait,
|
||||
waitJobs
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import {
|
||||
HttpStatusCode,
|
||||
VideoDetails,
|
||||
|
|
|
@ -10,7 +10,7 @@ import {
|
|||
setAccessTokensToServers,
|
||||
wait,
|
||||
waitJobs
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { VideoChannel } from '@shared/models'
|
||||
|
||||
const expect = chai.expect
|
||||
|
|
|
@ -11,7 +11,7 @@ import {
|
|||
setDefaultVideoChannel,
|
||||
wait,
|
||||
waitJobs
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { VideoPlaylistPrivacy } from '@shared/models'
|
||||
|
||||
const expect = chai.expect
|
||||
|
|
|
@ -10,7 +10,7 @@ import {
|
|||
setAccessTokensToServers,
|
||||
wait,
|
||||
waitJobs
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { VideoPrivacy } from '@shared/models'
|
||||
|
||||
const expect = chai.expect
|
||||
|
|
|
@ -9,7 +9,7 @@ import {
|
|||
PeerTubeServer,
|
||||
SearchCommand,
|
||||
setAccessTokensToServers
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { VideoChannel } from '@shared/models'
|
||||
|
||||
const expect = chai.expect
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
import 'mocha'
|
||||
import * as chai from 'chai'
|
||||
import { cleanupTests, createSingleServer, PeerTubeServer, SearchCommand, setAccessTokensToServers } from '@shared/extra-utils'
|
||||
import { cleanupTests, createSingleServer, PeerTubeServer, SearchCommand, setAccessTokensToServers } from '@shared/server-commands'
|
||||
import {
|
||||
BooleanBothQuery,
|
||||
VideoChannelsSearchQuery,
|
||||
|
|
|
@ -10,7 +10,7 @@ import {
|
|||
SearchCommand,
|
||||
setAccessTokensToServers,
|
||||
setDefaultVideoChannel
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { VideoPlaylistPrivacy } from '@shared/models'
|
||||
|
||||
const expect = chai.expect
|
||||
|
|
|
@ -12,7 +12,7 @@ import {
|
|||
setDefaultVideoChannel,
|
||||
stopFfmpeg,
|
||||
wait
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { VideoPrivacy } from '@shared/models'
|
||||
|
||||
const expect = chai.expect
|
||||
|
|
|
@ -10,7 +10,7 @@ import {
|
|||
setAccessTokensToServers,
|
||||
wait,
|
||||
waitJobs
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
|
||||
const expect = chai.expect
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import {
|
|||
PeerTubeServer,
|
||||
setAccessTokensToServers,
|
||||
waitJobs
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
|
||||
const expect = chai.expect
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import {
|
|||
PeerTubeServer,
|
||||
setAccessTokensToServers,
|
||||
setDefaultVideoChannel
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { VideoDetails, VideoPrivacy } from '@shared/models'
|
||||
|
||||
const expect = chai.expect
|
||||
|
|
|
@ -10,7 +10,7 @@ import {
|
|||
parallelTests,
|
||||
PeerTubeServer,
|
||||
setAccessTokensToServers
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { CustomConfig, HttpStatusCode } from '@shared/models'
|
||||
|
||||
const expect = chai.expect
|
||||
|
|
|
@ -11,7 +11,7 @@ import {
|
|||
setAccessTokensToServers,
|
||||
wait,
|
||||
waitJobs
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { HttpStatusCode } from '@shared/models'
|
||||
|
||||
const expect = chai.expect
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
import 'mocha'
|
||||
import * as chai from 'chai'
|
||||
import { cleanupTests, createSingleServer, MockSmtpServer, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/extra-utils'
|
||||
import { cleanupTests, createSingleServer, MockSmtpServer, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands'
|
||||
import { HttpStatusCode } from '@shared/models'
|
||||
|
||||
const expect = chai.expect
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
import 'mocha'
|
||||
import * as chai from 'chai'
|
||||
import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers } from '@shared/extra-utils'
|
||||
import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands'
|
||||
import { HttpStatusCode, PeerTubeProblemDocument, ServerErrorCode } from '@shared/models'
|
||||
|
||||
const expect = chai.expect
|
||||
|
|
|
@ -9,7 +9,7 @@ import {
|
|||
PeerTubeServer,
|
||||
setAccessTokensToServers,
|
||||
waitJobs
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
|
||||
const expect = chai.expect
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import {
|
|||
setAccessTokensToServers,
|
||||
testCaptionFile,
|
||||
waitJobs
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { VideoCreateResult, VideoPrivacy } from '@shared/models'
|
||||
import { completeVideoCheck } from '@server/tests/shared/video'
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ import {
|
|||
setAccessTokensToServers,
|
||||
wait,
|
||||
waitJobs
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { HttpStatusCode, JobState, VideoCreateResult, VideoPrivacy } from '@shared/models'
|
||||
import { completeVideoCheck } from '@server/tests/shared/video'
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import {
|
|||
killallServers,
|
||||
PeerTubeServer,
|
||||
setAccessTokensToServers
|
||||
} from '../../../../shared/extra-utils/index'
|
||||
} from '../../../../shared/server-commands/index'
|
||||
|
||||
const expect = chai.expect
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import {
|
|||
PeerTubeServer,
|
||||
setAccessTokensToServers,
|
||||
waitJobs
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
|
||||
const expect = chai.expect
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import {
|
|||
PeerTubeServer,
|
||||
setAccessTokensToServers,
|
||||
waitJobs
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
|
||||
const expect = chai.expect
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import 'mocha'
|
||||
import request from 'supertest'
|
||||
import { cleanupTests, createSingleServer, PeerTubeServer } from '@shared/extra-utils'
|
||||
import { cleanupTests, createSingleServer, PeerTubeServer } from '@shared/server-commands'
|
||||
import { HttpStatusCode } from '@shared/models'
|
||||
|
||||
describe('Start and stop server without web client routes', function () {
|
||||
|
|
|
@ -11,7 +11,7 @@ import {
|
|||
setAccessTokensToServers,
|
||||
testHelloWorldRegisteredSettings,
|
||||
wait
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { HttpStatusCode, PluginType } from '@shared/models'
|
||||
|
||||
const expect = chai.expect
|
||||
|
|
|
@ -11,8 +11,8 @@ import {
|
|||
setAccessTokensToServers,
|
||||
setDefaultVideoChannel,
|
||||
waitJobs
|
||||
} from '@shared/extra-utils'
|
||||
import { MockProxy } from '@shared/extra-utils/mock-servers/mock-proxy'
|
||||
} from '@shared/server-commands'
|
||||
import { MockProxy } from '@shared/server-commands/mock-servers/mock-proxy'
|
||||
import { HttpStatusCode, VideoPrivacy } from '@shared/models'
|
||||
|
||||
const expect = chai.expect
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
|
||||
|
||||
import { expect } from 'chai'
|
||||
import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers, wait } from '@shared/extra-utils'
|
||||
import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers, wait } from '@shared/server-commands'
|
||||
import { HttpStatusCode } from '@shared/models'
|
||||
|
||||
describe('Test application behind a reverse proxy', function () {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
import 'mocha'
|
||||
import * as chai from 'chai'
|
||||
import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers, setDefaultVideoChannel } from '@shared/extra-utils'
|
||||
import { cleanupTests, createSingleServer, PeerTubeServer, setAccessTokensToServers, setDefaultVideoChannel } from '@shared/server-commands'
|
||||
import { Video, VideoPlaylistPrivacy } from '@shared/models'
|
||||
|
||||
const expect = chai.expect
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
import 'mocha'
|
||||
import * as chai from 'chai'
|
||||
import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/extra-utils'
|
||||
import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands'
|
||||
import { Job } from '@shared/models'
|
||||
|
||||
const expect = chai.expect
|
||||
|
|
|
@ -10,7 +10,7 @@ import {
|
|||
setAccessTokensToServers,
|
||||
wait,
|
||||
waitJobs
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { ActivityType, VideoPlaylistPrivacy } from '@shared/models'
|
||||
|
||||
const expect = chai.expect
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
import 'mocha'
|
||||
import magnetUtil from 'magnet-uri'
|
||||
import WebTorrent from 'webtorrent'
|
||||
import { cleanupTests, createSingleServer, killallServers, PeerTubeServer, setAccessTokensToServers } from '@shared/extra-utils'
|
||||
import { cleanupTests, createSingleServer, killallServers, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands'
|
||||
|
||||
describe('Test tracker', function () {
|
||||
let server: PeerTubeServer
|
||||
|
|
|
@ -10,7 +10,7 @@ import {
|
|||
setAccessTokensToServers,
|
||||
SubscriptionsCommand,
|
||||
waitJobs
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
|
||||
const expect = chai.expect
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ import {
|
|||
setAccessTokensToServers,
|
||||
testImage,
|
||||
waitJobs
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { MyUser } from '@shared/models'
|
||||
|
||||
const expect = chai.expect
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
import 'mocha'
|
||||
import * as chai from 'chai'
|
||||
import { cleanupTests, createSingleServer, MockSmtpServer, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/extra-utils'
|
||||
import { cleanupTests, createSingleServer, MockSmtpServer, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands'
|
||||
import { HttpStatusCode } from '@shared/models'
|
||||
|
||||
const expect = chai.expect
|
||||
|
|
|
@ -11,7 +11,7 @@ import {
|
|||
setAccessTokensToServers,
|
||||
testImage,
|
||||
waitJobs
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { AbuseState, HttpStatusCode, OAuth2ErrorCode, UserAdminFlag, UserRole, Video, VideoPlaylistType } from '@shared/models'
|
||||
|
||||
const expect = chai.expect
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
import 'mocha'
|
||||
import * as chai from 'chai'
|
||||
import { getAudioStream, getVideoStreamSize } from '@server/helpers/ffprobe-utils'
|
||||
import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/extra-utils'
|
||||
import { cleanupTests, createMultipleServers, doubleFollow, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands'
|
||||
|
||||
const expect = chai.expect
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ import {
|
|||
wait,
|
||||
waitJobs,
|
||||
webtorrentAdd
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { HttpStatusCode, VideoCommentThreadTree, VideoPrivacy } from '@shared/models'
|
||||
import { completeVideoCheck } from '@server/tests/shared/video'
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ import {
|
|||
PeerTubeServer,
|
||||
setAccessTokensToServers,
|
||||
setDefaultVideoChannel
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { HttpStatusCode, VideoPrivacy } from '@shared/models'
|
||||
|
||||
const expect = chai.expect
|
||||
|
|
|
@ -10,7 +10,7 @@ import {
|
|||
setAccessTokensToServers,
|
||||
testImage,
|
||||
wait
|
||||
} from '@shared/extra-utils'
|
||||
} from '@shared/server-commands'
|
||||
import { Video, VideoPrivacy } from '@shared/models'
|
||||
import { completeVideoCheck } from '@server/tests/shared/video'
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue