aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/cli/prune-storage.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-07 13:38:26 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:17 +0200
commit9fff08cf83f34339df7ed4ac770e1dee536adf9d (patch)
tree36eac5147a12ae257a3e8aaeffae37c9aed23d0a /server/tests/cli/prune-storage.ts
parent87e2635a50ac2decb1c330e55c2ff7b6d07a85de (diff)
downloadPeerTube-9fff08cf83f34339df7ed4ac770e1dee536adf9d.tar.gz
PeerTube-9fff08cf83f34339df7ed4ac770e1dee536adf9d.tar.zst
PeerTube-9fff08cf83f34339df7ed4ac770e1dee536adf9d.zip
Introduce accounts command
Diffstat (limited to 'server/tests/cli/prune-storage.ts')
-rw-r--r--server/tests/cli/prune-storage.ts17
1 files changed, 7 insertions, 10 deletions
diff --git a/server/tests/cli/prune-storage.ts b/server/tests/cli/prune-storage.ts
index 81f91105c..95f573e50 100644
--- a/server/tests/cli/prune-storage.ts
+++ b/server/tests/cli/prune-storage.ts
@@ -5,7 +5,7 @@ import * 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 '@server/helpers/uuid' 7import { buildUUID } from '@server/helpers/uuid'
8import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes' 8import { HttpStatusCode } from '@shared/core-utils'
9import { 9import {
10 buildServerDirectory, 10 buildServerDirectory,
11 cleanupTests, 11 cleanupTests,
@@ -13,7 +13,6 @@ import {
13 createVideoPlaylist, 13 createVideoPlaylist,
14 doubleFollow, 14 doubleFollow,
15 flushAndRunMultipleServers, 15 flushAndRunMultipleServers,
16 getAccount,
17 killallServers, 16 killallServers,
18 makeGetRequest, 17 makeGetRequest,
19 ServerInfo, 18 ServerInfo,
@@ -21,10 +20,10 @@ import {
21 setDefaultVideoChannel, 20 setDefaultVideoChannel,
22 updateMyAvatar, 21 updateMyAvatar,
23 uploadVideo, 22 uploadVideo,
24 wait 23 wait,
25} from '../../../shared/extra-utils' 24 waitJobs
26import { waitJobs } from '../../../shared/extra-utils/server/jobs' 25} from '@shared/extra-utils'
27import { Account, VideoPlaylistPrivacy } from '../../../shared/models' 26import { VideoPlaylistPrivacy } from '@shared/models'
28 27
29const expect = chai.expect 28const expect = chai.expect
30 29
@@ -94,8 +93,7 @@ describe('Test prune storage scripts', function () {
94 93
95 // Lazy load the remote avatar 94 // Lazy load the remote avatar
96 { 95 {
97 const res = await getAccount(servers[0].url, 'root@localhost:' + servers[1].port) 96 const account = await servers[0].accountsCommand.get({ accountName: 'root@localhost:' + servers[1].port })
98 const account: Account = res.body
99 await makeGetRequest({ 97 await makeGetRequest({
100 url: servers[0].url, 98 url: servers[0].url,
101 path: account.avatar.path, 99 path: account.avatar.path,
@@ -104,8 +102,7 @@ describe('Test prune storage scripts', function () {
104 } 102 }
105 103
106 { 104 {
107 const res = await getAccount(servers[1].url, 'root@localhost:' + servers[0].port) 105 const account = await servers[1].accountsCommand.get({ accountName: 'root@localhost:' + servers[0].port })
108 const account: Account = res.body
109 await makeGetRequest({ 106 await makeGetRequest({
110 url: servers[1].url, 107 url: servers[1].url,
111 path: account.avatar.path, 108 path: account.avatar.path,