aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/misc-endpoints.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/misc-endpoints.ts')
-rw-r--r--server/tests/misc-endpoints.ts17
1 files changed, 7 insertions, 10 deletions
diff --git a/server/tests/misc-endpoints.ts b/server/tests/misc-endpoints.ts
index 5f82719da..ed406e1bc 100644
--- a/server/tests/misc-endpoints.ts
+++ b/server/tests/misc-endpoints.ts
@@ -4,15 +4,14 @@ import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { 5import {
6 addVideoChannel, 6 addVideoChannel,
7 cleanupTests,
7 createUser, 8 createUser,
8 flushTests, 9 flushAndRunServer,
9 killallServers,
10 makeGetRequest, 10 makeGetRequest,
11 runServer,
12 ServerInfo, 11 ServerInfo,
13 setAccessTokensToServers, 12 setAccessTokensToServers,
14 uploadVideo 13 uploadVideo
15} from '../../shared/utils' 14} from '../../shared/extra-utils'
16import { VideoPrivacy } from '../../shared/models/videos' 15import { VideoPrivacy } from '../../shared/models/videos'
17 16
18const expect = chai.expect 17const expect = chai.expect
@@ -23,9 +22,7 @@ describe('Test misc endpoints', function () {
23 before(async function () { 22 before(async function () {
24 this.timeout(120000) 23 this.timeout(120000)
25 24
26 await flushTests() 25 server = await flushAndRunServer(1)
27
28 server = await runServer(1)
29 await setAccessTokensToServers([ server ]) 26 await setAccessTokensToServers([ server ])
30 }) 27 })
31 28
@@ -149,8 +146,8 @@ describe('Test misc endpoints', function () {
149 await addVideoChannel(server.url, server.accessToken, { name: 'channel1', displayName: 'channel 1' }) 146 await addVideoChannel(server.url, server.accessToken, { name: 'channel1', displayName: 'channel 1' })
150 await addVideoChannel(server.url, server.accessToken, { name: 'channel2', displayName: 'channel 2' }) 147 await addVideoChannel(server.url, server.accessToken, { name: 'channel2', displayName: 'channel 2' })
151 148
152 await createUser(server.url, server.accessToken, 'user1', 'password') 149 await createUser({ url: server.url, accessToken: server.accessToken, username: 'user1', password: 'password' })
153 await createUser(server.url, server.accessToken, 'user2', 'password') 150 await createUser({ url: server.url, accessToken: server.accessToken, username: 'user2', password: 'password' })
154 151
155 const res = await makeGetRequest({ 152 const res = await makeGetRequest({
156 url: server.url, 153 url: server.url,
@@ -174,6 +171,6 @@ describe('Test misc endpoints', function () {
174 }) 171 })
175 172
176 after(async function () { 173 after(async function () {
177 killallServers([ server ]) 174 await cleanupTests([ server ])
178 }) 175 })
179}) 176})