aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/utils
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2017-12-28 13:59:22 +0100
committerChocobozzz <me@florianbigard.com>2017-12-28 13:59:22 +0100
commitc5d31dba56d669c0df0209761c43c5a6ac7cec4a (patch)
treefe72b56a1c0e7beb6e092c393a00ddfe93a5d71f /server/tests/utils
parentdb799da3d2b2ea465165df78ff71effa653b6309 (diff)
downloadPeerTube-c5d31dba56d669c0df0209761c43c5a6ac7cec4a.tar.gz
PeerTube-c5d31dba56d669c0df0209761c43c5a6ac7cec4a.tar.zst
PeerTube-c5d31dba56d669c0df0209761c43c5a6ac7cec4a.zip
Tests directories refractor
Diffstat (limited to 'server/tests/utils')
-rw-r--r--server/tests/utils/cli/cli.ts (renamed from server/tests/utils/cli.ts)2
-rw-r--r--server/tests/utils/index.ts30
-rw-r--r--server/tests/utils/miscs/miscs.ts (renamed from server/tests/utils/miscs.ts)0
-rw-r--r--server/tests/utils/requests/requests.ts (renamed from server/tests/utils/requests.ts)0
-rw-r--r--server/tests/utils/server/activitypub.ts (renamed from server/tests/utils/activitypub.ts)0
-rw-r--r--server/tests/utils/server/clients.ts (renamed from server/tests/utils/clients.ts)0
-rw-r--r--server/tests/utils/server/config.ts (renamed from server/tests/utils/config.ts)0
-rw-r--r--server/tests/utils/server/follows.ts (renamed from server/tests/utils/follows.ts)2
-rw-r--r--server/tests/utils/server/jobs.ts (renamed from server/tests/utils/jobs.ts)0
-rw-r--r--server/tests/utils/server/servers.ts (renamed from server/tests/utils/servers.ts)0
-rw-r--r--server/tests/utils/users/login.ts (renamed from server/tests/utils/login.ts)2
-rw-r--r--server/tests/utils/users/users.ts (renamed from server/tests/utils/users.ts)2
-rw-r--r--server/tests/utils/videos/services.ts (renamed from server/tests/utils/services.ts)0
-rw-r--r--server/tests/utils/videos/video-abuses.ts (renamed from server/tests/utils/video-abuses.ts)0
-rw-r--r--server/tests/utils/videos/video-blacklist.ts (renamed from server/tests/utils/video-blacklist.ts)0
-rw-r--r--server/tests/utils/videos/video-channels.ts (renamed from server/tests/utils/video-channels.ts)0
-rw-r--r--server/tests/utils/videos/video-comments.ts (renamed from server/tests/utils/video-comments.ts)0
-rw-r--r--server/tests/utils/videos/videos.ts (renamed from server/tests/utils/videos.ts)12
18 files changed, 23 insertions, 27 deletions
diff --git a/server/tests/utils/cli.ts b/server/tests/utils/cli/cli.ts
index 4098fdf6f..54d05e9c6 100644
--- a/server/tests/utils/cli.ts
+++ b/server/tests/utils/cli/cli.ts
@@ -1,6 +1,6 @@
1import { exec } from 'child_process' 1import { exec } from 'child_process'
2 2
3import { ServerInfo } from './servers' 3import { ServerInfo } from '../server/servers'
4 4
5function getEnvCli (server?: ServerInfo) { 5function getEnvCli (server?: ServerInfo) {
6 return `NODE_ENV=test NODE_APP_INSTANCE=${server.serverNumber}` 6 return `NODE_ENV=test NODE_APP_INSTANCE=${server.serverNumber}`
diff --git a/server/tests/utils/index.ts b/server/tests/utils/index.ts
index b918ee83d..d7789e517 100644
--- a/server/tests/utils/index.ts
+++ b/server/tests/utils/index.ts
@@ -1,15 +1,15 @@
1export * from './activitypub' 1export * from './server/activitypub'
2export * from './cli' 2export * from './cli/cli'
3export * from './clients' 3export * from './server/clients'
4export * from './config' 4export * from './server/config'
5export * from './login' 5export * from './users/login'
6export * from './miscs' 6export * from './miscs/miscs'
7export * from './follows' 7export * from './server/follows'
8export * from './requests' 8export * from './requests/requests'
9export * from './servers' 9export * from './server/servers'
10export * from './services' 10export * from './videos/services'
11export * from './users' 11export * from './users/users'
12export * from './video-abuses' 12export * from './videos/video-abuses'
13export * from './video-blacklist' 13export * from './videos/video-blacklist'
14export * from './video-channels' 14export * from './videos/video-channels'
15export * from './videos' 15export * from './videos/videos'
diff --git a/server/tests/utils/miscs.ts b/server/tests/utils/miscs/miscs.ts
index 424b0db98..424b0db98 100644
--- a/server/tests/utils/miscs.ts
+++ b/server/tests/utils/miscs/miscs.ts
diff --git a/server/tests/utils/requests.ts b/server/tests/utils/requests/requests.ts
index 52b7a4c29..52b7a4c29 100644
--- a/server/tests/utils/requests.ts
+++ b/server/tests/utils/requests/requests.ts
diff --git a/server/tests/utils/activitypub.ts b/server/tests/utils/server/activitypub.ts
index cf3c1c3b3..cf3c1c3b3 100644
--- a/server/tests/utils/activitypub.ts
+++ b/server/tests/utils/server/activitypub.ts
diff --git a/server/tests/utils/clients.ts b/server/tests/utils/server/clients.ts
index a8c5b51c5..a8c5b51c5 100644
--- a/server/tests/utils/clients.ts
+++ b/server/tests/utils/server/clients.ts
diff --git a/server/tests/utils/config.ts b/server/tests/utils/server/config.ts
index d09c19c60..d09c19c60 100644
--- a/server/tests/utils/config.ts
+++ b/server/tests/utils/server/config.ts
diff --git a/server/tests/utils/follows.ts b/server/tests/utils/server/follows.ts
index a9f798bcb..82e89175c 100644
--- a/server/tests/utils/follows.ts
+++ b/server/tests/utils/server/follows.ts
@@ -1,5 +1,5 @@
1import * as request from 'supertest' 1import * as request from 'supertest'
2import { wait } from './miscs' 2import { wait } from '../miscs/miscs'
3import { ServerInfo } from './servers' 3import { ServerInfo } from './servers'
4 4
5function getFollowersListPaginationAndSort (url: string, start: number, count: number, sort: string) { 5function getFollowersListPaginationAndSort (url: string, start: number, count: number, sort: string) {
diff --git a/server/tests/utils/jobs.ts b/server/tests/utils/server/jobs.ts
index 0a8c51575..0a8c51575 100644
--- a/server/tests/utils/jobs.ts
+++ b/server/tests/utils/server/jobs.ts
diff --git a/server/tests/utils/servers.ts b/server/tests/utils/server/servers.ts
index 8340fbc18..8340fbc18 100644
--- a/server/tests/utils/servers.ts
+++ b/server/tests/utils/server/servers.ts
diff --git a/server/tests/utils/login.ts b/server/tests/utils/users/login.ts
index 22d37c46f..855c4828d 100644
--- a/server/tests/utils/login.ts
+++ b/server/tests/utils/users/login.ts
@@ -1,6 +1,6 @@
1import * as request from 'supertest' 1import * as request from 'supertest'
2 2
3import { ServerInfo } from './servers' 3import { ServerInfo } from '../server/servers'
4 4
5type Client = { id: string, secret: string } 5type Client = { id: string, secret: string }
6type User = { username: string, password: string } 6type User = { username: string, password: string }
diff --git a/server/tests/utils/users.ts b/server/tests/utils/users/users.ts
index a37d84ab4..bd8d7ab04 100644
--- a/server/tests/utils/users.ts
+++ b/server/tests/utils/users/users.ts
@@ -1,6 +1,6 @@
1import * as request from 'supertest' 1import * as request from 'supertest'
2 2
3import { UserRole } from '../../../shared' 3import { UserRole } from '../../../../shared/index'
4 4
5function createUser ( 5function createUser (
6 url: string, 6 url: string,
diff --git a/server/tests/utils/services.ts b/server/tests/utils/videos/services.ts
index 1a53dd4cf..1a53dd4cf 100644
--- a/server/tests/utils/services.ts
+++ b/server/tests/utils/videos/services.ts
diff --git a/server/tests/utils/video-abuses.ts b/server/tests/utils/videos/video-abuses.ts
index f00809234..f00809234 100644
--- a/server/tests/utils/video-abuses.ts
+++ b/server/tests/utils/videos/video-abuses.ts
diff --git a/server/tests/utils/video-blacklist.ts b/server/tests/utils/videos/video-blacklist.ts
index 3a499f46a..3a499f46a 100644
--- a/server/tests/utils/video-blacklist.ts
+++ b/server/tests/utils/videos/video-blacklist.ts
diff --git a/server/tests/utils/video-channels.ts b/server/tests/utils/videos/video-channels.ts
index 0fb80d331..0fb80d331 100644
--- a/server/tests/utils/video-channels.ts
+++ b/server/tests/utils/videos/video-channels.ts
diff --git a/server/tests/utils/video-comments.ts b/server/tests/utils/videos/video-comments.ts
index 878147049..878147049 100644
--- a/server/tests/utils/video-comments.ts
+++ b/server/tests/utils/videos/video-comments.ts
diff --git a/server/tests/utils/videos.ts b/server/tests/utils/videos/videos.ts
index fb758cf29..6de1b8c92 100644
--- a/server/tests/utils/videos.ts
+++ b/server/tests/utils/videos/videos.ts
@@ -1,13 +1,9 @@
1import { readFile } from 'fs' 1import { readFile } from 'fs'
2import * as request from 'supertest'
3import { join, isAbsolute } from 'path'
4import * as parseTorrent from 'parse-torrent' 2import * as parseTorrent from 'parse-torrent'
5 3import { isAbsolute, join } from 'path'
6import { makeGetRequest } from './requests' 4import * as request from 'supertest'
7import { readFilePromise } from './miscs' 5import { getMyUserInformation, makeGetRequest, readFilePromise, ServerInfo } from '../'
8import { ServerInfo } from './servers' 6import { VideoPrivacy } from '../../../../shared/models/videos'
9import { getMyUserInformation } from './users'
10import { VideoPrivacy } from '../../../shared'
11 7
12type VideoAttributes = { 8type VideoAttributes = {
13 name?: string 9 name?: string