diff options
Diffstat (limited to 'server/tests/utils')
-rw-r--r-- | server/tests/utils/server/servers.ts | 10 | ||||
-rw-r--r-- | server/tests/utils/videos/videos.ts | 3 |
2 files changed, 11 insertions, 2 deletions
diff --git a/server/tests/utils/server/servers.ts b/server/tests/utils/server/servers.ts index 4add2f69a..878efe91a 100644 --- a/server/tests/utils/server/servers.ts +++ b/server/tests/utils/server/servers.ts | |||
@@ -145,6 +145,13 @@ function runServer (serverNumber: number, configOverride?: Object) { | |||
145 | }) | 145 | }) |
146 | } | 146 | } |
147 | 147 | ||
148 | async function reRunServer (server: ServerInfo) { | ||
149 | const newServer = await runServer(server.serverNumber) | ||
150 | server.app = newServer.app | ||
151 | |||
152 | return server | ||
153 | } | ||
154 | |||
148 | function killallServers (servers: ServerInfo[]) { | 155 | function killallServers (servers: ServerInfo[]) { |
149 | for (const server of servers) { | 156 | for (const server of servers) { |
150 | process.kill(-server.app.pid) | 157 | process.kill(-server.app.pid) |
@@ -158,5 +165,6 @@ export { | |||
158 | flushAndRunMultipleServers, | 165 | flushAndRunMultipleServers, |
159 | flushTests, | 166 | flushTests, |
160 | runServer, | 167 | runServer, |
161 | killallServers | 168 | killallServers, |
169 | reRunServer | ||
162 | } | 170 | } |
diff --git a/server/tests/utils/videos/videos.ts b/server/tests/utils/videos/videos.ts index c437c21b2..dc1327215 100644 --- a/server/tests/utils/videos/videos.ts +++ b/server/tests/utils/videos/videos.ts | |||
@@ -383,7 +383,8 @@ async function completeVideoCheck ( | |||
383 | expect(videoDetails.account.name).to.equal(attributes.account) | 383 | expect(videoDetails.account.name).to.equal(attributes.account) |
384 | expect(videoDetails.commentsEnabled).to.equal(attributes.commentsEnabled) | 384 | expect(videoDetails.commentsEnabled).to.equal(attributes.commentsEnabled) |
385 | 385 | ||
386 | expect(videoDetails.channel.name).to.equal(attributes.channel.name) | 386 | expect(videoDetails.channel.displayName).to.equal(attributes.channel.name) |
387 | expect(videoDetails.channel.name).to.have.lengthOf(36) | ||
387 | expect(videoDetails.channel.isLocal).to.equal(attributes.channel.isLocal) | 388 | expect(videoDetails.channel.isLocal).to.equal(attributes.channel.isLocal) |
388 | expect(dateIsValid(videoDetails.channel.createdAt)).to.be.true | 389 | expect(dateIsValid(videoDetails.channel.createdAt)).to.be.true |
389 | expect(dateIsValid(videoDetails.channel.updatedAt)).to.be.true | 390 | expect(dateIsValid(videoDetails.channel.updatedAt)).to.be.true |