From bf54587a3e2ad9c2c186828f2a5682b91ee2cc00 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 17 Dec 2021 09:29:23 +0100 Subject: shared/ typescript types dir server-commands --- server/tests/api/check-params/abuses.ts | 2 +- server/tests/api/check-params/accounts.ts | 2 +- server/tests/api/check-params/blocklist.ts | 2 +- server/tests/api/check-params/bulk.ts | 2 +- server/tests/api/check-params/config.ts | 2 +- server/tests/api/check-params/contact-form.ts | 10 ++++++++-- server/tests/api/check-params/custom-pages.ts | 2 +- server/tests/api/check-params/debug.ts | 2 +- server/tests/api/check-params/follows.ts | 2 +- server/tests/api/check-params/jobs.ts | 2 +- server/tests/api/check-params/live.ts | 2 +- server/tests/api/check-params/logs.ts | 2 +- server/tests/api/check-params/my-user.ts | 2 +- server/tests/api/check-params/plugins.ts | 2 +- server/tests/api/check-params/redundancy.ts | 2 +- server/tests/api/check-params/search.ts | 2 +- server/tests/api/check-params/services.ts | 2 +- server/tests/api/check-params/transcoding.ts | 2 +- server/tests/api/check-params/upload-quota.ts | 2 +- server/tests/api/check-params/user-notifications.ts | 2 +- server/tests/api/check-params/user-subscriptions.ts | 2 +- server/tests/api/check-params/users-admin.ts | 2 +- server/tests/api/check-params/users.ts | 2 +- server/tests/api/check-params/video-blacklist.ts | 2 +- server/tests/api/check-params/video-captions.ts | 2 +- server/tests/api/check-params/video-channels.ts | 2 +- server/tests/api/check-params/video-comments.ts | 2 +- server/tests/api/check-params/video-files.ts | 2 +- server/tests/api/check-params/video-imports.ts | 2 +- server/tests/api/check-params/video-playlists.ts | 2 +- server/tests/api/check-params/videos-common-filters.ts | 2 +- server/tests/api/check-params/videos-history.ts | 2 +- server/tests/api/check-params/videos-overviews.ts | 2 +- server/tests/api/check-params/videos.ts | 2 +- 34 files changed, 41 insertions(+), 35 deletions(-) (limited to 'server/tests/api/check-params') diff --git a/server/tests/api/check-params/abuses.ts b/server/tests/api/check-params/abuses.ts index fb9a5fd8b..58167cbab 100644 --- a/server/tests/api/check-params/abuses.ts +++ b/server/tests/api/check-params/abuses.ts @@ -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 () { diff --git a/server/tests/api/check-params/accounts.ts b/server/tests/api/check-params/accounts.ts index 141d869b7..fc8e63ed4 100644 --- a/server/tests/api/check-params/accounts.ts +++ b/server/tests/api/check-params/accounts.ts @@ -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 () { diff --git a/server/tests/api/check-params/blocklist.ts b/server/tests/api/check-params/blocklist.ts index f72a892e2..2dc3a166d 100644 --- a/server/tests/api/check-params/blocklist.ts +++ b/server/tests/api/check-params/blocklist.ts @@ -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 () { diff --git a/server/tests/api/check-params/bulk.ts b/server/tests/api/check-params/bulk.ts index bc9d7784d..9bd0016cf 100644 --- a/server/tests/api/check-params/bulk.ts +++ b/server/tests/api/check-params/bulk.ts @@ -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 () { diff --git a/server/tests/api/check-params/config.ts b/server/tests/api/check-params/config.ts index a6e87730a..3cccb612a 100644 --- a/server/tests/api/check-params/config.ts +++ b/server/tests/api/check-params/config.ts @@ -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 () { diff --git a/server/tests/api/check-params/contact-form.ts b/server/tests/api/check-params/contact-form.ts index 9f86fecc6..a2e51e14d 100644 --- a/server/tests/api/check-params/contact-form.ts +++ b/server/tests/api/check-params/contact-form.ts @@ -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 diff --git a/server/tests/api/check-params/custom-pages.ts b/server/tests/api/check-params/custom-pages.ts index 9fbbea315..a102ee437 100644 --- a/server/tests/api/check-params/custom-pages.ts +++ b/server/tests/api/check-params/custom-pages.ts @@ -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 () { diff --git a/server/tests/api/check-params/debug.ts b/server/tests/api/check-params/debug.ts index a55786359..cfa44deca 100644 --- a/server/tests/api/check-params/debug.ts +++ b/server/tests/api/check-params/debug.ts @@ -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 () { diff --git a/server/tests/api/check-params/follows.ts b/server/tests/api/check-params/follows.ts index 2bc9f6b96..6121d2202 100644 --- a/server/tests/api/check-params/follows.ts +++ b/server/tests/api/check-params/follows.ts @@ -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 () { diff --git a/server/tests/api/check-params/jobs.ts b/server/tests/api/check-params/jobs.ts index 23d95d8e4..b7c603755 100644 --- a/server/tests/api/check-params/jobs.ts +++ b/server/tests/api/check-params/jobs.ts @@ -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 () { diff --git a/server/tests/api/check-params/live.ts b/server/tests/api/check-params/live.ts index 8e1d655d4..8b79d97e0 100644 --- a/server/tests/api/check-params/live.ts +++ b/server/tests/api/check-params/live.ts @@ -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 () { diff --git a/server/tests/api/check-params/logs.ts b/server/tests/api/check-params/logs.ts index 05372257a..970671c15 100644 --- a/server/tests/api/check-params/logs.ts +++ b/server/tests/api/check-params/logs.ts @@ -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 () { diff --git a/server/tests/api/check-params/my-user.ts b/server/tests/api/check-params/my-user.ts index d35284d60..c8ac71476 100644 --- a/server/tests/api/check-params/my-user.ts +++ b/server/tests/api/check-params/my-user.ts @@ -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 () { diff --git a/server/tests/api/check-params/plugins.ts b/server/tests/api/check-params/plugins.ts index 2c436376c..79e487590 100644 --- a/server/tests/api/check-params/plugins.ts +++ b/server/tests/api/check-params/plugins.ts @@ -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 () { diff --git a/server/tests/api/check-params/redundancy.ts b/server/tests/api/check-params/redundancy.ts index d9f905549..f3bfcb16c 100644 --- a/server/tests/api/check-params/redundancy.ts +++ b/server/tests/api/check-params/redundancy.ts @@ -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 () { diff --git a/server/tests/api/check-params/search.ts b/server/tests/api/check-params/search.ts index cc15d2593..edeeed571 100644 --- a/server/tests/api/check-params/search.ts +++ b/server/tests/api/check-params/search.ts @@ -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) { diff --git a/server/tests/api/check-params/services.ts b/server/tests/api/check-params/services.ts index 8d795fabc..e63f09884 100644 --- a/server/tests/api/check-params/services.ts +++ b/server/tests/api/check-params/services.ts @@ -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 () { diff --git a/server/tests/api/check-params/transcoding.ts b/server/tests/api/check-params/transcoding.ts index 6b6f73d46..11ade9071 100644 --- a/server/tests/api/check-params/transcoding.ts +++ b/server/tests/api/check-params/transcoding.ts @@ -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 () { diff --git a/server/tests/api/check-params/upload-quota.ts b/server/tests/api/check-params/upload-quota.ts index 322e93d0d..02898bb87 100644 --- a/server/tests/api/check-params/upload-quota.ts +++ b/server/tests/api/check-params/upload-quota.ts @@ -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 () { diff --git a/server/tests/api/check-params/user-notifications.ts b/server/tests/api/check-params/user-notifications.ts index 17edf5aa1..912d4a992 100644 --- a/server/tests/api/check-params/user-notifications.ts +++ b/server/tests/api/check-params/user-notifications.ts @@ -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 () { diff --git a/server/tests/api/check-params/user-subscriptions.ts b/server/tests/api/check-params/user-subscriptions.ts index 624069c80..95226dff5 100644 --- a/server/tests/api/check-params/user-subscriptions.ts +++ b/server/tests/api/check-params/user-subscriptions.ts @@ -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 () { diff --git a/server/tests/api/check-params/users-admin.ts b/server/tests/api/check-params/users-admin.ts index f71414a6b..c98b5e189 100644 --- a/server/tests/api/check-params/users-admin.ts +++ b/server/tests/api/check-params/users-admin.ts @@ -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 () { diff --git a/server/tests/api/check-params/users.ts b/server/tests/api/check-params/users.ts index 5f9cbc5eb..254177afd 100644 --- a/server/tests/api/check-params/users.ts +++ b/server/tests/api/check-params/users.ts @@ -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 () { diff --git a/server/tests/api/check-params/video-blacklist.ts b/server/tests/api/check-params/video-blacklist.ts index 1f926d227..7eb3c1cae 100644 --- a/server/tests/api/check-params/video-blacklist.ts +++ b/server/tests/api/check-params/video-blacklist.ts @@ -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 () { diff --git a/server/tests/api/check-params/video-captions.ts b/server/tests/api/check-params/video-captions.ts index 90f429314..34c1a9673 100644 --- a/server/tests/api/check-params/video-captions.ts +++ b/server/tests/api/check-params/video-captions.ts @@ -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 () { diff --git a/server/tests/api/check-params/video-channels.ts b/server/tests/api/check-params/video-channels.ts index e86c315fa..747a5d3ec 100644 --- a/server/tests/api/check-params/video-channels.ts +++ b/server/tests/api/check-params/video-channels.ts @@ -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 diff --git a/server/tests/api/check-params/video-comments.ts b/server/tests/api/check-params/video-comments.ts index 2d9ee1e0d..05cf61cba 100644 --- a/server/tests/api/check-params/video-comments.ts +++ b/server/tests/api/check-params/video-comments.ts @@ -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 diff --git a/server/tests/api/check-params/video-files.ts b/server/tests/api/check-params/video-files.ts index 3ccdf5f49..90ab4460c 100644 --- a/server/tests/api/check-params/video-files.ts +++ b/server/tests/api/check-params/video-files.ts @@ -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 () { diff --git a/server/tests/api/check-params/video-imports.ts b/server/tests/api/check-params/video-imports.ts index d6d745488..7cefb2a54 100644 --- a/server/tests/api/check-params/video-imports.ts +++ b/server/tests/api/check-params/video-imports.ts @@ -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 () { diff --git a/server/tests/api/check-params/video-playlists.ts b/server/tests/api/check-params/video-playlists.ts index e4d541b48..ac3c13f78 100644 --- a/server/tests/api/check-params/video-playlists.ts +++ b/server/tests/api/check-params/video-playlists.ts @@ -12,7 +12,7 @@ import { PlaylistsCommand, setAccessTokensToServers, setDefaultVideoChannel -} from '@shared/extra-utils' +} from '@shared/server-commands' import { HttpStatusCode, VideoPlaylistCreate, diff --git a/server/tests/api/check-params/videos-common-filters.ts b/server/tests/api/check-params/videos-common-filters.ts index f2b5bee8e..6b3ec917e 100644 --- a/server/tests/api/check-params/videos-common-filters.ts +++ b/server/tests/api/check-params/videos-common-filters.ts @@ -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 () { diff --git a/server/tests/api/check-params/videos-history.ts b/server/tests/api/check-params/videos-history.ts index c3c309ed2..e4b4c4b2a 100644 --- a/server/tests/api/check-params/videos-history.ts +++ b/server/tests/api/check-params/videos-history.ts @@ -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 () { diff --git a/server/tests/api/check-params/videos-overviews.ts b/server/tests/api/check-params/videos-overviews.ts index c2139d74b..1da15dc43 100644 --- a/server/tests/api/check-params/videos-overviews.ts +++ b/server/tests/api/check-params/videos-overviews.ts @@ -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 diff --git a/server/tests/api/check-params/videos.ts b/server/tests/api/check-params/videos.ts index d02b6e156..3b2607eed 100644 --- a/server/tests/api/check-params/videos.ts +++ b/server/tests/api/check-params/videos.ts @@ -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 -- cgit v1.2.3