-/* tslint:disable:no-unused-expression */
+/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
import 'mocha'
import * as chai from 'chai'
execCLI,
flushAndRunMultipleServers,
getAccount,
- getEnvCli, makeGetRequest, makeRawRequest,
+ getEnvCli,
+ makeGetRequest,
ServerInfo,
- setAccessTokensToServers, setDefaultVideoChannel,
+ setAccessTokensToServers,
+ setDefaultVideoChannel,
updateMyAvatar,
uploadVideo,
wait
} from '../../../shared/extra-utils'
import { Account, VideoPlaylistPrivacy } from '../../../shared/models'
import { createFile, readdir } from 'fs-extra'
-import * as uuidv4 from 'uuid/v4'
+import { v4 as uuidv4 } from 'uuid'
import { join } from 'path'
-import * as request from 'supertest'
const expect = chai.expect
describe('Test prune storage scripts', function () {
let servers: ServerInfo[]
- const badNames: { [ directory: string ]: string[] } = {}
+ const badNames: { [directory: string]: string[] } = {}
before(async function () {
this.timeout(120000)
// Lazy load the remote avatar
{
- const res = await getAccount(servers[ 0 ].url, 'root@localhost:' + servers[ 1 ].port)
+ const res = await getAccount(servers[0].url, 'root@localhost:' + servers[1].port)
const account: Account = res.body
await makeGetRequest({
- url: servers[ 0 ].url,
+ url: servers[0].url,
path: account.avatar.path,
statusCodeExpected: 200
})
}
{
- const res = await getAccount(servers[ 1 ].url, 'root@localhost:' + servers[ 0 ].port)
+ const res = await getAccount(servers[1].url, 'root@localhost:' + servers[0].port)
const account: Account = res.body
await makeGetRequest({
- url: servers[ 1 ].url,
+ url: servers[1].url,
path: account.avatar.path,
statusCodeExpected: 200
})