aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/cli
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-12-17 11:58:15 +0100
committerChocobozzz <me@florianbigard.com>2021-12-17 12:24:03 +0100
commitc55e3d7227fe1453869e309025996b9d75256d5d (patch)
tree08e9b0ca210d75c82c8606fef0852eca020e8e0e /server/tests/cli
parentbf54587a3e2ad9c2c186828f2a5682b91ee2cc00 (diff)
downloadPeerTube-c55e3d7227fe1453869e309025996b9d75256d5d.tar.gz
PeerTube-c55e3d7227fe1453869e309025996b9d75256d5d.tar.zst
PeerTube-c55e3d7227fe1453869e309025996b9d75256d5d.zip
Move test functions outside extra-utils
Diffstat (limited to 'server/tests/cli')
-rw-r--r--server/tests/cli/create-import-video-file-job.ts6
-rw-r--r--server/tests/cli/create-move-video-storage-job.ts7
-rw-r--r--server/tests/cli/create-transcoding-job.ts6
-rw-r--r--server/tests/cli/peertube.ts8
-rw-r--r--server/tests/cli/plugins.ts2
-rw-r--r--server/tests/cli/print-transcode-command.ts3
-rw-r--r--server/tests/cli/prune-storage.ts5
-rw-r--r--server/tests/cli/reset-password.ts2
8 files changed, 18 insertions, 21 deletions
diff --git a/server/tests/cli/create-import-video-file-job.ts b/server/tests/cli/create-import-video-file-job.ts
index 5973272e5..8ef0545d0 100644
--- a/server/tests/cli/create-import-video-file-job.ts
+++ b/server/tests/cli/create-import-video-file-job.ts
@@ -2,19 +2,19 @@
2 2
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { areObjectStorageTestsDisabled } from '@shared/core-utils'
6import { HttpStatusCode, VideoDetails, VideoFile, VideoInclude } from '@shared/models'
5import { 7import {
6 areObjectStorageTestsDisabled,
7 cleanupTests, 8 cleanupTests,
8 createMultipleServers, 9 createMultipleServers,
9 doubleFollow, 10 doubleFollow,
10 expectStartWith,
11 makeRawRequest, 11 makeRawRequest,
12 ObjectStorageCommand, 12 ObjectStorageCommand,
13 PeerTubeServer, 13 PeerTubeServer,
14 setAccessTokensToServers, 14 setAccessTokensToServers,
15 waitJobs 15 waitJobs
16} from '@shared/server-commands' 16} from '@shared/server-commands'
17import { HttpStatusCode, VideoDetails, VideoFile, VideoInclude } from '@shared/models' 17import { expectStartWith } from '../shared'
18 18
19const expect = chai.expect 19const expect = chai.expect
20 20
diff --git a/server/tests/cli/create-move-video-storage-job.ts b/server/tests/cli/create-move-video-storage-job.ts
index 8b66f24bf..c674d28d2 100644
--- a/server/tests/cli/create-move-video-storage-job.ts
+++ b/server/tests/cli/create-move-video-storage-job.ts
@@ -1,20 +1,19 @@
1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ 1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
2 2
3import 'mocha' 3import 'mocha'
4 4import { areObjectStorageTestsDisabled } from '@shared/core-utils'
5import { HttpStatusCode, VideoDetails } from '@shared/models'
5import { 6import {
6 areObjectStorageTestsDisabled,
7 cleanupTests, 7 cleanupTests,
8 createMultipleServers, 8 createMultipleServers,
9 doubleFollow, 9 doubleFollow,
10 expectStartWith,
11 makeRawRequest, 10 makeRawRequest,
12 ObjectStorageCommand, 11 ObjectStorageCommand,
13 PeerTubeServer, 12 PeerTubeServer,
14 setAccessTokensToServers, 13 setAccessTokensToServers,
15 waitJobs 14 waitJobs
16} from '@shared/server-commands' 15} from '@shared/server-commands'
17import { HttpStatusCode, VideoDetails } from '@shared/models' 16import { expectStartWith } from '../shared'
18 17
19async function checkFiles (origin: PeerTubeServer, video: VideoDetails, inObjectStorage: boolean) { 18async function checkFiles (origin: PeerTubeServer, video: VideoDetails, inObjectStorage: boolean) {
20 for (const file of video.files) { 19 for (const file of video.files) {
diff --git a/server/tests/cli/create-transcoding-job.ts b/server/tests/cli/create-transcoding-job.ts
index ea3428662..c85130fef 100644
--- a/server/tests/cli/create-transcoding-job.ts
+++ b/server/tests/cli/create-transcoding-job.ts
@@ -2,19 +2,19 @@
2 2
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { areObjectStorageTestsDisabled } from '@shared/core-utils'
5import { HttpStatusCode, VideoFile } from '@shared/models' 6import { HttpStatusCode, VideoFile } from '@shared/models'
6import { 7import {
7 areObjectStorageTestsDisabled,
8 cleanupTests, 8 cleanupTests,
9 createMultipleServers, 9 createMultipleServers,
10 doubleFollow, 10 doubleFollow,
11 expectStartWith,
12 makeRawRequest, 11 makeRawRequest,
13 ObjectStorageCommand, 12 ObjectStorageCommand,
14 PeerTubeServer, 13 PeerTubeServer,
15 setAccessTokensToServers, 14 setAccessTokensToServers,
16 waitJobs 15 waitJobs
17} from '../../../shared/server-commands' 16} from '@shared/server-commands'
17import { expectStartWith } from '../shared'
18 18
19const expect = chai.expect 19const expect = chai.expect
20 20
diff --git a/server/tests/cli/peertube.ts b/server/tests/cli/peertube.ts
index 72213473b..034d216e3 100644
--- a/server/tests/cli/peertube.ts
+++ b/server/tests/cli/peertube.ts
@@ -2,19 +2,17 @@
2 2
3import 'mocha' 3import 'mocha'
4import { expect } from 'chai' 4import { expect } from 'chai'
5import { areHttpImportTestsDisabled, buildAbsoluteFixturePath } from '@shared/core-utils'
5import { 6import {
6 areHttpImportTestsDisabled,
7 buildAbsoluteFixturePath,
8 cleanupTests, 7 cleanupTests,
9 CLICommand, 8 CLICommand,
10 createSingleServer, 9 createSingleServer,
11 doubleFollow, 10 doubleFollow,
12 FIXTURE_URLS,
13 PeerTubeServer, 11 PeerTubeServer,
14 setAccessTokensToServers, 12 setAccessTokensToServers,
15 testHelloWorldRegisteredSettings,
16 waitJobs 13 waitJobs
17} from '../../../shared/server-commands' 14} from '@shared/server-commands'
15import { FIXTURE_URLS, testHelloWorldRegisteredSettings } from '../shared'
18 16
19describe('Test CLI wrapper', function () { 17describe('Test CLI wrapper', function () {
20 let server: PeerTubeServer 18 let server: PeerTubeServer
diff --git a/server/tests/cli/plugins.ts b/server/tests/cli/plugins.ts
index d9cf9465c..cd9f4e1c3 100644
--- a/server/tests/cli/plugins.ts
+++ b/server/tests/cli/plugins.ts
@@ -9,7 +9,7 @@ import {
9 PeerTubeServer, 9 PeerTubeServer,
10 PluginsCommand, 10 PluginsCommand,
11 setAccessTokensToServers 11 setAccessTokensToServers
12} from '../../../shared/server-commands' 12} from '@shared/server-commands'
13 13
14describe('Test plugin scripts', function () { 14describe('Test plugin scripts', function () {
15 let server: PeerTubeServer 15 let server: PeerTubeServer
diff --git a/server/tests/cli/print-transcode-command.ts b/server/tests/cli/print-transcode-command.ts
index 36c43c6df..27896f031 100644
--- a/server/tests/cli/print-transcode-command.ts
+++ b/server/tests/cli/print-transcode-command.ts
@@ -2,7 +2,8 @@
2 2
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { buildAbsoluteFixturePath, CLICommand } from '@shared/server-commands' 5import { buildAbsoluteFixturePath } from '@shared/core-utils'
6import { CLICommand } from '@shared/server-commands'
6import { VideoResolution } from '../../../shared/models/videos' 7import { VideoResolution } from '../../../shared/models/videos'
7 8
8const expect = chai.expect 9const expect = chai.expect
diff --git a/server/tests/cli/prune-storage.ts b/server/tests/cli/prune-storage.ts
index e0bc6a589..8e8fc7e20 100644
--- a/server/tests/cli/prune-storage.ts
+++ b/server/tests/cli/prune-storage.ts
@@ -4,7 +4,8 @@ import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { createFile, readdir } from 'fs-extra' 5import { createFile, readdir } from 'fs-extra'
6import { join } from 'path' 6import { join } from 'path'
7import { buildUUID } from '@shared/core-utils/uuid' 7import { buildUUID, wait } from '@shared/core-utils'
8import { HttpStatusCode, VideoPlaylistPrivacy } from '@shared/models'
8import { 9import {
9 cleanupTests, 10 cleanupTests,
10 CLICommand, 11 CLICommand,
@@ -15,10 +16,8 @@ import {
15 PeerTubeServer, 16 PeerTubeServer,
16 setAccessTokensToServers, 17 setAccessTokensToServers,
17 setDefaultVideoChannel, 18 setDefaultVideoChannel,
18 wait,
19 waitJobs 19 waitJobs
20} from '@shared/server-commands' 20} from '@shared/server-commands'
21import { HttpStatusCode, VideoPlaylistPrivacy } from '@shared/models'
22 21
23const expect = chai.expect 22const expect = chai.expect
24 23
diff --git a/server/tests/cli/reset-password.ts b/server/tests/cli/reset-password.ts
index 34dedb113..018e9d788 100644
--- a/server/tests/cli/reset-password.ts
+++ b/server/tests/cli/reset-password.ts
@@ -1,5 +1,5 @@
1import 'mocha' 1import 'mocha'
2import { cleanupTests, CLICommand, createSingleServer, PeerTubeServer, setAccessTokensToServers } from '../../../shared/server-commands' 2import { cleanupTests, CLICommand, createSingleServer, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands'
3 3
4describe('Test reset password scripts', function () { 4describe('Test reset password scripts', function () {
5 let server: PeerTubeServer 5 let server: PeerTubeServer