aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/cli
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/cli')
-rw-r--r--server/tests/cli/create-import-video-file-job.ts3
-rw-r--r--server/tests/cli/create-transcoding-job.ts4
-rw-r--r--server/tests/cli/optimize-old-videos.ts4
-rw-r--r--server/tests/cli/peertube.ts6
-rw-r--r--server/tests/cli/reset-password.ts8
-rw-r--r--server/tests/cli/update-host.ts10
6 files changed, 12 insertions, 23 deletions
diff --git a/server/tests/cli/create-import-video-file-job.ts b/server/tests/cli/create-import-video-file-job.ts
index 4dc12a1c6..191d4b460 100644
--- a/server/tests/cli/create-import-video-file-job.ts
+++ b/server/tests/cli/create-import-video-file-job.ts
@@ -39,7 +39,6 @@ describe('Test create import video jobs', function () {
39 39
40 before(async function () { 40 before(async function () {
41 this.timeout(90000) 41 this.timeout(90000)
42 await flushTests()
43 42
44 // Run server 2 to have transcoding enabled 43 // Run server 2 to have transcoding enabled
45 servers = await flushAndRunMultipleServers(2) 44 servers = await flushAndRunMultipleServers(2)
@@ -131,7 +130,7 @@ describe('Test create import video jobs', function () {
131 } 130 }
132 }) 131 })
133 132
134 after(async function () { 133 after(function () {
135 killallServers(servers) 134 killallServers(servers)
136 }) 135 })
137}) 136})
diff --git a/server/tests/cli/create-transcoding-job.ts b/server/tests/cli/create-transcoding-job.ts
index bd1de2079..61c310bc3 100644
--- a/server/tests/cli/create-transcoding-job.ts
+++ b/server/tests/cli/create-transcoding-job.ts
@@ -28,8 +28,6 @@ describe('Test create transcoding jobs', function () {
28 before(async function () { 28 before(async function () {
29 this.timeout(60000) 29 this.timeout(60000)
30 30
31 await flushTests()
32
33 // Run server 2 to have transcoding enabled 31 // Run server 2 to have transcoding enabled
34 servers = await flushAndRunMultipleServers(2) 32 servers = await flushAndRunMultipleServers(2)
35 await setAccessTokensToServers(servers) 33 await setAccessTokensToServers(servers)
@@ -126,7 +124,7 @@ describe('Test create transcoding jobs', function () {
126 } 124 }
127 }) 125 })
128 126
129 after(async function () { 127 after(function () {
130 killallServers(servers) 128 killallServers(servers)
131 }) 129 })
132}) 130})
diff --git a/server/tests/cli/optimize-old-videos.ts b/server/tests/cli/optimize-old-videos.ts
index b3724476b..14625f8c0 100644
--- a/server/tests/cli/optimize-old-videos.ts
+++ b/server/tests/cli/optimize-old-videos.ts
@@ -31,8 +31,6 @@ describe('Test optimize old videos', function () {
31 before(async function () { 31 before(async function () {
32 this.timeout(200000) 32 this.timeout(200000)
33 33
34 await flushTests()
35
36 // Run server 2 to have transcoding enabled 34 // Run server 2 to have transcoding enabled
37 servers = await flushAndRunMultipleServers(2) 35 servers = await flushAndRunMultipleServers(2)
38 await setAccessTokensToServers(servers) 36 await setAccessTokensToServers(servers)
@@ -114,7 +112,7 @@ describe('Test optimize old videos', function () {
114 } 112 }
115 }) 113 })
116 114
117 after(async function () { 115 after(function () {
118 killallServers(servers) 116 killallServers(servers)
119 }) 117 })
120}) 118})
diff --git a/server/tests/cli/peertube.ts b/server/tests/cli/peertube.ts
index 45411bdbc..0c11945e0 100644
--- a/server/tests/cli/peertube.ts
+++ b/server/tests/cli/peertube.ts
@@ -8,7 +8,7 @@ import {
8 flushTests, 8 flushTests,
9 getEnvCli, 9 getEnvCli,
10 killallServers, 10 killallServers,
11 runServer, 11 flushAndRunServer,
12 ServerInfo, 12 ServerInfo,
13 setAccessTokensToServers 13 setAccessTokensToServers
14} from '../../../shared/extra-utils' 14} from '../../../shared/extra-utils'
@@ -19,9 +19,7 @@ describe('Test CLI wrapper', function () {
19 19
20 before(async function () { 20 before(async function () {
21 this.timeout(30000) 21 this.timeout(30000)
22 22 server = await flushAndRunServer(1)
23 await flushTests()
24 server = await runServer(1)
25 await setAccessTokensToServers([ server ]) 23 await setAccessTokensToServers([ server ])
26 24
27 await createUser({ url: server.url, accessToken: server.accessToken, username: 'user_1', password: 'super password' }) 25 await createUser({ url: server.url, accessToken: server.accessToken, username: 'user_1', password: 'super password' })
diff --git a/server/tests/cli/reset-password.ts b/server/tests/cli/reset-password.ts
index 3c56bf45b..1d6423814 100644
--- a/server/tests/cli/reset-password.ts
+++ b/server/tests/cli/reset-password.ts
@@ -7,7 +7,7 @@ import {
7 getEnvCli, 7 getEnvCli,
8 killallServers, 8 killallServers,
9 login, 9 login,
10 runServer, 10 flushAndRunServer,
11 ServerInfo, 11 ServerInfo,
12 setAccessTokensToServers 12 setAccessTokensToServers
13} from '../../../shared/extra-utils' 13} from '../../../shared/extra-utils'
@@ -17,9 +17,7 @@ describe('Test reset password scripts', function () {
17 17
18 before(async function () { 18 before(async function () {
19 this.timeout(30000) 19 this.timeout(30000)
20 20 server = await flushAndRunServer(1)
21 await flushTests()
22 server = await runServer(1)
23 await setAccessTokensToServers([ server ]) 21 await setAccessTokensToServers([ server ])
24 22
25 await createUser({ url: server.url, accessToken: server.accessToken, username: 'user_1', password: 'super password' }) 23 await createUser({ url: server.url, accessToken: server.accessToken, username: 'user_1', password: 'super password' })
@@ -34,7 +32,7 @@ describe('Test reset password scripts', function () {
34 await login(server.url, server.client, { username: 'user_1', password: 'coucou' }, 200) 32 await login(server.url, server.client, { username: 'user_1', password: 'coucou' }, 200)
35 }) 33 })
36 34
37 after(async function () { 35 after(function () {
38 killallServers([ server ]) 36 killallServers([ server ])
39 }) 37 })
40}) 38})
diff --git a/server/tests/cli/update-host.ts b/server/tests/cli/update-host.ts
index 2270ff494..dd594779b 100644
--- a/server/tests/cli/update-host.ts
+++ b/server/tests/cli/update-host.ts
@@ -17,7 +17,7 @@ import {
17 killallServers, 17 killallServers,
18 makeActivityPubGetRequest, 18 makeActivityPubGetRequest,
19 parseTorrentVideo, 19 parseTorrentVideo,
20 runServer, 20 flushAndRunServer,
21 ServerInfo, 21 ServerInfo,
22 setAccessTokensToServers, 22 setAccessTokensToServers,
23 uploadVideo 23 uploadVideo
@@ -32,15 +32,13 @@ describe('Test update host scripts', function () {
32 before(async function () { 32 before(async function () {
33 this.timeout(60000) 33 this.timeout(60000)
34 34
35 await flushTests()
36
37 const overrideConfig = { 35 const overrideConfig = {
38 webserver: { 36 webserver: {
39 port: 9256 37 port: 9256
40 } 38 }
41 } 39 }
42 // Run server 2 to have transcoding enabled 40 // Run server 2 to have transcoding enabled
43 server = await runServer(2, overrideConfig) 41 server = await flushAndRunServer(2, overrideConfig)
44 await setAccessTokensToServers([ server ]) 42 await setAccessTokensToServers([ server ])
45 43
46 // Upload two videos for our needs 44 // Upload two videos for our needs
@@ -72,7 +70,7 @@ describe('Test update host scripts', function () {
72 70
73 killallServers([ server ]) 71 killallServers([ server ])
74 // Run server with standard configuration 72 // Run server with standard configuration
75 server = await runServer(2) 73 server = await flushAndRunServer(2)
76 74
77 const env = getEnvCli(server) 75 const env = getEnvCli(server)
78 await execCLI(`${env} npm run update-host`) 76 await execCLI(`${env} npm run update-host`)
@@ -148,7 +146,7 @@ describe('Test update host scripts', function () {
148 } 146 }
149 }) 147 })
150 148
151 after(async function () { 149 after(function () {
152 killallServers([ server ]) 150 killallServers([ server ])
153 }) 151 })
154}) 152})