Fix test cleanup
This commit is contained in:
parent
7590f7a868
commit
644391bee6
|
@ -437,7 +437,7 @@ describe('Test videos API validator', function () {
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Should succeed with the correct parameters', async function () {
|
it('Should succeed with the correct parameters', async function () {
|
||||||
this.timeout(10000)
|
this.timeout(30000)
|
||||||
|
|
||||||
const fields = baseCorrectParams
|
const fields = baseCorrectParams
|
||||||
|
|
||||||
|
|
|
@ -5,10 +5,10 @@ import { expectStartWith, MockObjectStorageProxy, SQLCommand, testLiveVideoResol
|
||||||
import { areMockObjectStorageTestsDisabled } from '@shared/core-utils'
|
import { areMockObjectStorageTestsDisabled } from '@shared/core-utils'
|
||||||
import { HttpStatusCode, LiveVideoCreate, VideoPrivacy } from '@shared/models'
|
import { HttpStatusCode, LiveVideoCreate, VideoPrivacy } from '@shared/models'
|
||||||
import {
|
import {
|
||||||
|
cleanupTests,
|
||||||
createMultipleServers,
|
createMultipleServers,
|
||||||
doubleFollow,
|
doubleFollow,
|
||||||
findExternalSavedVideo,
|
findExternalSavedVideo,
|
||||||
killallServers,
|
|
||||||
makeRawRequest,
|
makeRawRequest,
|
||||||
ObjectStorageCommand,
|
ObjectStorageCommand,
|
||||||
PeerTubeServer,
|
PeerTubeServer,
|
||||||
|
@ -290,6 +290,6 @@ describe('Object storage for lives', function () {
|
||||||
after(async function () {
|
after(async function () {
|
||||||
await sqlCommandServer1.cleanup()
|
await sqlCommandServer1.cleanup()
|
||||||
|
|
||||||
await killallServers(servers)
|
await cleanupTests(servers)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
@ -5,8 +5,8 @@ import { expectStartWith, FIXTURE_URLS } from '@server/tests/shared'
|
||||||
import { areMockObjectStorageTestsDisabled } from '@shared/core-utils'
|
import { areMockObjectStorageTestsDisabled } from '@shared/core-utils'
|
||||||
import { HttpStatusCode, VideoPrivacy } from '@shared/models'
|
import { HttpStatusCode, VideoPrivacy } from '@shared/models'
|
||||||
import {
|
import {
|
||||||
|
cleanupTests,
|
||||||
createSingleServer,
|
createSingleServer,
|
||||||
killallServers,
|
|
||||||
makeRawRequest,
|
makeRawRequest,
|
||||||
ObjectStorageCommand,
|
ObjectStorageCommand,
|
||||||
PeerTubeServer,
|
PeerTubeServer,
|
||||||
|
@ -103,6 +103,6 @@ describe('Object storage for video import', function () {
|
||||||
})
|
})
|
||||||
|
|
||||||
after(async function () {
|
after(async function () {
|
||||||
await killallServers([ server ])
|
await cleanupTests([ server ])
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
@ -389,7 +389,7 @@ describe('Object storage for videos', function () {
|
||||||
})
|
})
|
||||||
|
|
||||||
after(async function () {
|
after(async function () {
|
||||||
await killallServers([ server ])
|
await cleanupTests([ server ])
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -5,9 +5,9 @@ import { FIXTURE_URLS, SQLCommand } from '@server/tests/shared'
|
||||||
import { areHttpImportTestsDisabled } from '@shared/core-utils'
|
import { areHttpImportTestsDisabled } from '@shared/core-utils'
|
||||||
import { VideoChannelSyncState, VideoInclude, VideoPrivacy } from '@shared/models'
|
import { VideoChannelSyncState, VideoInclude, VideoPrivacy } from '@shared/models'
|
||||||
import {
|
import {
|
||||||
|
cleanupTests,
|
||||||
createMultipleServers,
|
createMultipleServers,
|
||||||
getServerImportConfig,
|
getServerImportConfig,
|
||||||
killallServers,
|
|
||||||
PeerTubeServer,
|
PeerTubeServer,
|
||||||
setAccessTokensToServers,
|
setAccessTokensToServers,
|
||||||
setDefaultAccountAvatar,
|
setDefaultAccountAvatar,
|
||||||
|
@ -309,7 +309,7 @@ describe('Test channel synchronizations', function () {
|
||||||
await sqlCommand.cleanup()
|
await sqlCommand.cleanup()
|
||||||
}
|
}
|
||||||
|
|
||||||
await killallServers(servers)
|
await cleanupTests(servers)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,6 +44,7 @@ export class ServersCommand extends AbstractCommand {
|
||||||
|
|
||||||
await copy(origin, join('artifacts', destname))
|
await copy(origin, join('artifacts', destname))
|
||||||
}
|
}
|
||||||
|
console.log(this.server.parallel)
|
||||||
|
|
||||||
if (this.server.parallel) {
|
if (this.server.parallel) {
|
||||||
const promise = saveGithubLogsIfNeeded()
|
const promise = saveGithubLogsIfNeeded()
|
||||||
|
|
|
@ -14,7 +14,7 @@ export class StreamingPlaylistsCommand extends AbstractCommand {
|
||||||
withRetry?: boolean // default false
|
withRetry?: boolean // default false
|
||||||
currentRetry?: number
|
currentRetry?: number
|
||||||
}): Promise<string> {
|
}): Promise<string> {
|
||||||
const { videoFileToken, reinjectVideoFileToken, withRetry, currentRetry = 1 } = options
|
const { videoFileToken, reinjectVideoFileToken, withRetry = false, currentRetry = 1 } = options
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const result = await unwrapTextOrDecode(this.getRawRequest({
|
const result = await unwrapTextOrDecode(this.getRawRequest({
|
||||||
|
@ -51,7 +51,7 @@ export class StreamingPlaylistsCommand extends AbstractCommand {
|
||||||
withRetry?: boolean // default false
|
withRetry?: boolean // default false
|
||||||
currentRetry?: number
|
currentRetry?: number
|
||||||
}) {
|
}) {
|
||||||
const { withRetry, currentRetry = 1 } = options
|
const { withRetry = false, currentRetry = 1 } = options
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const result = await unwrapBody<Buffer>(this.getRawRequest({
|
const result = await unwrapBody<Buffer>(this.getRawRequest({
|
||||||
|
@ -85,7 +85,7 @@ export class StreamingPlaylistsCommand extends AbstractCommand {
|
||||||
withRetry?: boolean // default false
|
withRetry?: boolean // default false
|
||||||
currentRetry?: number
|
currentRetry?: number
|
||||||
}) {
|
}) {
|
||||||
const { withRetry, currentRetry = 1 } = options
|
const { withRetry = false, currentRetry = 1 } = options
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const result = await unwrapBodyOrDecodeToJSON<{ [ id: string ]: string }>(this.getRawRequest({
|
const result = await unwrapBodyOrDecodeToJSON<{ [ id: string ]: string }>(this.getRawRequest({
|
||||||
|
|
Loading…
Reference in New Issue