diff options
author | Chocobozzz <me@florianbigard.com> | 2020-01-31 16:56:52 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-02-03 08:31:02 +0100 |
commit | a15871560f80e07386c1dabb8370cd2664ecfd1f (patch) | |
tree | 44440e140c9e43b0d7f97ade777a76e649e0553d /server/tests/cli/prune-storage.ts | |
parent | a22046d166805222ca76060e471b6cb3d419a32d (diff) | |
download | PeerTube-a15871560f80e07386c1dabb8370cd2664ecfd1f.tar.gz PeerTube-a15871560f80e07386c1dabb8370cd2664ecfd1f.tar.zst PeerTube-a15871560f80e07386c1dabb8370cd2664ecfd1f.zip |
Move to eslintcontain
Diffstat (limited to 'server/tests/cli/prune-storage.ts')
-rw-r--r-- | server/tests/cli/prune-storage.ts | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/server/tests/cli/prune-storage.ts b/server/tests/cli/prune-storage.ts index 144e67c44..304c8ca56 100644 --- a/server/tests/cli/prune-storage.ts +++ b/server/tests/cli/prune-storage.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | /* tslint:disable:no-unused-expression */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import * as chai from 'chai' | 4 | import * as chai from 'chai' |
@@ -11,9 +11,11 @@ import { | |||
11 | execCLI, | 11 | execCLI, |
12 | flushAndRunMultipleServers, | 12 | flushAndRunMultipleServers, |
13 | getAccount, | 13 | getAccount, |
14 | getEnvCli, makeGetRequest, makeRawRequest, | 14 | getEnvCli, |
15 | makeGetRequest, | ||
15 | ServerInfo, | 16 | ServerInfo, |
16 | setAccessTokensToServers, setDefaultVideoChannel, | 17 | setAccessTokensToServers, |
18 | setDefaultVideoChannel, | ||
17 | updateMyAvatar, | 19 | updateMyAvatar, |
18 | uploadVideo, | 20 | uploadVideo, |
19 | wait | 21 | wait |
@@ -22,7 +24,6 @@ import { Account, VideoPlaylistPrivacy } from '../../../shared/models' | |||
22 | import { createFile, readdir } from 'fs-extra' | 24 | import { createFile, readdir } from 'fs-extra' |
23 | import * as uuidv4 from 'uuid/v4' | 25 | import * as uuidv4 from 'uuid/v4' |
24 | import { join } from 'path' | 26 | import { join } from 'path' |
25 | import * as request from 'supertest' | ||
26 | 27 | ||
27 | const expect = chai.expect | 28 | const expect = chai.expect |
28 | 29 | ||
@@ -61,7 +62,7 @@ async function assertCountAreOkay (servers: ServerInfo[]) { | |||
61 | 62 | ||
62 | describe('Test prune storage scripts', function () { | 63 | describe('Test prune storage scripts', function () { |
63 | let servers: ServerInfo[] | 64 | let servers: ServerInfo[] |
64 | const badNames: { [ directory: string ]: string[] } = {} | 65 | const badNames: { [directory: string]: string[] } = {} |
65 | 66 | ||
66 | before(async function () { | 67 | before(async function () { |
67 | this.timeout(120000) | 68 | this.timeout(120000) |
@@ -92,20 +93,20 @@ describe('Test prune storage scripts', function () { | |||
92 | 93 | ||
93 | // Lazy load the remote avatar | 94 | // Lazy load the remote avatar |
94 | { | 95 | { |
95 | const res = await getAccount(servers[ 0 ].url, 'root@localhost:' + servers[ 1 ].port) | 96 | const res = await getAccount(servers[0].url, 'root@localhost:' + servers[1].port) |
96 | const account: Account = res.body | 97 | const account: Account = res.body |
97 | await makeGetRequest({ | 98 | await makeGetRequest({ |
98 | url: servers[ 0 ].url, | 99 | url: servers[0].url, |
99 | path: account.avatar.path, | 100 | path: account.avatar.path, |
100 | statusCodeExpected: 200 | 101 | statusCodeExpected: 200 |
101 | }) | 102 | }) |
102 | } | 103 | } |
103 | 104 | ||
104 | { | 105 | { |
105 | const res = await getAccount(servers[ 1 ].url, 'root@localhost:' + servers[ 0 ].port) | 106 | const res = await getAccount(servers[1].url, 'root@localhost:' + servers[0].port) |
106 | const account: Account = res.body | 107 | const account: Account = res.body |
107 | await makeGetRequest({ | 108 | await makeGetRequest({ |
108 | url: servers[ 1 ].url, | 109 | url: servers[1].url, |
109 | path: account.avatar.path, | 110 | path: account.avatar.path, |
110 | statusCodeExpected: 200 | 111 | statusCodeExpected: 200 |
111 | }) | 112 | }) |