diff options
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.ts | 30 | ||||
-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 @@ | |||
1 | import { exec } from 'child_process' | 1 | import { exec } from 'child_process' |
2 | 2 | ||
3 | import { ServerInfo } from './servers' | 3 | import { ServerInfo } from '../server/servers' |
4 | 4 | ||
5 | function getEnvCli (server?: ServerInfo) { | 5 | function 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 @@ | |||
1 | export * from './activitypub' | 1 | export * from './server/activitypub' |
2 | export * from './cli' | 2 | export * from './cli/cli' |
3 | export * from './clients' | 3 | export * from './server/clients' |
4 | export * from './config' | 4 | export * from './server/config' |
5 | export * from './login' | 5 | export * from './users/login' |
6 | export * from './miscs' | 6 | export * from './miscs/miscs' |
7 | export * from './follows' | 7 | export * from './server/follows' |
8 | export * from './requests' | 8 | export * from './requests/requests' |
9 | export * from './servers' | 9 | export * from './server/servers' |
10 | export * from './services' | 10 | export * from './videos/services' |
11 | export * from './users' | 11 | export * from './users/users' |
12 | export * from './video-abuses' | 12 | export * from './videos/video-abuses' |
13 | export * from './video-blacklist' | 13 | export * from './videos/video-blacklist' |
14 | export * from './video-channels' | 14 | export * from './videos/video-channels' |
15 | export * from './videos' | 15 | export * 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 @@ | |||
1 | import * as request from 'supertest' | 1 | import * as request from 'supertest' |
2 | import { wait } from './miscs' | 2 | import { wait } from '../miscs/miscs' |
3 | import { ServerInfo } from './servers' | 3 | import { ServerInfo } from './servers' |
4 | 4 | ||
5 | function getFollowersListPaginationAndSort (url: string, start: number, count: number, sort: string) { | 5 | function 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 @@ | |||
1 | import * as request from 'supertest' | 1 | import * as request from 'supertest' |
2 | 2 | ||
3 | import { ServerInfo } from './servers' | 3 | import { ServerInfo } from '../server/servers' |
4 | 4 | ||
5 | type Client = { id: string, secret: string } | 5 | type Client = { id: string, secret: string } |
6 | type User = { username: string, password: string } | 6 | type 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 @@ | |||
1 | import * as request from 'supertest' | 1 | import * as request from 'supertest' |
2 | 2 | ||
3 | import { UserRole } from '../../../shared' | 3 | import { UserRole } from '../../../../shared/index' |
4 | 4 | ||
5 | function createUser ( | 5 | function 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 @@ | |||
1 | import { readFile } from 'fs' | 1 | import { readFile } from 'fs' |
2 | import * as request from 'supertest' | ||
3 | import { join, isAbsolute } from 'path' | ||
4 | import * as parseTorrent from 'parse-torrent' | 2 | import * as parseTorrent from 'parse-torrent' |
5 | 3 | import { isAbsolute, join } from 'path' | |
6 | import { makeGetRequest } from './requests' | 4 | import * as request from 'supertest' |
7 | import { readFilePromise } from './miscs' | 5 | import { getMyUserInformation, makeGetRequest, readFilePromise, ServerInfo } from '../' |
8 | import { ServerInfo } from './servers' | 6 | import { VideoPrivacy } from '../../../../shared/models/videos' |
9 | import { getMyUserInformation } from './users' | ||
10 | import { VideoPrivacy } from '../../../shared' | ||
11 | 7 | ||
12 | type VideoAttributes = { | 8 | type VideoAttributes = { |
13 | name?: string | 9 | name?: string |